Change the FrameNeedsReflow API to pass the dirty flags to be added directly to
the method, instead of setting them before calling the method. That way we can avoid reflowing the ancestor of a reflow root which is not itself dirty but has dirty children. This also makes it harder to set dirty bits inconsistently with the FrameNeedsReflow call. Bug 378784, r+sr=dbaron, pending rbs' review on the mathml parts. git-svn-id: svn://10.0.0.236/trunk@226007 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -734,9 +734,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
PRBool reflowScrollCorner = PR_TRUE;
|
||||
if (!aReflowState.ShouldReflowAllKids()) {
|
||||
#define NEEDS_REFLOW(frame_) \
|
||||
((frame_) && \
|
||||
((frame_)->GetStateBits() & \
|
||||
(NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0)
|
||||
((frame_) && NS_SUBTREE_DIRTY(frame_))
|
||||
|
||||
reflowContents = NEEDS_REFLOW(mInner.mScrolledFrame);
|
||||
reflowHScrollbar = NEEDS_REFLOW(mInner.mHScrollbarBox);
|
||||
@@ -2488,10 +2486,10 @@ nsGfxScrollFrameInner::LayoutScrollbars(nsBoxLayoutState& aState,
|
||||
parentFrame->GetFirstChild(nsGkAtoms::fixedList);
|
||||
fixedChild; fixedChild = fixedChild->GetNextSibling()) {
|
||||
// force a reflow of the fixed child
|
||||
fixedChild->AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
// XXX Will this work given where we currently are in reflow?
|
||||
aState.PresContext()->PresShell()->
|
||||
FrameNeedsReflow(fixedChild, nsIPresShell::eResize);
|
||||
FrameNeedsReflow(fixedChild, nsIPresShell::eResize,
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user