Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dc2b216b9f0f9e15edeae2f97b3c2149e3e0bbe7
      
https://github.com/WebKit/WebKit/commit/dc2b216b9f0f9e15edeae2f97b3c2149e3e0bbe7
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2025-10-28 (Tue, 28 Oct 2025)

  Changed paths:
    A 
LayoutTests/fast/events/touch/ios/double-tap-for-double-click-on-window-expected.txt
    A 
LayoutTests/fast/events/touch/ios/double-tap-for-double-click-on-window.html
    M Source/WebCore/page/DOMWindow.h
    M Source/WebCore/page/ios/FrameIOS.mm
    M Source/WebKit/Shared/ios/InteractionInformationAtPosition.h
    M Source/WebKit/Shared/ios/InteractionInformationAtPosition.serialization.in
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [iOS] Double tap does not result in dblclick event dispatch even when the 
Window object has a listener
https://bugs.webkit.org/show_bug.cgi?id=301558
rdar://162546881

Reviewed by Ryosuke Niwa.

Currently, we walk up the DOM tree from our hit test point to determine
whether any node requires dblclick dispatch.

However, in the case that _only_ the Window object has a dblclick event
listener, we think there is no node responding to double click events,
because the Window object does not show up in the node traversal logic
in LocalFrame::nodeRespondingToDoubleClickEvent().

In this patch, we address this shortcoming by introducing some special
casing for Window. After checking for an appropriate target node (for
dblclick dispatch), we now apply the same logic for Window.

Test: fast/events/touch/ios/double-tap-for-double-click-on-window.html

* 
LayoutTests/fast/events/touch/ios/double-tap-for-double-click-on-window-expected.txt:
 Added.
* LayoutTests/fast/events/touch/ios/double-tap-for-double-click-on-window.html: 
Added.
* Source/WebCore/page/DOMWindow.h:
* Source/WebCore/page/ios/FrameIOS.mm:
(WebCore::LocalFrame::qualifyingNodeAtViewportLocation):
Drive-by rewrite: nullptr is clearer than 0 at the callsite about what
kind of data we are passing in.

* Source/WebKit/Shared/ios/InteractionInformationAtPosition.h:
* Source/WebKit/Shared/ios/InteractionInformationAtPosition.serialization.in:
Now that the InteractionInformationAtPosition structure captures more
than just "can the hit tested node respond to dblclick events", we
rename the flag to `hitNodeOrWindowHasDoubleClickListener`. This
reflects the expanded scope of the bit.

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizerShouldBegin:]):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::windowWithDoubleClickEventListener):
(WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint):
(WebKit::WebPage::positionInformation):

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



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

Reply via email to