diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 2319074128e7..c9020cfa7d81 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -343,7 +343,7 @@ private: DECL_GFX_PREF(Live, "layout.css.scroll-snap.prediction-sensitivity", ScrollSnapPredictionSensitivity, float, 0.750f); DECL_GFX_PREF(Once, "layout.css.touch_action.enabled", TouchActionEnabled, bool, false); DECL_GFX_PREF(Live, "layout.display-list.dump", LayoutDumpDisplayList, bool, false); - DECL_GFX_PREF(Live, "layout.event-regions.enabled", LayoutEventRegionsEnabled, bool, false); + 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(Once, "layout.paint_rects_separately", LayoutPaintRectsSeparately, bool, true); diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index 25b5e61d2cd9..2046ccbb7757 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -347,7 +347,9 @@ public: bool IsBuildingLayerEventRegions() { if (mMode == PAINTING) { - return (gfxPrefs::LayoutEventRegionsEnabled() || + // Note: this is the only place that gets to query LayoutEventRegionsEnabled + // 'directly' - other code should call this function. + return (gfxPrefs::LayoutEventRegionsEnabledDoNotUseDirectly() || gfxPrefs::AsyncPanZoomEnabled()); } return false;