mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
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
This commit is contained in:
parent
9843f04b26
commit
64b6f74f89
1 changed files with 4 additions and 0 deletions
|
|
@ -3808,12 +3808,14 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder,
|
||||||
// region on scrollbar frames that won't be placed in their own layer. See
|
// region on scrollbar frames that won't be placed in their own layer. See
|
||||||
// bug 1213324 for details.
|
// bug 1213324 for details.
|
||||||
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox);
|
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox);
|
||||||
|
mDispatchToContentHitRegion.SimplifyOutward(8);
|
||||||
} else if (aFrame->GetType() == nsGkAtoms::objectFrame) {
|
} else if (aFrame->GetType() == nsGkAtoms::objectFrame) {
|
||||||
// If the frame is a plugin frame and wants to handle wheel events as
|
// 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.
|
// default action, we should add the frame to dispatch-to-content region.
|
||||||
nsPluginFrame* pluginFrame = do_QueryFrame(aFrame);
|
nsPluginFrame* pluginFrame = do_QueryFrame(aFrame);
|
||||||
if (pluginFrame && pluginFrame->WantsToHandleWheelEventAsDefaultAction()) {
|
if (pluginFrame && pluginFrame->WantsToHandleWheelEventAsDefaultAction()) {
|
||||||
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox);
|
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox);
|
||||||
|
mDispatchToContentHitRegion.SimplifyOutward(8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3850,6 +3852,7 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
if (alreadyHadRegions) {
|
if (alreadyHadRegions) {
|
||||||
mDispatchToContentHitRegion.OrWith(CombinedTouchActionRegion());
|
mDispatchToContentHitRegion.OrWith(CombinedTouchActionRegion());
|
||||||
|
mDispatchToContentHitRegion.SimplifyOutward(8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3859,6 +3862,7 @@ nsDisplayLayerEventRegions::AddInactiveScrollPort(const nsRect& aRect)
|
||||||
{
|
{
|
||||||
mHitRegion.Or(mHitRegion, aRect);
|
mHitRegion.Or(mHitRegion, aRect);
|
||||||
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aRect);
|
mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aRect);
|
||||||
|
mDispatchToContentHitRegion.SimplifyOutward(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue