Bug 1626388 - Convert layout.framevisibility.enabled to a static pref r=njn

Converts `layout.framevisibility.enabled` to a static pref.

Differential Revision: https://phabricator.services.mozilla.com/D69598

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kristen Wright 2020-04-06 19:55:07 +00:00
Родитель 3f76247abc
Коммит 37d15858db
3 изменённых файлов: 8 добавлений и 13 удалений

Просмотреть файл

@ -5820,16 +5820,8 @@ void PresShell::DoUpdateApproximateFrameVisibility(bool aRemoveOnly) {
}
bool PresShell::AssumeAllFramesVisible() {
static bool sFrameVisibilityEnabled = true;
static bool sFrameVisibilityPrefCached = false;
if (!sFrameVisibilityPrefCached) {
Preferences::AddBoolVarCache(&sFrameVisibilityEnabled,
"layout.framevisibility.enabled", true);
sFrameVisibilityPrefCached = true;
}
if (!sFrameVisibilityEnabled || !mPresContext || !mDocument) {
if (!StaticPrefs::layout_framevisibility_enabled() || !mPresContext ||
!mDocument) {
return true;
}

Просмотреть файл

@ -6016,6 +6016,12 @@
value: true
mirror: always
# Whether frame visibility tracking is enabled globally.
- name: layout.framevisibility.enabled
type: bool
value: true
mirror: always
# The fraction of the scrollport we allow to horizontally scroll by before we
# schedule an update of frame visibility.
- name: layout.framevisibility.amountscrollbeforeupdatehorizontal

Просмотреть файл

@ -918,9 +918,6 @@ pref("nglayout.enable_drag_images", true);
pref("nglayout.debug.paint_flashing", false);
pref("nglayout.debug.paint_flashing_chrome", false);
// Whether frame visibility tracking is enabled globally.
pref("layout.framevisibility.enabled", true);
pref("layout.framevisibility.numscrollportwidths", 0);
pref("layout.framevisibility.numscrollportheights", 1);