summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorMoonchild <git-repo@palemoon.org>2019-05-03 00:43:39 +0000
committerGitHub <noreply@github.com>2019-05-03 00:43:39 +0000
commitd9404b77bb7f176e8a652c248620072db17bdb67 (patch)
treed49b830a147d12efcfaddd62045d7c362590f110 /layout
parentaca5eb2cd39336d17d1ca3540061f83eedbec89f (diff)
parent99d111ad898d3b0482a73cbc75e2fc88fda6f7ed (diff)
downloadUXP-d9404b77bb7f176e8a652c248620072db17bdb67.tar
UXP-d9404b77bb7f176e8a652c248620072db17bdb67.tar.gz
UXP-d9404b77bb7f176e8a652c248620072db17bdb67.tar.lz
UXP-d9404b77bb7f176e8a652c248620072db17bdb67.tar.xz
UXP-d9404b77bb7f176e8a652c248620072db17bdb67.zip
Merge pull request #1070 from win7-7/PresShellPaint-performance-patch
PresShell paint performance patch
Diffstat (limited to 'layout')
-rw-r--r--layout/base/FrameLayerBuilder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp
index 183285439..9aaa28fb5 100644
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -3648,6 +3648,10 @@ PaintedLayerData::AccumulateEventRegions(ContainerState* aState, nsDisplayLayerE
if (alreadyHadRegions) {
mDispatchToContentHitRegion.OrWith(CombinedTouchActionRegion());
}
+
+ // Avoid quadratic performance as a result of the region growing to include
+ // and arbitrarily large number of rects, which can happen on some pages.
+ mMaybeHitRegion.SimplifyOutward(8);
// Calculate scaled versions of the bounds of mHitRegion and mMaybeHitRegion
// for quick access in FindPaintedLayerFor().