Bug 1116718 part 1 - Don't bother calculating overflow areas when they will be discarded anyway. r=roc

This commit is contained in:
Mats Palmgren 2015-01-06 09:27:56 +00:00
parent c796af4f6d
commit 662a18f196

View File

@ -252,18 +252,16 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
}
nsRect rect = AdjustReflowStateAsContainingBlock(&reflowState);
// Just reflow all the fixed-pos frames.
GetAbsoluteContainingBlock()->Reflow(this, aPresContext, reflowState, aStatus,
rect,
false, true, true, // XXX could be optimized
&aDesiredSize.mOverflowAreas);
nsOverflowAreas* overflowAreas = &aDesiredSize.mOverflowAreas;
nsIScrollableFrame* rootScrollFrame =
aPresContext->PresShell()->GetRootScrollFrameAsScrollable();
if (rootScrollFrame && !rootScrollFrame->IsIgnoringViewportClipping()) {
aDesiredSize.SetOverflowAreasToDesiredBounds();
overflowAreas = nullptr;
}
GetAbsoluteContainingBlock()->Reflow(this, aPresContext, reflowState, aStatus,
rect,
false, true, true, // XXX could be optimized
overflowAreas);
}
if (mFrames.NotEmpty()) {