Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d208ef00a2289c1f7c4d675a8f11f191ff458bb7
      
https://github.com/WebKit/WebKit/commit/d208ef00a2289c1f7c4d675a8f11f191ff458bb7
  Author: Dana Estra <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M Source/WebCore/page/EventHandler.cpp
    M Source/WebCore/page/EventHandler.h
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  -----------
  Mouse events should be fired when window moves out from underneath the cursor
https://bugs.webkit.org/show_bug.cgi?id=304361
rdar://161493924

Reviewed by Lily Spiniolas.

When the window moves and the cursor is stationary, such as when 
entering/exiting
fullscreen, we do not dispatch mouse events. tv.youtube.com and nba.com add 
mouse
event listeners to their fullscreen button, inside which they show and
hide a text description of the button. When they enter fullscreen, the button 
moves
out from under the cursor, but we do not dispatch a mouseleave or mouseout 
event,
so the label remains showing.

To fix this, when the window changes, WebPageProxy should pass to EventHandler 
via
EventHandler::setLastKnownMousePosition the new mouse position, and then call
EventHandler::updateMouseEventTargetAfterLayout to trigger a mouse event.

Will add test in later patch.

* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::setLastKnownMousePosition):
* Source/WebCore/page/EventHandler.h:
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
(WebKit::WebPageProxy::updateMouseEventTargetAfterWindowAndViewFramesChanged):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
(WebKit::WebPageProxy::updateMouseEventTargetAfterWindowAndViewFramesChanged):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setLastKnownMousePosition):
(WebKit::WebPage::windowAndViewFramesChanged):
(WebKit::WebPage::updateMouseEventTargetAfterWindowAndViewFramesChanged):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

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



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

Reply via email to