Backing out 253888 again due to Tp regression plus another problem I noticed (frame properties not getting destroyed on frame destruction)
git-svn-id: svn://10.0.0.236/trunk@161116 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1166,24 +1166,27 @@ nsIFrame*
|
||||
nsContainerFrame::GetOverflowFrames(nsPresContext* aPresContext,
|
||||
PRBool aRemoveProperty) const
|
||||
{
|
||||
PRUint32 options = 0;
|
||||
|
||||
if (aRemoveProperty) {
|
||||
return (nsIFrame*) UnsetProperty(nsLayoutAtoms::overflowProperty);
|
||||
options |= NS_IFRAME_MGR_REMOVE_PROP;
|
||||
}
|
||||
|
||||
return (nsIFrame*) GetProperty(nsLayoutAtoms::overflowProperty);
|
||||
return (nsIFrame*) aPresContext->FrameManager()->
|
||||
GetFrameProperty(this, nsLayoutAtoms::overflowProperty, options);
|
||||
}
|
||||
|
||||
// Destructor function for the overflow frame property
|
||||
static void
|
||||
DestroyOverflowFrames(void* aFrame,
|
||||
DestroyOverflowFrames(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nsIAtom* aPropertyName,
|
||||
void* aPropertyValue,
|
||||
void* aDtorData)
|
||||
void* aPropertyValue)
|
||||
{
|
||||
if (aPropertyValue) {
|
||||
nsFrameList frames((nsIFrame*)aPropertyValue);
|
||||
|
||||
frames.DestroyFrames(NS_STATIC_CAST(nsPresContext*, aDtorData));
|
||||
frames.DestroyFrames(aPresContext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1191,12 +1194,12 @@ nsresult
|
||||
nsContainerFrame::SetOverflowFrames(nsPresContext* aPresContext,
|
||||
nsIFrame* aOverflowFrames)
|
||||
{
|
||||
nsresult rv = SetProperty(nsLayoutAtoms::overflowProperty,
|
||||
aOverflowFrames, DestroyOverflowFrames,
|
||||
aPresContext);
|
||||
nsresult rv = aPresContext->FrameManager()->
|
||||
SetFrameProperty(this, nsLayoutAtoms::overflowProperty,
|
||||
aOverflowFrames, DestroyOverflowFrames);
|
||||
|
||||
// Verify that we didn't overwrite an existing overflow list
|
||||
NS_ASSERTION(rv != NS_PROPTABLE_PROP_OVERWRITTEN, "existing overflow list");
|
||||
NS_ASSERTION(rv != NS_IFRAME_MGR_PROP_OVERWRITTEN, "existing overflow list");
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user