Bug 1150284. Disable offsetX/offsetY properties in FxOS/Fennec. r=smaug
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 18 Jun 2015 17:04:14 +1200
changeset 249829 5e97f3b44653c2feb7586f3bd076120940d25694
parent 249828 8e1bc0ef35d2a4fa67d13784bbe76fbed5de7ab7
child 249830 f83a1a7c2ffb98e10e9e67f51fef02770127e29f
push id61353
push userrocallahan@mozilla.com
push dateSat, 20 Jun 2015 14:06:32 +0000
treeherdermozilla-inbound@5e97f3b44653 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1150284
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1150284. Disable offsetX/offsetY properties in FxOS/Fennec. r=smaug
b2g/app/b2g.js
dom/events/test/mochitest.ini
dom/webidl/MouseEvent.webidl
mobile/android/app/mobile.js
modules/libpref/init/all.js
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -217,16 +217,20 @@ pref("content.sink.perf_parse_time", 500
 pref("dom.use_watchdog", false);
 
 // The slow script dialog can be triggered from inside the JS engine as well,
 // ensure that those calls don't accidentally trigger the dialog.
 pref("dom.max_script_run_time", 0);
 pref("dom.max_chrome_script_run_time", 0);
 pref("dom.max_child_script_run_time", 0);
 
+// Temporarily disable support for offsetX/Y to work around Google Maps bug
+// (bug 1150284)
+pref("dom.mouseEvent.offsetXY.enabled", false);
+
 // plugins
 pref("plugin.disable", true);
 pref("dom.ipc.plugins.enabled", true);
 
 // product URLs
 // The breakpad report server to link to in about:crashes
 pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/");
 pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/b2g/%VERSION%/releasenotes/");
--- a/dom/events/test/mochitest.ini
+++ b/dom/events/test/mochitest.ini
@@ -184,11 +184,12 @@ support-files =
 support-files =
   bug989198_embedded.html
   bug989198_helper.js
 skip-if = buildapp == 'b2g' || e10s
 [test_bug1096146.html]
 support-files =
   bug1096146_embedded.html
 [test_offsetxy.html]
+skip-if = toolkit == 'android' || buildapp == 'b2g'
 [test_eventhandler_scoping.html]
 [test_bug1013412.html]
 skip-if = buildapp == 'b2g' # no wheel events on b2g
--- a/dom/webidl/MouseEvent.webidl
+++ b/dom/webidl/MouseEvent.webidl
@@ -11,17 +11,19 @@
  */
 
 [Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)]
 interface MouseEvent : UIEvent {
   readonly attribute long           screenX;
   readonly attribute long           screenY;
   readonly attribute long           clientX;
   readonly attribute long           clientY;
+[Pref="dom.mouseEvent.offsetXY.enabled"]
   readonly attribute long           offsetX;
+[Pref="dom.mouseEvent.offsetXY.enabled"]
   readonly attribute long           offsetY;
   readonly attribute boolean        ctrlKey;
   readonly attribute boolean        shiftKey;
   readonly attribute boolean        altKey;
   readonly attribute boolean        metaKey;
   readonly attribute short          button;
   readonly attribute unsigned short buttons;
   readonly attribute EventTarget?   relatedTarget;
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -543,16 +543,20 @@ pref("layers.low-precision-resolution", 
 pref("layers.low-precision-opacity", "1.0");
 // We want to limit layers for two reasons:
 // 1) We can't scroll smoothly if we have to many draw calls
 // 2) Pages that have too many layers consume too much memory and crash.
 // By limiting the number of layers on mobile we're making the main thread
 // work harder keep scrolling smooth and memory low.
 pref("layers.max-active", 20);
 
+// Temporarily disable support for offsetX/Y to work around Google Maps bug
+// (bug 1150284)
+pref("dom.mouseEvent.offsetXY.enabled", false);
+
 pref("notification.feature.enabled", true);
 pref("dom.webnotifications.enabled", true);
 
 // prevent tooltips from showing up
 pref("browser.chrome.toolbar_tips", false);
 
 // prevent video elements from preloading too much data
 pref("media.preload.default", 1); // default to preload none
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2323,16 +2323,19 @@ pref("layout.css.scroll-snap.enabled", t
 
 // Is support for document.fonts enabled?
 #ifdef RELEASE_BUILD
 pref("layout.css.font-loading-api.enabled", false);
 #else
 pref("layout.css.font-loading-api.enabled", true);
 #endif
 
+// Are the MouseEvent.offsetX/Y properties enabled?
+pref("dom.mouseEvent.offsetXY.enabled", true);
+
 // pref for which side vertical scrollbars should be on
 // 0 = end-side in UI direction
 // 1 = end-side in document/content direction
 // 2 = right
 // 3 = left
 pref("layout.scrollbar.side", 0);
 
 // pref to stop overlay scrollbars from fading out, for testing purposes