зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
110678b1cb
Коммит
efa9c443f2
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче