From a5bf01c86ef04332986e189d2cd726e679c096ef Mon Sep 17 00:00:00 2001 From: Oleg Romashin Date: Sun, 22 May 2011 09:55:55 -0700 Subject: [PATCH] Bug 657844 - SynthesizeMouseMove calls should be disabled in fennec r=bzbarsky --- layout/base/nsPresShell.cpp | 7 ++++++- mobile/app/mobile.js | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index f001cb579171..4b51dcec3783 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1675,6 +1675,7 @@ NS_NewPresShell(nsIPresShell** aInstancePtrResult) } nsTHashtable *nsIPresShell::sLiveShells = 0; +static PRBool sSynthMouseMove = PR_TRUE; NS_MEMORY_REPORTER_IMPLEMENT(LayoutPresShell, "explicit/layout/all", @@ -1719,6 +1720,8 @@ PresShell::PresShell() if (!registeredReporter) { NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(LayoutPresShell)); NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(LayoutBidi)); + nsContentUtils::AddBoolPrefVarCache("layout.reflow.synthMouseMove", + &sSynthMouseMove, PR_TRUE); registeredReporter = true; } @@ -7856,7 +7859,9 @@ PresShell::DidDoReflow(PRBool aInterruptible) mFrameConstructor->EndUpdate(); HandlePostedReflowCallbacks(aInterruptible); - SynthesizeMouseMove(PR_FALSE); + if (sSynthMouseMove) { + SynthesizeMouseMove(PR_FALSE); + } if (mCaret) { // Update the caret's position now to account for any changes created by // the reflow. diff --git a/mobile/app/mobile.js b/mobile/app/mobile.js index 7a8606bb3c3e..a33abdc30a7a 100644 --- a/mobile/app/mobile.js +++ b/mobile/app/mobile.js @@ -146,6 +146,7 @@ pref("browser.sessionstore.max_tabs_undo", 5); pref("mozilla.widget.force-24bpp", true); pref("mozilla.widget.use-buffer-pixmap", true); pref("mozilla.widget.disable-native-theme", true); +pref("layout.reflow.synthMouseMove", false); /* download manager (don't show the window or alert) */ pref("browser.download.useDownloadDir", true);