[webkit-changes] [WebKit/WebKit] de9164: Add invoketarget & invokeaction attributes
Lindsey Wild
noreply at github.com
Sat Dec 2 08:08:58 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: de91640478c442925d7cd283f91f1d1e334d1d77
https://github.com/WebKit/WebKit/commit/de91640478c442925d7cd283f91f1d1e334d1d77
Author: Lindsey Wild <lindseywild at github.com>
Date: 2023-12-02 (Sat, 02 Dec 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/idlharness.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invokeelement-interface.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invokeevent-dispatch-shadow.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invokeevent-interface.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invoketarget-button-event-dispatch.tentative-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Event.h
M Source/WebCore/dom/EventNames.h
M Source/WebCore/dom/EventNames.in
A Source/WebCore/dom/InvokeEvent.cpp
A Source/WebCore/dom/InvokeEvent.h
A Source/WebCore/dom/InvokeEvent.idl
M Source/WebCore/html/HTMLAttributeNames.in
M Source/WebCore/html/HTMLButtonElement.cpp
M Source/WebCore/html/HTMLButtonElement.idl
M Source/WebCore/html/HTMLElement.h
M Source/WebCore/html/HTMLFormControlElement.cpp
M Source/WebCore/html/HTMLFormControlElement.h
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLInputElement.idl
A Source/WebCore/html/InvokerElement.idl
Log Message:
-----------
Add invoketarget & invokeaction attributes
https://bugs.webkit.org/show_bug.cgi?id=262850
Reviewed by Tim Nguyen.
This adds support for the experimental `invoketarget` and `invokeaction`
attributes, as specified in the open-ui "Invokers" explainer.
(https://open-ui.org/components/invokers.explainer/)
The `invoketarget` attribute maps to the IDL `invokeTargetElement`,
similar to `popoverTargetElement`, and the `invokeaction` is a freeform
string.
The Button behaviour checks for `invokeTargetElement` in its activation
behaviour, and dispatches an `InvokeEvent` if there is one.
This also adds some basic scaffolding for `handleInvokeInternal` which
will allow elements to provide their own invocation action algorithms.
Co-authored-by: Keith Cirkel <keithamus at users.noreply.github.com>
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/idlharness.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invokeelement-interface.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invokeevent-dispatch-shadow.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invokeevent-interface.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invoketarget-button-event-dispatch.tentative-expected.txt:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::isElementReflectionAttribute):
* Source/WebCore/dom/Event.h:
(WebCore::Event::isInvokeEvent const):
* Source/WebCore/dom/EventNames.h:
* Source/WebCore/dom/EventNames.in:
* Source/WebCore/dom/InvokeEvent.cpp: Added.
(WebCore::InvokeEvent::InvokeEvent):
(WebCore::InvokeEvent::create):
(WebCore::InvokeEvent::createForBindings):
(WebCore::InvokeEvent::eventInterface const):
(WebCore::InvokeEvent::isInvokeEvent const):
(WebCore::InvokeEvent::invoker const):
* Source/WebCore/dom/InvokeEvent.h: Added.
* Source/WebCore/dom/InvokeEvent.idl: Added.
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::defaultEventHandler):
* Source/WebCore/html/HTMLButtonElement.idl:
* Source/WebCore/html/HTMLElement.h:
(WebCore::HTMLElement::handleInvokeInternal):
* Source/WebCore/html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::invokeTargetElement const):
(WebCore::HTMLFormControlElement::invokeAction const):
(WebCore::HTMLFormControlElement::setInvokeAction):
(WebCore::HTMLFormControlElement::handleInvokeAction):
* Source/WebCore/html/HTMLFormControlElement.h:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):
* Source/WebCore/html/HTMLInputElement.idl:
* Source/WebCore/html/InvokerElement.idl: Added.
Canonical link: https://commits.webkit.org/271428@main
More information about the webkit-changes
mailing list