[webkit-changes] [WebKit/WebKit] 672fe7: Strictly enforce exclusivity for the “details” ele...
sideshowbarker
noreply at github.com
Mon Oct 9 20:29:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 672fe76f367734e84b2bad012b9676281f813d71
https://github.com/WebKit/WebKit/commit/672fe76f367734e84b2bad012b9676281f813d71
Author: Michael[tm] Smith <mike at w3.org>
Date: 2023-10-09 (Mon, 09 Oct 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.html
R LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative-expected.txt
R LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/dom/ContainerNode.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Node.cpp
A Source/WebCore/dom/ShouldNotFireMutationEventsScope.h
M Source/WebCore/html/HTMLDetailsElement.cpp
M Source/WebCore/html/HTMLDetailsElement.h
Log Message:
-----------
Strictly enforce exclusivity for the “details” element “name” attribute
https://bugs.webkit.org/show_bug.cgi?id=262187
Reviewed by Darin Adler.
This adds the necessary changes to bring WebKit into full conformance
with the spec change in https://github.com/whatwg/html/commit/e0cf318.
In particular, this commit implements the requirements of the “ensure
details exclusivity by closing the given element if needed” algorithm at
https://html.spec.whatwg.org/#ensure-details-exclusivity-by-closing-the-given-element-if-needed
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute-expected.txt:
Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.html:
Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html.
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
Add ShouldNotFireMutationEventsScope.h
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::setIsExpanded):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isExpanded const):
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeNodeWithScriptAssertion):
Only call dispatchChildRemovalEvents() if document.shouldNotFireMutationEvents() is false.
* Source/WebCore/dom/Document.h:
(WebCore::Document::shouldNotFireMutationEvents const):
(WebCore::Document::setShouldNotFireMutationEvents):
Added shouldNotFireMutationEvents() and setShouldNotFireMutationEvents()
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::dispatchSubtreeModifiedEvent):
Return early from dispatchSubtreeModifiedEvent() if document.shouldNotFireMutationEvents() is true.
* Source/WebCore/dom/ShouldNotFireMutationEventsScope.h: Added.
(WebCore::ShouldNotFireMutationEventsScope::ShouldNotFireMutationEventsScope):
(WebCore::ShouldNotFireMutationEventsScope::~ShouldNotFireMutationEventsScope):
* Source/WebCore/html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
(WebCore::HTMLDetailsElement::attributeChanged):
(WebCore::HTMLDetailsElement::insertedIntoAncestor):
(WebCore::HTMLDetailsElement::otherElementsInNameGroup):
(WebCore::HTMLDetailsElement::ensureDetailsExclusivityAfterMutation):
(WebCore::HTMLDetailsElement::toggleOpen):
* Source/WebCore/html/HTMLDetailsElement.h:
Canonical link: https://commits.webkit.org/269127@main
More information about the webkit-changes
mailing list