Bug 1320704 - Disable IntersectionObserver, r=bkelly
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 28 Nov 2016 21:11:35 +0200
changeset 324462 ef0db9c255413423214d06d0ca4d9b6184f42ab2
parent 324461 f7bf172373ff87d87ea8dfd81c08a7756667fa77
child 324463 f50ae3e4924d028b4d7488833999fd7012782727
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersbkelly
bugs1320704
milestone53.0a1
Bug 1320704 - Disable IntersectionObserver, r=bkelly
dom/base/test/mochitest.ini
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/IntersectionObserver.webidl
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -668,16 +668,17 @@ skip-if = (toolkit == 'android') # Andro
 [test_iframe_referrer.html]
 [test_iframe_referrer_changing.html]
 [test_iframe_referrer_invalid.html]
 [test_Image_constructor.html]
 [test_img_referrer.html]
 [test_innersize_scrollport.html]
 [test_integer_attr_with_leading_zero.html]
 [test_intersectionobservers.html]
+skip-if = true # Track Bug 1320704
 [test_ipc_messagemanager_blob.html]
 [test_link_prefetch.html]
 skip-if = !e10s # Track Bug 1281415
 [test_link_stylesheet.html]
 [test_messagemanager_targetchain.html]
 [test_meta_viewport0.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
 [test_meta_viewport1.html]
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -610,19 +610,19 @@ var interfaceNamesInGlobalScope =
     {name: "ImageCaptureErrorEvent", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ImageData",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "InputEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "InstallTrigger",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "IntersectionObserver",
+    {name: "IntersectionObserver", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "IntersectionObserverEntry",
+    {name: "IntersectionObserverEntry", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "KeyEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "KeyboardEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "KeyframeEffectReadOnly", release: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "KeyframeEffect", release: false},
--- a/dom/webidl/IntersectionObserver.webidl
+++ b/dom/webidl/IntersectionObserver.webidl
@@ -2,34 +2,35 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://wicg.github.io/IntersectionObserver/
  */
 
-[ProbablyShortLivingObject]
+[ProbablyShortLivingObject, Pref="dom.IntersectionObserver.enabled"]
 interface IntersectionObserverEntry {
   [Constant]
   readonly attribute DOMHighResTimeStamp time;
   [Constant]
   readonly attribute DOMRectReadOnly? rootBounds;
   [Constant]
   readonly attribute DOMRectReadOnly boundingClientRect;
   [Constant]
   readonly attribute DOMRectReadOnly intersectionRect;
   [Constant]
   readonly attribute double intersectionRatio;
   [Constant]
   readonly attribute Element target;
 };
 
 [Constructor(IntersectionCallback intersectionCallback,
-             optional IntersectionObserverInit options)]
+             optional IntersectionObserverInit options),
+ Pref="dom.IntersectionObserver.enabled"]
 interface IntersectionObserver {
   [Constant]
   readonly attribute Element? root;
   [Constant]
   readonly attribute DOMString rootMargin;
   [Constant,Cached]
   readonly attribute sequence<double> thresholds;
   void observe(Element target);