Skip to content

Commit

Permalink
dom: Implement stub queryCommandSupported.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed May 13, 2020
1 parent 887d5f9 commit 19f4be3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
5 changes: 5 additions & 0 deletions components/script/dom/document.rs
Expand Up @@ -3669,6 +3669,11 @@ impl ProfilerMetadataFactory for Document {
}

impl DocumentMethods for Document {
// https://w3c.github.io/editing/ActiveDocuments/execCommand.html#querycommandsupported()
fn QueryCommandSupported(&self, _command: DOMString) -> bool {
false
}

// https://drafts.csswg.org/cssom/#dom-document-stylesheets
fn StyleSheets(&self) -> DomRoot<StyleSheetList> {
self.stylesheet_list.or_init(|| {
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/Document.webidl
Expand Up @@ -142,7 +142,7 @@ partial /*sealed*/ interface Document {
// boolean queryCommandEnabled(DOMString commandId);
// boolean queryCommandIndeterm(DOMString commandId);
// boolean queryCommandState(DOMString commandId);
// boolean queryCommandSupported(DOMString commandId);
boolean queryCommandSupported(DOMString commandId);
// DOMString queryCommandValue(DOMString commandId);

// special event handler IDL attributes that only apply to Document objects
Expand Down
21 changes: 0 additions & 21 deletions tests/wpt/metadata/html/dom/idlharness.https.html.ini
Expand Up @@ -1417,9 +1417,6 @@
[Document interface: iframe.contentDocument must inherit property "dir" with the proper type]
expected: FAIL

[Document interface: new Document() must inherit property "queryCommandSupported(DOMString)" with the proper type]
expected: FAIL

[Window interface: attribute onsecuritypolicyviolation]
expected: FAIL

Expand All @@ -1441,9 +1438,6 @@
[Window interface: attribute menubar]
expected: FAIL

[Document interface: calling queryCommandSupported(DOMString) on documentWithHandlers with too few arguments must throw TypeError]
expected: FAIL

[Document interface: attribute designMode]
expected: FAIL

Expand Down Expand Up @@ -1480,15 +1474,9 @@
[Document interface: calling execCommand(DOMString, boolean, DOMString) on new Document() with too few arguments must throw TypeError]
expected: FAIL

[Document interface: calling queryCommandSupported(DOMString) on new Document() with too few arguments must throw TypeError]
expected: FAIL

[Window interface: operation focus()]
expected: FAIL

[Document interface: documentWithHandlers must inherit property "queryCommandSupported(DOMString)" with the proper type]
expected: FAIL

[Window interface: attribute scrollbars]
expected: FAIL

Expand Down Expand Up @@ -1516,9 +1504,6 @@
[Document interface: iframe.contentDocument must inherit property "queryCommandValue(DOMString)" with the proper type]
expected: FAIL

[Document interface: operation queryCommandSupported(DOMString)]
expected: FAIL

[Document interface: iframe.contentDocument must inherit property "all" with the proper type]
expected: FAIL

Expand Down Expand Up @@ -1588,9 +1573,6 @@
[Window interface: window must inherit property "blur()" with the proper type]
expected: FAIL

[Document interface: iframe.contentDocument must inherit property "queryCommandSupported(DOMString)" with the proper type]
expected: FAIL

[Document interface: calling execCommand(DOMString, boolean, DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
expected: FAIL

Expand Down Expand Up @@ -1621,9 +1603,6 @@
[Document interface: iframe.contentDocument must inherit property "queryCommandEnabled(DOMString)" with the proper type]
expected: FAIL

[Document interface: calling queryCommandSupported(DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
expected: FAIL

[Window interface: operation blur()]
expected: FAIL

Expand Down

0 comments on commit 19f4be3

Please sign in to comment.