Bug 1474362 [wpt PR 11858] - Update the intersection-observer IDL file, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 06 Aug 2018 17:17:02 +0000
changeset 430656 4019dc28e74d00baa66b4aa6a2caa348cb7bec70
parent 430655 d7ec2368925b7925f70b545d93f41ef32fedfcbb
child 430657 bade3f61ea81d4a060103c0d22a0d6753d58fe4d
push id34410
push usertoros@mozilla.com
push dateThu, 09 Aug 2018 10:02:47 +0000
treeherdermozilla-central@f650c0df72f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1474362, 11858
milestone63.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 1474362 [wpt PR 11858] - Update the intersection-observer IDL file, a=testonly Automatic update from web-platform-testsAdd the intersection-observer IDL file + test (#11858) -- wpt-commits: 9643ddb5e855882b66481083e544d4c90f3844da wpt-pr: 11858
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/interfaces/intersection-observer.idl
testing/web-platform/tests/intersection-observer/idlharness.window.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -288277,16 +288277,21 @@
      {}
     ]
    ],
    "interfaces/input-events.idl": [
     [
      {}
     ]
    ],
+   "interfaces/intersection-observer.idl": [
+    [
+     {}
+    ]
+   ],
    "interfaces/keyboard-lock.idl": [
     [
      {}
     ]
    ],
    "interfaces/keyboard-map.idl": [
     [
      {}
@@ -362558,16 +362563,22 @@
     ]
    ],
    "intersection-observer/edge-inclusive-intersection.html": [
     [
      "/intersection-observer/edge-inclusive-intersection.html",
      {}
     ]
    ],
+   "intersection-observer/idlharness.window.js": [
+    [
+     "/intersection-observer/idlharness.window.html",
+     {}
+    ]
+   ],
    "intersection-observer/iframe-no-root.html": [
     [
      "/intersection-observer/iframe-no-root.html",
      {}
     ]
    ],
    "intersection-observer/isIntersecting-change-events.html": [
     [
@@ -602501,16 +602512,20 @@
   "interfaces/image-capture.idl": [
    "740475d72051b03d28793f5c539196a80a27b277",
    "support"
   ],
   "interfaces/input-events.idl": [
    "be276361738c7ba55f06bc608fa506e79ca366b8",
    "support"
   ],
+  "interfaces/intersection-observer.idl": [
+   "83c5d90d6e2c23c355bbc25a8e220b61bcc45fe6",
+   "support"
+  ],
   "interfaces/keyboard-lock.idl": [
    "4ffffd43717933ceee5c3c8f47b3e3a5276b9952",
    "support"
   ],
   "interfaces/keyboard-map.idl": [
    "e2f2c32736d03bbc1461a5aad661eede4069d77a",
    "support"
   ],
@@ -602801,16 +602816,20 @@
   "intersection-observer/display-none.html": [
    "7cebc5633ef91228129d2a1c0478262615ad3ba1",
    "testharness"
   ],
   "intersection-observer/edge-inclusive-intersection.html": [
    "b9fa24b87808abc158307e8c69afeeb5ce3c1907",
    "testharness"
   ],
+  "intersection-observer/idlharness.window.js": [
+   "2059e1ce638b5f2cac4e4f013c567a56894599a0",
+   "testharness"
+  ],
   "intersection-observer/iframe-no-root.html": [
    "e37aeac5530f348328274f9f8a2eeae9f08609ff",
    "testharness"
   ],
   "intersection-observer/isIntersecting-change-events.html": [
    "f9362c3024c2003ac03c1e789c54486830710c92",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/intersection-observer.idl
@@ -0,0 +1,45 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content of this file was automatically extracted from the
+// "Intersection Observer" spec.
+// See: https://w3c.github.io/IntersectionObserver/
+
+callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
+
+[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
+ Exposed=Window]
+interface IntersectionObserver {
+  readonly attribute Element? root;
+  readonly attribute DOMString rootMargin;
+  readonly attribute FrozenArray<double> thresholds;
+  void observe(Element target);
+  void unobserve(Element target);
+  void disconnect();
+  sequence<IntersectionObserverEntry> takeRecords();
+};
+
+[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)]
+interface IntersectionObserverEntry {
+  readonly attribute DOMHighResTimeStamp time;
+  readonly attribute DOMRectReadOnly rootBounds;
+  readonly attribute DOMRectReadOnly boundingClientRect;
+  readonly attribute DOMRectReadOnly intersectionRect;
+  readonly attribute boolean isIntersecting;
+  readonly attribute double intersectionRatio;
+  readonly attribute Element target;
+};
+
+dictionary IntersectionObserverEntryInit {
+  required DOMHighResTimeStamp time;
+  required DOMRectInit rootBounds;
+  required DOMRectInit boundingClientRect;
+  required DOMRectInit intersectionRect;
+  required boolean isIntersecting;
+  required double intersectionRatio;
+  required Element target;
+};
+
+dictionary IntersectionObserverInit {
+  Element?  root = null;
+  DOMString rootMargin = "0px";
+  (double or sequence<double>) threshold = 0;
+};
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/intersection-observer/idlharness.window.js
@@ -0,0 +1,22 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+'use strict';
+
+// https://w3c.github.io/IntersectionObserver/
+
+idl_test(
+  ['intersection-observer'],
+  ['dom'],
+  idl_array => {
+    idl_array.add_objects({
+      IntersectionObserver: ['observer'],
+    });
+    var options = {
+      root: document.body,
+      rootMargin: '0px',
+      threshold: 1.0
+    }
+    self.observer = new IntersectionObserver(() => {}, options);
+  }
+);