Bug 1570212 - Convert layout.reflow.synthMouseMove to a static pref. r=heycam

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicholas Nethercote 2019-08-02 11:59:06 +00:00
Родитель 79bf4210ee
Коммит fcb4a59f7d
2 изменённых файлов: 7 добавлений и 9 удалений

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

@ -752,7 +752,6 @@ already_AddRefed<nsFrameSelection> PresShell::FrameSelection() {
//---------------------------------------------------------------------- //----------------------------------------------------------------------
static bool sSynthMouseMove = true;
static uint32_t sNextPresShellId; static uint32_t sNextPresShellId;
/* static */ /* static */
@ -849,12 +848,6 @@ PresShell::PresShell()
#endif #endif
mLastOSWake = mLoadBegin = TimeStamp::Now(); mLastOSWake = mLoadBegin = TimeStamp::Now();
static bool addedSynthMouseMove = false;
if (!addedSynthMouseMove) {
Preferences::AddBoolVarCache(&sSynthMouseMove,
"layout.reflow.synthMouseMove", true);
addedSynthMouseMove = true;
}
PointerEventHandler::Initialize(); PointerEventHandler::Initialize();
} }
@ -5336,7 +5329,7 @@ void PresShell::SetRenderingState(const RenderingState& aState) {
} }
void PresShell::SynthesizeMouseMove(bool aFromScroll) { void PresShell::SynthesizeMouseMove(bool aFromScroll) {
if (!sSynthMouseMove) return; if (!StaticPrefs::layout_reflow_synthMouseMove()) return;
if (mPaintingSuppressed || !mIsActive || !mPresContext) { if (mPaintingSuppressed || !mIsActive || !mPresContext) {
return; return;
@ -9121,7 +9114,7 @@ void PresShell::DidDoReflow(bool aInterruptible) {
mDocument->ScheduleResizeObserversNotification(); mDocument->ScheduleResizeObserversNotification();
} }
if (sSynthMouseMove) { if (StaticPrefs::layout_reflow_synthMouseMove()) {
SynthesizeMouseMove(false); SynthesizeMouseMove(false);
} }

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

@ -4432,6 +4432,11 @@
value: true value: true
mirror: once mirror: once
- name: layout.reflow.synthMouseMove
type: bool
value: true
mirror: always
# This and code dependent on it should be removed once containerless scrolling looks stable. # This and code dependent on it should be removed once containerless scrolling looks stable.
- name: layout.scroll.root-frame-containers - name: layout.scroll.root-frame-containers
type: RelaxedAtomicBool type: RelaxedAtomicBool