Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cc84d838c54ffb5a424cbea22c15f3fe1ac09cf1
https://github.com/WebKit/WebKit/commit/cc84d838c54ffb5a424cbea22c15f3fe1ac09cf1
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2026-09-05 (Sat, 05 Sep 2026)
Changed paths:
M Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageMouseEventsTests.swift
Log Message:
-----------
[Swift Testing] WebPage.mouseMove(to:) does not deliver mouse moves to the
page
https://bugs.webkit.org/show_bug.cgi?id=323489
rdar://186724077
Reviewed by Richard Robinson.
In 312960@main, we taught WebPage.mouseMove(to:) to send -mouseMoved: to
the backing web view, but WKWebView does not override that selector.
Instead, WKWebView utilizes tracking areas to drive mouseMove events,
which rendered the helper a no-op. To work around this, we simply re-use
the established precedent of _simulateMouseMove:, which calls directly
into WebViewImpl::mouseMoved(), and is used by other test harness code.
Test:
WebPageMouseEventsTests/mouseMoveFiresMouseMoveHandler
WebPageMouseEventsTests/sendingMouseMovedToWebViewDoesNotReachPage
* Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift:
(mouseMove(to:flags:)):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageMouseEventsTests.swift:
(KeyWindow.isKeyWindow):
To facilitate testing mouse move delivery, we need the web view to be
in a window that is key. We introduce `KeyWindow`, a helper NSWindow
subclass, to facilitate this, by having this class unconditionally
claim key status (a la TestWKWebViewHostWindow).
(WebPageMouseEventsTests.mouseMoveFiresMouseMoveHandler):
(WebPageMouseEventsTests.sendingMouseMovedToWebViewDoesNotReachPage):
(WebPageMouseEventsTests.loadMouseMoveRecorder):
(WebPageMouseEventsTests.recordedMoves):
Canonical link: https://commits.webkit.org/320560@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications