summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
authorMoonchild <git-repo@palemoon.org>2019-05-03 00:44:28 +0000
committerGitHub <noreply@github.com>2019-05-03 00:44:28 +0000
commit650585f03cb3293e0db0e1f9edbac710c091b644 (patch)
tree5c63bb02de763d78e84d31bbb2d0734fb219dffd /layout/base
parentd9404b77bb7f176e8a652c248620072db17bdb67 (diff)
parent9b750203d0b87e9c4644ff58826e871a37f4c2cd (diff)
downloadUXP-650585f03cb3293e0db0e1f9edbac710c091b644.tar
UXP-650585f03cb3293e0db0e1f9edbac710c091b644.tar.gz
UXP-650585f03cb3293e0db0e1f9edbac710c091b644.tar.lz
UXP-650585f03cb3293e0db0e1f9edbac710c091b644.tar.xz
UXP-650585f03cb3293e0db0e1f9edbac710c091b644.zip
Merge pull request #1071 from win7-7/nsDisplayListBuilder
nsFrameList::GetLength() calls in nsDisplayListBuilder::MarkFramesForDisplayList() are slow
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/nsDisplayList.cpp2
-rw-r--r--layout/base/nsDisplayList.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index d619576ba..c830891a5 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1096,7 +1096,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()) {
@@ -1108,6 +1107,7 @@ nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
}
}
}
+
mFramesMarkedForDisplay.AppendElement(e);
MarkOutOfFlowFrameForDisplay(aDirtyFrame, e, aDirtyRect);
}
diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h
index c9f773f5b..fcdc9e4fc 100644
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -1200,7 +1200,7 @@ private:
PLArenaPool mPool;
nsCOMPtr<nsISelection> mBoundingSelection;
AutoTArray<PresShellState,8> mPresShellStates;
- AutoTArray<nsIFrame*,100> mFramesMarkedForDisplay;
+ AutoTArray<nsIFrame*,400> mFramesMarkedForDisplay;
AutoTArray<ThemeGeometry,2> mThemeGeometries;
nsDisplayTableItem* mCurrentTableItem;
DisplayListClipState mClipState;