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

--HG--
extra : rebase_source : 76d8eeca8dca4ea88b8226bbe6b829dbc40e03e4
This commit is contained in:
Kartikaya Gupta 2018-06-08 17:31:27 -04:00
parent aa21a4d224
commit ded66f718a
7 changed files with 4 additions and 23 deletions

View File

@ -461,7 +461,7 @@ EventListenerManager::ProcessApzAwareEventListenerAdd()
}
}
if (doc && nsDisplayListBuilder::LayerEventRegionsEnabled()) {
if (doc && gfxPlatform::AsyncPanZoomEnabled()) {
nsIPresShell* ps = doc->GetShell();
if (ps) {
nsIFrame* f = ps->GetRootFrame();

View File

@ -682,7 +682,6 @@ private:
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);

View File

@ -3678,7 +3678,7 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
builder.SetVisibleRect(visibleRect);
builder.SetIsBuilding(true);
builder.SetAncestorHasApzAwareEventHandler(
nsDisplayListBuilder::LayerEventRegionsEnabled() &&
gfxPlatform::AsyncPanZoomEnabled() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell));
DisplayListChecker beforeMergeChecker;

View File

@ -497,7 +497,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
: aBuilder->GetCurrentScrollParentId());
bool hasDocumentLevelListenersForApzAwareEvents =
nsDisplayListBuilder::LayerEventRegionsEnabled() &&
gfxPlatform::AsyncPanZoomEnabled() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell);
aBuilder->SetAncestorHasApzAwareEventHandler(hasDocumentLevelListenersForApzAwareEvents);

View File

@ -2302,25 +2302,11 @@ nsDisplayListBuilder::IsBuildingLayerEventRegions()
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());

View File

@ -752,7 +752,6 @@ public:
const bool aBuildNew);
bool IsBuildingLayerEventRegions();
static bool LayerEventRegionsEnabled();
bool IsInsidePointerEventsNoneDoc()
{
return CurrentPresShellState()->mInsidePointerEventsNoneDoc;

View File

@ -605,9 +605,6 @@ 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);