Changeset 280913 in webkit
- Timestamp:
- Aug 11, 2021 9:39:55 AM (11 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Node.h (modified) (1 diff)
-
Source/WebCore/html/HTMLMetaElement.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r280910 r280913 1 2021-08-11 Chris Dumez <cdumez@apple.com> 2 3 HTMLMetaElement http-equiv should not be processed in shadow trees 4 https://bugs.webkit.org/show_bug.cgi?id=228973 5 6 Reviewed by Geoffrey Garen. 7 8 Rebaseline WPT test that is now passing. 9 10 * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt: 11 1 12 2021-08-11 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt
r259900 r280913 1 CONSOLE MESSAGE: Error: assert_unreached: Got more than 1 load event Reached unreachable code2 1 3 FAIL Meta refresh only applies while in the document tree, not in a shadow tree Error: assert_unreached: Got more than 1 load event Reached unreachable code2 PASS Meta refresh only applies while in the document tree, not in a shadow tree 4 3 -
trunk/Source/WebCore/ChangeLog
r280910 r280913 1 2021-08-11 Chris Dumez <cdumez@apple.com> 2 3 HTMLMetaElement http-equiv should not be processed in shadow trees 4 https://bugs.webkit.org/show_bug.cgi?id=228973 5 6 Reviewed by Geoffrey Garen. 7 8 HTMLMetaElement http-equiv should not be processed in shadow trees: 9 - https://html.spec.whatwg.org/#attr-meta-http-equiv 10 - https://html.spec.whatwg.org/multipage/infrastructure.html#insert-an-element-into-a-document 11 - https://dom.spec.whatwg.org/#in-a-document-tree 12 13 Firefox and Chrome already match the specification here. 14 15 No new tests, rebaselined existing test. 16 17 * dom/Node.h: 18 (WebCore::Node::isInDocumentTree const): 19 * html/HTMLMetaElement.cpp: 20 (WebCore::HTMLMetaElement::attributeChanged): 21 (WebCore::HTMLMetaElement::process): 22 1 23 2021-08-11 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/Source/WebCore/dom/Node.h
r280689 r280913 369 369 bool isInTreeScope() const { return hasNodeFlag(NodeFlag::IsConnected) || hasNodeFlag(NodeFlag::IsInShadowTree); } 370 370 371 // https://dom.spec.whatwg.org/#in-a-document-tree 372 bool isInDocumentTree() const { return isConnected() && !isInShadowTree(); } 373 371 374 bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; } 372 375 virtual bool childTypeAllowed(NodeType) const { return false; } -
trunk/Source/WebCore/html/HTMLMetaElement.cpp
r280870 r280913 93 93 HTMLElement::attributeChanged(name, oldValue, newValue, reason); 94 94 95 if (!is Connected())95 if (!isInDocumentTree()) 96 96 return; 97 97 … … 153 153 void HTMLMetaElement::process() 154 154 { 155 // Changing a meta tag while it's not in the tree shouldn't have any effect on the document.156 if (!is Connected())155 // Changing a meta tag while it's not in the document tree shouldn't have any effect on the document. 156 if (!isInDocumentTree()) 157 157 return; 158 158
Note: See TracChangeset
for help on using the changeset viewer.