Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 45eb2273a9e99ac5b72763e27f567d87773a1eea
      
https://github.com/WebKit/WebKit/commit/45eb2273a9e99ac5b72763e27f567d87773a1eea
  Author: Karl Dubost <[email protected]>
  Date:   2026-09-17 (Thu, 17 Sep 2026)

  Changed paths:
    A 
LayoutTests/fast/events/touch/ios/content-observation/mouse-out-event-on-click-should-move-hover-to-parent-expected.txt
    A 
LayoutTests/fast/events/touch/ios/content-observation/mouse-out-event-on-click-should-move-hover-to-parent.html
    M Source/WebCore/page/EventHandler.h
    M Source/WebCore/page/cocoa/EventHandlerCocoa.mm
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm

  Log Message:
  -----------
  [Quirks] Adjust needsYouTubeMouseOutQuirk to be compatible with YouTube 
Controls
https://bugs.webkit.org/show_bug.cgi?id=324397
rdar://187546739

Reviewed by Brent Fulgham.

Tapping pause on youtube.com on an iPad takes the control bar away with
it, and there is nothing left on screen to tap to resume. On macOS the
bar stays up for about three seconds.

After a tap becomes a click we dispatch a synthetic mouseout to dismiss
the button's tooltip. That is needsYouTubeMouseOutQuirk, added in bug
195575 and narrowed to youtube.com in bug 199497.
dispatchSyntheticMouseOut moved the hovered element to nullptr, which
says the pointer left the document, not just the button. YouTube reads
it that way and hides its controls. On the iPad the bar is gone 7ms
before the video reports that it paused.

This patch moves the hover to the tapped node's parent instead. The
button still gets its mouseout so the tooltip still goes, and the event
now carries a relatedTarget, with the matching mouseover on the parent.

The disconnected case is unchanged. When the tapped node has been taken
out of the document by its own click handler there is no parent to move
to, and mousemove-after-synthetic-click-quirk.html relies on the hover
being cleared there.

Test: 
fast/events/touch/ios/content-observation/mouse-out-event-on-click-should-move-hover-to-parent.html

* 
LayoutTests/fast/events/touch/ios/content-observation/mouse-out-event-on-click-should-move-hover-to-parent-expected.txt:
 Added.
* 
LayoutTests/fast/events/touch/ios/content-observation/mouse-out-event-on-click-should-move-hover-to-parent.html:
 Added.
* Source/WebCore/page/EventHandler.h:
* Source/WebCore/page/cocoa/EventHandlerCocoa.mm:
(WebCore::EventHandler::dispatchSyntheticMouseOut):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::completeSyntheticClick):

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



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

Reply via email to