зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
3f76247abc
Коммит
37d15858db
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче