[webkit-changes] [WebKit/WebKit] 82f024: Interaction regions don't update when event listen...
Tim Horton
noreply at github.com
Tue Dec 6 17:35:01 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 82f024ac0b5757189369a944edc20f08c4b7a1ef
https://github.com/WebKit/WebKit/commit/82f024ac0b5757189369a944edc20f08c4b7a1ef
Author: Tim Horton <timothy_horton at apple.com>
Date: 2022-12-06 (Tue, 06 Dec 2022)
Changed paths:
A LayoutTests/interaction-region/click-handler-dynamically-added-expected.txt
A LayoutTests/interaction-region/click-handler-dynamically-added.html
A LayoutTests/interaction-region/click-handler-dynamically-removed-expected.txt
A LayoutTests/interaction-region/click-handler-dynamically-removed.html
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/EventNames.h
M Source/WebCore/dom/Node.cpp
M Source/WebCore/dom/Node.h
M Source/WebCore/html/HTMLElement.cpp
M Source/WebCore/html/HTMLElement.h
Log Message:
-----------
Interaction regions don't update when event listeners change without rendering updates
https://bugs.webkit.org/show_bug.cgi?id=248804
Reviewed by Aditya Keerthi.
* LayoutTests/interaction-region/click-handler-dynamically-added-expected.txt: Added.
* LayoutTests/interaction-region/click-handler-dynamically-added.html: Added.
* LayoutTests/interaction-region/click-handler-dynamically-removed-expected.txt: Added.
* LayoutTests/interaction-region/click-handler-dynamically-removed.html: Added.
Add some tests for both dynamic addition and removal of event listeners.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::httpEquivPolicy const):
Move this so it's not in the middle of event-related code.
(WebCore::Document::didAddOrRemoveMouseEventHandler):
Add a method that invalidates style when mouse event handlers change.
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/EventNames.h:
(WebCore::EventNames::isMouseClickRelatedEventType const):
(WebCore::EventNames::isMouseMoveRelatedEventType const):
Add methods for click and move related events.
* Source/WebCore/dom/Node.cpp:
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::willRespondToMouseMoveEvents const):
(WebCore::Node::willRespondToMouseClickEventsWithEditability const):
(WebCore::Node::willRespondToMouseWheelEvents const): Deleted.
Adopt EventNames methods instead of hardcoded name checks.
Call didAddOrRemoveMouseEventHandler when relevant.
* Source/WebCore/dom/Node.h:
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::willRespondToMouseWheelEvents const): Deleted.
* Source/WebCore/html/HTMLElement.h:
Remove the unused willRespondToMouseWheelEvents.
Canonical link: https://commits.webkit.org/257453@main
More information about the webkit-changes
mailing list