From 7975665f6a6110918e447c435d076925542fe8c4 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Thu, 2 May 2019 16:47:23 +0300 Subject: patch to Bug 1363423 --- layout/base/FrameLayerBuilder.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'layout') diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 183285439..b315c348a 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(). @@ -6368,3 +6372,4 @@ ContainerState::CreateMaskLayer(Layer *aLayer, } } // namespace mozilla + -- cgit v1.2.3