mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1415225 - Stop setting the EventRegionsOverride flag on root layers. r=botond,mattwoodrow
As with the previous patch, instead of setting the override on the root layer, we set the flag on the nsDisplayListBuilder before building the display list, and the flag automatically forces all event regions display items to use their dispatch-to-content region instead of any other regions. Both the WebRender and non-WebRender codepaths were setting the override flag on their root layers and don't need to any more. MozReview-Commit-ID: KQV3w2nvlgs --HG-- extra : rebase_source : 5be30af2d928117519296ec238eac91139986531
This commit is contained in:
parent
0e18ce302a
commit
536af04afe
@ -80,12 +80,6 @@ WebRenderCommandBuilder::BuildWebRenderCommands(wr::DisplayListBuilder& aBuilder
|
||||
// Make a "root" layer data that has everything else as descendants
|
||||
mLayerScrollData.emplace_back();
|
||||
mLayerScrollData.back().InitializeRoot(mLayerScrollData.size() - 1);
|
||||
if (aDisplayListBuilder->IsBuildingLayerEventRegions()) {
|
||||
nsIPresShell* shell = aDisplayListBuilder->RootReferenceFrame()->PresContext()->PresShell();
|
||||
if (nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(shell)) {
|
||||
mLayerScrollData.back().SetEventRegionsOverride(EventRegionsOverride::ForceDispatchToContent);
|
||||
}
|
||||
}
|
||||
auto callback = [&aScrollData](FrameMetrics::ViewID aScrollId) -> bool {
|
||||
return aScrollData.HasMetadataFor(aScrollId);
|
||||
};
|
||||
|
@ -3781,6 +3781,9 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
|
||||
builder.SetVisibleRect(visibleRect);
|
||||
builder.SetIsBuilding(true);
|
||||
builder.SetAncestorHasApzAwareEventHandler(
|
||||
builder.IsBuildingLayerEventRegions() &&
|
||||
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell));
|
||||
|
||||
const bool paintedPreviously =
|
||||
aFrame->HasProperty(nsIFrame::ModifiedFrameList());
|
||||
|
@ -2481,12 +2481,6 @@ already_AddRefed<LayerManager> nsDisplayList::PaintRoot(nsDisplayListBuilder* aB
|
||||
1.0f/containerParameters.mYScale);
|
||||
root->SetScaleToResolution(presShell->ScaleToResolution(),
|
||||
containerParameters.mXScale);
|
||||
if (aBuilder->IsBuildingLayerEventRegions() &&
|
||||
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell)) {
|
||||
root->SetEventRegionsOverride(EventRegionsOverride::ForceDispatchToContent);
|
||||
} else {
|
||||
root->SetEventRegionsOverride(EventRegionsOverride::NoOverride);
|
||||
}
|
||||
|
||||
auto callback = [root](FrameMetrics::ViewID aScrollId) -> bool {
|
||||
return nsLayoutUtils::ContainsMetricsWithId(root, aScrollId);
|
||||
|
Loading…
Reference in New Issue
Block a user