Bug 1377329 - Enlarge the default capacity of nsDisplayBuilfer::mFramesMarkedForDisplayList. r=mattwoodrow

For gmail, 100 is too small, enlarge the dafault capaicty of
nsDisplayListBuilder::MarkFramesForDisplayList to prevent reallocation.

MozReview-Commit-ID: 5zSxyakZ5O9

--HG--
extra : rebase_source : a20032ef98fc0e78ddbd4ac8194ee4f11c2e11a7
extra : source : 105804994e32827ff87ea7fcacecf942df41a051
This commit is contained in:
cku 2017-07-14 01:47:34 +08:00
Родитель 110678b1cb
Коммит efa9c443f2
2 изменённых файлов: 2 добавлений и 2 удалений

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

@ -1279,7 +1279,6 @@ void
nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
const nsFrameList& aFrames,
const nsRect& aDirtyRect) {
mFramesMarkedForDisplay.SetCapacity(mFramesMarkedForDisplay.Length() + aFrames.GetLength());
for (nsIFrame* e : aFrames) {
// Skip the AccessibleCaret frame when building no caret.
if (!IsBuildingCaret()) {
@ -1291,6 +1290,7 @@ nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
}
}
}
mFramesMarkedForDisplay.AppendElement(e);
MarkOutOfFlowFrameForDisplay(aDirtyFrame, e, aDirtyRect);
}

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

@ -1480,7 +1480,7 @@ private:
nsCOMPtr<nsISelection> mBoundingSelection;
AutoTArray<PresShellState,8> mPresShellStates;
AutoTArray<nsIFrame*,100> mFramesMarkedForDisplay;
AutoTArray<nsIFrame*,400> mFramesMarkedForDisplay;
AutoTArray<ThemeGeometry,2> mThemeGeometries;
nsDisplayTableItem* mCurrentTableItem;
DisplayListClipState mClipState;