Add invoketarget & invokeaction attributes#18794
Conversation
|
EWS run on previous version of this PR (hash 8598b9f) Details |
|
EWS run on previous version of this PR (hash f10ca30) Details |
|
EWS run on previous version of this PR (hash fab3ae1) Details |
|
EWS run on previous version of this PR (hash c627d9d) Details |
|
EWS run on previous version of this PR (hash ae68448) Details |
|
EWS run on previous version of this PR (hash 5a6c0c7) Details |
|
EWS run on previous version of this PR (hash 940b8cb) Details |
|
EWS run on previous version of this PR (hash 8a7530f) Details |
|
EWS run on previous version of this PR (hash b9b87d2) Details |
|
Going to mark this as ready for review to get some feedback on direction. There's no spec yet for this feature - happy to go write that first if necessary. /cc @lindseywild @nt1m |
|
EWS run on previous version of this PR (hash 991d91c) Details |
|
EWS run on previous version of this PR (hash cf13d2f) Details |
nt1m
left a comment
There was a problem hiding this comment.
There's some iOS stuff to rebaseline, but in general this looks OK.
Can you change the commit title to "Add invoketarget & invokeaction attributes"
cf13d2f to
55578c2
Compare
|
EWS run on previous version of this PR (hash 55578c2) Details |
55578c2 to
708a342
Compare
|
EWS run on previous version of this PR (hash 708a342) Details |
708a342 to
4547842
Compare
|
EWS run on current version of this PR (hash 4547842) Details |
|
Safe-Merge-Queue: Build #5022. |
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@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
4547842 to
de91640
Compare
|
Committed 271428@main (de91640): https://commits.webkit.org/271428@main Reviewed commits have been landed. Closing PR #18794 and removing active labels. |
de91640
4547842