diff options
author | Moonchild <git-repo@palemoon.org> | 2019-05-03 00:43:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 00:43:39 +0000 |
commit | d9404b77bb7f176e8a652c248620072db17bdb67 (patch) | |
tree | d49b830a147d12efcfaddd62045d7c362590f110 /layout | |
parent | aca5eb2cd39336d17d1ca3540061f83eedbec89f (diff) | |
parent | 99d111ad898d3b0482a73cbc75e2fc88fda6f7ed (diff) | |
download | UXP-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.cpp | 4 |
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(). |