Title: [289666] trunk
- Revision
- 289666
- Author
- grao...@webkit.org
- Date
- 2022-02-11 13:12:49 -0800 (Fri, 11 Feb 2022)
Log Message
[model] standalone model documents should be interactive
https://bugs.webkit.org/show_bug.cgi?id=236493
Reviewed by Dean Jackson.
Source/WebCore:
We made <model> elements not be interactive by default in bug 227621,
so we need to opt into interactivity for standalone <model> documents.
All this requires is setting the "interactive" attribute, which we set
instead of the "controls" attribute which does not exist for <model>.
Test: http/tests/model/model-document-interactive.html
* html/ModelDocument.cpp:
(WebCore::ModelDocumentParser::createDocumentStructure):
LayoutTests:
Add a test that checks that the <model> element created for standalone
documents has the "interactive" attribute.
* http/tests/model/model-document-interactive-expected.txt: Added.
* http/tests/model/model-document-interactive.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (289665 => 289666)
--- trunk/LayoutTests/ChangeLog 2022-02-11 21:09:02 UTC (rev 289665)
+++ trunk/LayoutTests/ChangeLog 2022-02-11 21:12:49 UTC (rev 289666)
@@ -1,3 +1,16 @@
+2022-02-11 Antoine Quint <grao...@webkit.org>
+
+ [model] standalone model documents should be interactive
+ https://bugs.webkit.org/show_bug.cgi?id=236493
+
+ Reviewed by Dean Jackson.
+
+ Add a test that checks that the <model> element created for standalone
+ documents has the "interactive" attribute.
+
+ * http/tests/model/model-document-interactive-expected.txt: Added.
+ * http/tests/model/model-document-interactive.html: Added.
+
2022-02-11 Jon Lee <jon...@apple.com>
Unreviewed gardening.
Added: trunk/LayoutTests/http/tests/model/model-document-interactive-expected.txt (0 => 289666)
--- trunk/LayoutTests/http/tests/model/model-document-interactive-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/model/model-document-interactive-expected.txt 2022-02-11 21:12:49 UTC (rev 289666)
@@ -0,0 +1,4 @@
+
+
+PASS <model> in standalone document is interactive.
+
Added: trunk/LayoutTests/http/tests/model/model-document-interactive.html (0 => 289666)
--- trunk/LayoutTests/http/tests/model/model-document-interactive.html (rev 0)
+++ trunk/LayoutTests/http/tests/model/model-document-interactive.html 2022-02-11 21:12:49 UTC (rev 289666)
@@ -0,0 +1,21 @@
+<!doctype html>
+<html>
+<body>
+<script src=""
+<script src=""
+<script>
+
+promise_test(async test => {
+ const frame = document.createElement("iframe");
+ frame.src = ""
+ document.body.appendChild(frame);
+
+ await new Promise(resolve => frame.addEventListener("load", resolve, { once: true }));
+
+ const model = frame.contentDocument.querySelector("model");
+ assert_true(model.interactive);
+}, "<model> in standalone document is interactive.");
+
+</script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (289665 => 289666)
--- trunk/Source/WebCore/ChangeLog 2022-02-11 21:09:02 UTC (rev 289665)
+++ trunk/Source/WebCore/ChangeLog 2022-02-11 21:12:49 UTC (rev 289666)
@@ -1,3 +1,20 @@
+2022-02-11 Antoine Quint <grao...@webkit.org>
+
+ [model] standalone model documents should be interactive
+ https://bugs.webkit.org/show_bug.cgi?id=236493
+
+ Reviewed by Dean Jackson.
+
+ We made <model> elements not be interactive by default in bug 227621,
+ so we need to opt into interactivity for standalone <model> documents.
+ All this requires is setting the "interactive" attribute, which we set
+ instead of the "controls" attribute which does not exist for <model>.
+
+ Test: http/tests/model/model-document-interactive.html
+
+ * html/ModelDocument.cpp:
+ (WebCore::ModelDocumentParser::createDocumentStructure):
+
2022-02-11 Chris Dumez <cdu...@apple.com>
Regression(r287684) Microsoft teams meeting URLs fail to open the app
Modified: trunk/Source/WebCore/html/ModelDocument.cpp (289665 => 289666)
--- trunk/Source/WebCore/html/ModelDocument.cpp 2022-02-11 21:09:02 UTC (rev 289665)
+++ trunk/Source/WebCore/html/ModelDocument.cpp 2022-02-11 21:12:49 UTC (rev 289666)
@@ -106,7 +106,7 @@
auto modelElement = HTMLModelElement::create(HTMLNames::modelTag, document);
m_modelElement = modelElement.ptr();
- modelElement->setAttributeWithoutSynchronization(controlsAttr, emptyAtom());
+ modelElement->setAttributeWithoutSynchronization(interactiveAttr, emptyAtom());
auto sourceElement = HTMLSourceElement::create(HTMLNames::sourceTag, document);
sourceElement->setAttributeWithoutSynchronization(srcAttr, document.url().string());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes