aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/document.rs17
-rw-r--r--components/script/dom/webidls/Document.webidl6
-rw-r--r--components/script/dom/webidls/Window.webidl6
-rw-r--r--components/script/dom/window.rs10
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini18
-rw-r--r--tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini17
6 files changed, 35 insertions, 39 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 03a9d69fae7..3166ec0eb69 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -1825,12 +1825,27 @@ impl<'a> DocumentMethods for &'a Document {
collection.r().reflector().get_jsobject().get()
}
- // https://html.spec.whatwg.org/#document
+ // https://html.spec.whatwg.org/multipage/#document
fn SupportedPropertyNames(self) -> Vec<DOMString> {
// FIXME: unimplemented (https://github.com/servo/servo/issues/7273)
vec![]
}
+ // https://html.spec.whatwg.org/multipage/#dom-document-clear
+ fn Clear(self) {
+ // This method intentionally does nothing
+ }
+
+ // https://html.spec.whatwg.org/multipage/#dom-document-captureevents
+ fn CaptureEvents(self) {
+ // This method intentionally does nothing
+ }
+
+ // https://html.spec.whatwg.org/#dom-document-releaseevents
+ fn ReleaseEvents(self) {
+ // This method intentionally does nothing
+ }
+
global_event_handlers!();
event_handler!(readystatechange, GetOnreadystatechange, SetOnreadystatechange);
}
diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl
index d129fee64be..203e8d00d1c 100644
--- a/components/script/dom/webidls/Document.webidl
+++ b/components/script/dom/webidls/Document.webidl
@@ -146,9 +146,9 @@ partial interface Document {
[SameObject]
readonly attribute HTMLCollection applets;
- // void clear();
- // void captureEvents();
- // void releaseEvents();
+ void clear();
+ void captureEvents();
+ void releaseEvents();
// Tracking issue for document.all: https://github.com/servo/servo/issues/7396
// readonly attribute HTMLAllCollection all;
diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl
index b448ca4ffb1..f744397a379 100644
--- a/components/script/dom/webidls/Window.webidl
+++ b/components/script/dom/webidls/Window.webidl
@@ -93,6 +93,12 @@ partial interface Window {
/*[Replaceable]*/ readonly attribute Performance performance;
};
+// https://html.spec.whatwg.org/multipage/#Window-partial
+partial interface Window {
+ void captureEvents();
+ void releaseEvents();
+};
+
// https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
partial interface Window {
[NewObject]
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 3795b3e58eb..cb5cbb09975 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -542,6 +542,16 @@ impl<'a> WindowMethods for &'a Window {
doc.r().cancel_animation_frame(ident);
}
+ // https://html.spec.whatwg.org/multipage/#dom-window-captureevents
+ fn CaptureEvents(self) {
+ // This method intentionally does nothing
+ }
+
+ // https://html.spec.whatwg.org/multipage/#dom-window-releaseevents
+ fn ReleaseEvents(self) {
+ // This method intentionally does nothing
+ }
+
// check-tidy: no specs after this line
fn Debug(self, message: DOMString) {
debug!("{}", message);
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 1514bbfb9e2..cb01cd8f47d 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -66,15 +66,6 @@
[Document interface: attribute alinkColor]
expected: FAIL
- [Document interface: operation clear()]
- expected: FAIL
-
- [Document interface: operation captureEvents()]
- expected: FAIL
-
- [Document interface: operation releaseEvents()]
- expected: FAIL
-
[Document interface: attribute all]
expected: FAIL
@@ -1140,15 +1131,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "alinkColor" with the proper type (74)]
expected: FAIL
- [Document interface: document.implementation.createDocument(null, "", null) must inherit property "clear" with the proper type (78)]
- expected: FAIL
-
- [Document interface: document.implementation.createDocument(null, "", null) must inherit property "captureEvents" with the proper type (79)]
- expected: FAIL
-
- [Document interface: document.implementation.createDocument(null, "", null) must inherit property "releaseEvents" with the proper type (80)]
- expected: FAIL
-
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "all" with the proper type (81)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini b/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini
deleted file mode 100644
index 150ecb811cd..00000000000
--- a/tests/wpt/metadata/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/nothing.html.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[nothing.html]
- type: testharness
- [document.clear]
- expected: FAIL
-
- [document.captureEvents]
- expected: FAIL
-
- [document.releaseEvents]
- expected: FAIL
-
- [window.captureEvents]
- expected: FAIL
-
- [window.releaseEvents]
- expected: FAIL
-