[webkit-changes] [WebKit/WebKit] 0e2f71: only dispatch valid invoke actions

Keith Cirkel noreply at github.com
Tue May 7 03:28:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0e2f71722daa1d2746d0feb18b74e15808b11892
      https://github.com/WebKit/WebKit/commit/0e2f71722daa1d2746d0feb18b74e15808b11892
  Author: Keith Cirkel <webkit at keithcirkel.co.uk>
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invoketarget-button-event-dispatch.tentative-expected.txt
    M Source/WebCore/dom/Element.h
    M Source/WebCore/html/HTMLElement.cpp
    M Source/WebCore/html/HTMLElement.h
    M Source/WebCore/html/HTMLFormControlElement.cpp
    M Source/WebCore/html/HTMLFormControlElement.h

  Log Message:
  -----------
  only dispatch valid invoke actions
https://bugs.webkit.org/show_bug.cgi?id=272307

Reviewed by Tim Nguyen.

This changes `invokeAction` to return an enum of valid invoke
actions/sentinel values like `custom`, which can then be used to guard
event dispatching code, preventing dispatch for invalid actions.

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/invokers/invoketarget-button-event-dispatch.tentative-expected.txt:
* Source/WebCore/dom/Element.h:
(WebCore::Element::isValidInvokeAction):
(WebCore::Element::handleInvokeInternal):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::isValidInvokeAction):
(WebCore::HTMLElement::handleInvokeInternal):
* Source/WebCore/html/HTMLElement.h:
* Source/WebCore/html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::invokeAction const):
(WebCore::HTMLFormControlElement::handleInvokeAction):
* Source/WebCore/html/HTMLFormControlElement.h:

Canonical link: https://commits.webkit.org/278450@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list