Bug 1436409 - Remove the layout.event-regions.enabled pref and bake it in as false everywhere. r?tnikkel
This pref was used to enable the building of nsDisplayLayerEventRegions
items without APZ, so that we could test it in isolation. However, we no
longer need to do so, and these display items are going to be deleted
anyway, so we can remove this pref.
MozReview-Commit-ID: LJVcFafCKyS
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -456,17 +456,17 @@ EventListenerManager::ProcessApzAwareEve
if (!doc) {
if (nsCOMPtr<DOMEventTargetHelper> helper = do_QueryInterface(mTarget)) {
if (nsPIDOMWindowInner* window = helper->GetOwner()) {
doc = window->GetExtantDoc();
}
}
}
- if (doc && nsDisplayListBuilder::LayerEventRegionsEnabled()) {
+ if (doc && gfxPlatform::AsyncPanZoomEnabled()) {
nsIPresShell* ps = doc->GetShell();
if (ps) {
nsIFrame* f = ps->GetRootFrame();
if (f) {
f->SchedulePaint();
}
}
}
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -677,17 +677,16 @@ private:
DECL_GFX_PREF(Live, "layout.display-list.dump", LayoutDumpDisplayList, bool, false);
DECL_GFX_PREF(Live, "layout.display-list.dump-content", LayoutDumpDisplayListContent, bool, false);
DECL_GFX_PREF(Live, "layout.display-list.dump-parent", LayoutDumpDisplayListParent, bool, false);
DECL_GFX_PREF(Live, "layout.display-list.show-rebuild-area", LayoutDisplayListShowArea, bool, false);
DECL_GFX_PREF(Once, "layout.simple-event-region-items", SimpleEventRegionItems, bool, true);
DECL_GFX_PREF(Once, "layout.less-event-region-items", LessEventRegionItems, bool, true);
- DECL_GFX_PREF(Live, "layout.event-regions.enabled", LayoutEventRegionsEnabledDoNotUseDirectly, bool, false);
DECL_GFX_PREF(Once, "layout.frame_rate", LayoutFrameRate, int32_t, -1);
DECL_GFX_PREF(Live, "layout.min-active-layer-size", LayoutMinActiveLayerSize, int, 64);
DECL_GFX_PREF(Once, "layout.paint_rects_separately", LayoutPaintRectsSeparately, bool, true);
// This and code dependent on it should be removed once containerless scrolling looks stable.
DECL_GFX_PREF(Once, "layout.scroll.root-frame-containers", LayoutUseContainersForRootFrames, bool, true);
// This pref is to be set by test code only.
DECL_GFX_PREF(Live, "layout.scrollbars.always-layerize-track", AlwaysLayerizeScrollbarTrackTestOnly, bool, false);
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3673,17 +3673,17 @@ nsLayoutUtils::PaintFrame(gfxContext* aR
}
}
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(&builder, id);
builder.SetVisibleRect(visibleRect);
builder.SetIsBuilding(true);
builder.SetAncestorHasApzAwareEventHandler(
- nsDisplayListBuilder::LayerEventRegionsEnabled() &&
+ gfxPlatform::AsyncPanZoomEnabled() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell));
DisplayListChecker beforeMergeChecker;
DisplayListChecker toBeMergedChecker;
DisplayListChecker afterMergeChecker;
// Attempt to do a partial build and merge into the existing list.
// This calls BuildDisplayListForStacking context on a subset of the
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -492,17 +492,17 @@ nsSubDocumentFrame::BuildDisplayList(nsD
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(
aBuilder,
ignoreViewportScrolling && rootScrollFrame && rootScrollFrame->GetContent()
? nsLayoutUtils::FindOrCreateIDFor(rootScrollFrame->GetContent())
: aBuilder->GetCurrentScrollParentId());
bool hasDocumentLevelListenersForApzAwareEvents =
- nsDisplayListBuilder::LayerEventRegionsEnabled() &&
+ gfxPlatform::AsyncPanZoomEnabled() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell);
aBuilder->SetAncestorHasApzAwareEventHandler(hasDocumentLevelListenersForApzAwareEvents);
subdocRootFrame->
BuildDisplayListForStackingContext(aBuilder, &childItems);
}
if (!aBuilder->IsForEventDelivery()) {
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -2297,35 +2297,21 @@ nsDisplayListBuilder::IsBuildingLayerEve
{
if (mBuildCompositorHitTestInfo) {
// If we have webrender hit-testing enabled, then we will build the
// nsDisplayCompositorHitTestInfo items and use those instead of event
// regions, so we don't need to build the event regions.
return false;
}
if (IsPaintingToWindow()) {
- // Note: this function and LayerEventRegionsEnabled are the only places
- // that get to query LayoutEventRegionsEnabled 'directly' - other code
- // should call this function.
- return gfxPrefs::LayoutEventRegionsEnabledDoNotUseDirectly() ||
- mAsyncPanZoomEnabled;
+ return mAsyncPanZoomEnabled;
}
return false;
}
-/* static */ bool
-nsDisplayListBuilder::LayerEventRegionsEnabled()
-{
- // Note: this function and IsBuildingLayerEventRegions are the only places
- // that get to query LayoutEventRegionsEnabled 'directly' - other code
- // should call this function.
- return gfxPrefs::LayoutEventRegionsEnabledDoNotUseDirectly() ||
- gfxPlatform::AsyncPanZoomEnabled();
-}
-
void nsDisplayListSet::MoveTo(const nsDisplayListSet& aDestination) const
{
aDestination.BorderBackground()->AppendToTop(BorderBackground());
aDestination.BlockBorderBackgrounds()->AppendToTop(BlockBorderBackgrounds());
aDestination.Floats()->AppendToTop(Floats());
aDestination.Content()->AppendToTop(Content());
aDestination.PositionedDescendants()->AppendToTop(PositionedDescendants());
aDestination.Outlines()->AppendToTop(Outlines());
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -751,17 +751,16 @@ public:
* needed, and adds it to the top of |aList|. If |aBuildNew| is true, the
* previous hit test info will not be reused.
*/
void BuildCompositorHitTestInfoIfNeeded(nsIFrame* aFrame,
nsDisplayList* aList,
const bool aBuildNew);
bool IsBuildingLayerEventRegions();
- static bool LayerEventRegionsEnabled();
bool IsInsidePointerEventsNoneDoc()
{
return CurrentPresShellState()->mInsidePointerEventsNoneDoc;
}
bool GetAncestorHasApzAwareEventHandler() const { return mAncestorHasApzAwareEventHandler; }
void SetAncestorHasApzAwareEventHandler(bool aValue)
{
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -600,19 +600,16 @@ pref("media.cubeb.sandbox", false);
pref("media.webaudio.audiocontextoptions-samplerate.enabled", true);
// Weather we allow AMD switchable graphics
pref("layers.amd-switchable-gfx.enabled", true);
// Whether to use async panning and zooming
pref("layers.async-pan-zoom.enabled", true);
-// Whether to enable event region building during painting
-pref("layout.event-regions.enabled", false);
-
// Whether to enable arbitrary layer geometry for OpenGL compositor
pref("layers.geometry.opengl.enabled", true);
// Whether to enable arbitrary layer geometry for Basic compositor
pref("layers.geometry.basic.enabled", true);
// Whether to enable arbitrary layer geometry for DirectX compositor
pref("layers.geometry.d3d11.enabled", true);