Bug 1150284 - Disable offsetX/offsetY properties in FxOS/Fennec. r=smaug, a=lizzard
authorRobert O'Callahan <robert@ocallahan.org>
Sat, 20 Jun 2015 18:10:03 +0100
changeset 354552 7ba0c0811b23e2cbc0e3fb4a67a37bce2d96e082
parent 354551 049a3b9004178695a7d58185417b27b67d7e42f7
child 354553 f075b15b50d5da294b866a13dd70ef3b45beaa46
push id6908
push userraliiev@mozilla.com
push dateMon, 27 Feb 2017 16:57:28 +0000
treeherdermozilla-esr52@a5c63e3e18c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, lizzard
bugs1150284
milestone39.0
Bug 1150284 - Disable offsetX/offsetY properties in FxOS/Fennec. r=smaug, a=lizzard
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
@@ -215,16 +215,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
@@ -179,9 +179,10 @@ 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' || buildapp == 'mulet'
 [test_eventhandler_scoping.html]
--- a/dom/webidl/MouseEvent.webidl
+++ b/dom/webidl/MouseEvent.webidl
@@ -10,17 +10,19 @@
  * liability, trademark and document use rules apply.
  */
 
 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
@@ -531,16 +531,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
@@ -2263,16 +2263,19 @@ pref("layout.css.scroll-behavior.damping
 pref("layout.css.scroll-snap.enabled", true);
 
 // Is support for document.fonts enabled?
 //
 // Don't enable the pref for the CSS Font Loading API until bug 1072101 is
 // fixed, as we don't want to expose more indexed properties on the Web.
 pref("layout.css.font-loading-api.enabled", false);
 
+// 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