Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4af3d6f6ef684cd3330948538aa51ed0dccef313
https://github.com/WebKit/WebKit/commit/4af3d6f6ef684cd3330948538aa51ed0dccef313
Author: Alice Boxhall <[email protected]>
Date: 2025-02-13 (Thu, 13 Feb 2025)
Changed paths:
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/bindings/js/JSElementCustom.cpp
M Source/WebCore/bindings/js/JSElementInternalsCustom.cpp
M Source/WebCore/bindings/scripts/CodeGenerator.pm
M Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ElementInternals.cpp
M Source/WebCore/dom/ElementInternals.h
M Source/WebCore/html/FormListedElement.cpp
M Source/WebCore/html/HTMLButtonElement.cpp
M Source/WebCore/html/HTMLFormControlElement.cpp
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLLabelElement.cpp
Log Message:
-----------
Split getElement{,sArray}Attribute into internal/bindings versions.
https://bugs.webkit.org/show_bug.cgi?id=287538
Reviewed by Ryosuke Niwa.
After referenceTarget is implemented, the internal version may return elements
within shadow roots, while the bindings version will ensure there is no leak of
elements out of shadow roots.
This change also switches to using Element::getElementForAttributeInternal()
and Element::getElementsArrayForAttributeInternal() instead of
TreeScope::getElementById() for resolving form association based on the
`form` attribute, label association using the `for` attribute, and list
association using the `list` attribute.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::addRelation):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::elementsFromAttribute const):
* Source/WebCore/bindings/js/JSElementCustom.cpp:
(WebCore::getElementsArrayAttribute):
* Source/WebCore/bindings/js/JSElementInternalsCustom.cpp:
(WebCore::getElementsArrayAttribute):
* Source/WebCore/bindings/scripts/CodeGenerator.pm:
(GetterExpression):
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObj_reflectedElementAttrGetter):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::elementForAttributeInternal const):
(WebCore::Element::getElementAttributeForBindings const):
(WebCore::Element::elementsArrayForAttributeInternal const):
(WebCore::Element::getElementsArrayAttributeForBindings const):
(WebCore::Element::getElementAttribute const): Deleted.
(WebCore::Element::getElementsArrayAttribute const): Deleted.
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/ElementInternals.cpp:
(WebCore::ElementInternals::getElementAttributeForBindings const):
(WebCore::ElementInternals::getElementsArrayAttributeForBindings const):
(WebCore::ElementInternals::getElementAttribute const): Deleted.
(WebCore::ElementInternals::getElementsArrayAttribute const): Deleted.
* Source/WebCore/dom/ElementInternals.h:
* Source/WebCore/html/FormListedElement.cpp:
(WebCore::findAssociatedForm):
* Source/WebCore/html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::commandForElement const):
* Source/WebCore/html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::popoverTargetElement const):
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::dataList const):
* Source/WebCore/html/HTMLLabelElement.cpp:
(WebCore::elementForAttributeIfLabelable):
(WebCore::HTMLLabelElement::control const):
(WebCore::firstElementWithIdIfLabelable): Deleted.
Canonical link: https://commits.webkit.org/290360@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes