Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ce2bebc6a7aa4cc6dff7101c531442d2f5b4ac46
https://github.com/WebKit/WebKit/commit/ce2bebc6a7aa4cc6dff7101c531442d2f5b4ac46
Author: Wenson Hsieh <[email protected]>
Date: 2024-11-07 (Thu, 07 Nov 2024)
Changed paths:
A
LayoutTests/fast/events/touch/ios/content-observation/add-mouseout-event-listener-on-hover-expected.txt
A
LayoutTests/fast/events/touch/ios/content-observation/add-mouseout-event-listener-on-hover.html
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Node.cpp
M Source/WebCore/page/ios/ContentChangeObserver.cpp
M Source/WebCore/page/ios/ContentChangeObserver.h
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Log Message:
-----------
[iPad] store.steampowered.com: Navigation bar doesn’t reveal drop down menus
when tapped
https://bugs.webkit.org/show_bug.cgi?id=282763
rdar://89114638
Reviewed by Richard Robinson and Alan Baradlay.
When tapping items in the top navigation menu on store.steampowered.com, the
page reveals a hover
menu with more links. This currently manages to bypass all existing content
change observation
heuristics, leading to a `click` event being dispatched to the page after
`hover`.
At the same time, Steam also adds a click event handler that *dismisses* the
open menu when handling
mouse hover. The end result is that Steam schedules logic to begin revealing
the menu when handling
`mouseover`, and then immediately dismisses the menu when handling the
synthetic `click` event ~32
ms later.
To fix this, we make a small adjustment to `ContentChangeObserver`, so that we
recognize the tap
gesture on these menus on steampowered.com as *only* a mouse hover, rather than
clicking. While
there isn't any significant visual change in response to the hover event, we
can detect that the
page adds a `mouseout` event listener to a container of the click target during
the scope of content
change observation, which is a fairly strong signal that the page intends to
know when the mouse has
exited the click target.
*
LayoutTests/fast/events/touch/ios/content-observation/add-mouseout-event-listener-on-hover-expected.txt:
Added.
*
LayoutTests/fast/events/touch/ios/content-observation/add-mouseout-event-listener-on-hover.html:
Added.
Add a test case to exercise this heuristic.
* Source/WebCore/dom/Document.h:
(WebCore::Document::contentChangeObserverIfExists):
* Source/WebCore/dom/Node.cpp:
(WebCore::tryAddEventListener):
* Source/WebCore/page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::reset):
(WebCore::ContentChangeObserver::didAddMouseMoveRelatedEventListener):
(WebCore::ContentChangeObserver::adjustObservedState):
* Source/WebCore/page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::setClickTarget):
Store the current click target (`nodeRespondingToClick`) on the content change
observer, so that we
can check against it when observing any event handlers being added on the fly
during content
observation.
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
Canonical link: https://commits.webkit.org/286320@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes