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
Родитель ef6bd7ad73
Коммит 5abc649388
1 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -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()) {