summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-05-24 20:00:07 +0300
committerMoonchild <mcwerewolf@wolfbeast.com>2019-05-24 17:00:07 +0000
commit622ad88c5d0ed8fc301d37b884857123eb17cc56 (patch)
tree446433e1a16caa254e619856b2f418a9f30f3428 /layout/base
parent315ffd563c18442e655e815bf250acce84b9b232 (diff)
downloadUXP-622ad88c5d0ed8fc301d37b884857123eb17cc56.tar
UXP-622ad88c5d0ed8fc301d37b884857123eb17cc56.tar.gz
UXP-622ad88c5d0ed8fc301d37b884857123eb17cc56.tar.lz
UXP-622ad88c5d0ed8fc301d37b884857123eb17cc56.tar.xz
UXP-622ad88c5d0ed8fc301d37b884857123eb17cc56.zip
Lots of time spent maintaining nsDisplayLayerEventRegions (#1116)
* Simplify the dispatch-to-content region Simplify the dispatch-to-content region in nsDisplayLayerEventRegions::AddFrame() and AddInactiveScrollPort() if it starts to get large. * tabs to spaces
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/nsDisplayList.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index c830891a5..a55ec1e39 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -3808,12 +3808,14 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder,
// region on scrollbar frames that won't be placed in their own layer. See
// bug 1213324 for details.
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox);
+ mDispatchToContentHitRegion.SimplifyOutward(8);
} else if (aFrame->GetType() == nsGkAtoms::objectFrame) {
// If the frame is a plugin frame and wants to handle wheel events as
// default action, we should add the frame to dispatch-to-content region.
nsPluginFrame* pluginFrame = do_QueryFrame(aFrame);
if (pluginFrame && pluginFrame->WantsToHandleWheelEventAsDefaultAction()) {
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox);
+ mDispatchToContentHitRegion.SimplifyOutward(8);
}
}
@@ -3850,6 +3852,7 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder,
}
if (alreadyHadRegions) {
mDispatchToContentHitRegion.OrWith(CombinedTouchActionRegion());
+ mDispatchToContentHitRegion.SimplifyOutward(8);
}
}
}
@@ -3859,6 +3862,7 @@ nsDisplayLayerEventRegions::AddInactiveScrollPort(const nsRect& aRect)
{
mHitRegion.Or(mHitRegion, aRect);
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aRect);
+ mDispatchToContentHitRegion.SimplifyOutward(8);
}
bool