Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename Invokers features from invoke to command
https://bugs.webkit.org/show_bug.cgi?id=276616 Reviewed by NOBODY (OOPS!). This renames the attributes invoketarget->commandfor and invokeaction->command, as well as renaming the InvokeEvent to CommandEvent, and it's action property to command. It also drops the `auto` action, requiring explicit `command` attribute for each action. Lastly, this also adds the logic preventing invokers from being triggered within a form without an explicit type=button attribute. These changes are based on a set of discussions around the proposals naming and semantics, which starts here: whatwg/html#9625 (comment) and concludes here; whatwg/html#9625 (comment) * 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: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invoketarget-on-dialog-behavior.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invoketarget-on-popover-behavior.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invoketarget-on-popover-invalid-behavior.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/SmartPointerExpectations/UncountedLocalVarsCheckerExpectations: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: * Source/WebCore/dom/CommandEvent.cpp: Renamed from Source/WebCore/dom/InvokeEvent.cpp. (WebCore::CommandEvent::CommandEvent): (WebCore::CommandEvent::create): (WebCore::CommandEvent::createForBindings): (WebCore::CommandEvent::isCommandEvent const): (WebCore::CommandEvent::invoker const): * Source/WebCore/dom/CommandEvent.h: Renamed from Source/WebCore/dom/InvokeEvent.h. * Source/WebCore/dom/CommandEvent.idl: Renamed from Source/WebCore/dom/InvokeEvent.idl. * Source/WebCore/dom/Document.cpp: (WebCore::Document::handlePopoverLightDismiss): * Source/WebCore/dom/Element.cpp: (WebCore::Element::isElementReflectionAttribute): * Source/WebCore/dom/Element.h: (WebCore::Element::isValidCommandType): (WebCore::Element::handleCommandInternal): (WebCore::Element::isValidInvokeAction): Deleted. (WebCore::Element::handleInvokeInternal): Deleted. * Source/WebCore/dom/Event.h: (WebCore::Event::isCommandEvent const): (WebCore::Event::isInputEvent const): (WebCore::Event::isInvokeEvent const): Deleted. * Source/WebCore/dom/EventInterfaces.in: * Source/WebCore/dom/EventNames.json: * Source/WebCore/html/HTMLAttributeNames.in: * Source/WebCore/html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::defaultEventHandler): * Source/WebCore/html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::isValidCommandType): (WebCore::HTMLDialogElement::handleCommandInternal): (WebCore::HTMLDialogElement::isValidInvokeAction): Deleted. (WebCore::HTMLDialogElement::handleInvokeInternal): Deleted. * Source/WebCore/html/HTMLDialogElement.h: * Source/WebCore/html/HTMLElement.cpp: (WebCore::HTMLElement::isValidCommandType): (WebCore::HTMLElement::handleCommandInternal): (WebCore::HTMLElement::isValidInvokeAction): Deleted. (WebCore::HTMLElement::handleInvokeInternal): Deleted. * Source/WebCore/html/HTMLElement.h: * Source/WebCore/html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::commandForElement const): (WebCore::HTMLFormControlElement::commandType const): (WebCore::HTMLFormControlElement::handleCommand): (WebCore::HTMLFormControlElement::invokeTargetElement const): Deleted. (WebCore::HTMLFormControlElement::invokeAction const): Deleted. (WebCore::HTMLFormControlElement::handleInvokeAction): Deleted. * Source/WebCore/html/HTMLFormControlElement.h: * Source/WebCore/html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): * Source/WebCore/html/InvokerElement.idl: * Source/WebCore/page/FragmentDirective.h:
- Loading branch information