Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a080b72f41e32c392811ef191c8c2a96e7560e38
      
https://github.com/WebKit/WebKit/commit/a080b72f41e32c392811ef191c8c2a96e7560e38
  Author: Megan Gardner <megan_gard...@apple.com>
  Date:   2025-08-06 (Wed, 06 Aug 2025)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/mouse-events/iframes-with-tooltips-expected.txt
    A 
LayoutTests/http/tests/site-isolation/mouse-events/iframes-with-tooltips.html
    A 
LayoutTests/http/tests/site-isolation/mouse-events/resources/tooltip-subframe-a.html
    A 
LayoutTests/http/tests/site-isolation/mouse-events/resources/tooltip-subframe-b.html
    M Source/WebCore/page/EventHandler.cpp
    M Source/WebKit/Shared/WebHitTestResultData.cpp
    M Source/WebKit/Shared/WebHitTestResultData.h
    M Source/WebKit/Shared/WebHitTestResultData.serialization.in
    M Source/WebKit/UIProcess/API/APIUIClient.h
    M Source/WebKit/UIProcess/API/C/WKPage.cpp
    M Source/WebKit/UIProcess/API/C/WKPageUIClient.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
    M Tools/WebKitTestRunner/TestController.cpp
    M Tools/WebKitTestRunner/TestController.h
    M Tools/WebKitTestRunner/TestInvocation.cpp
    M Tools/WebKitTestRunner/TestInvocation.h

  Log Message:
  -----------
  [Site Isolation] Make tooltips work with site isolation.
https://bugs.webkit.org/show_bug.cgi?id=296930
rdar://155247419

Reviewed by Abrar Rahman Protyasha.

This is the fix and a test for tooltips to work correctly
with site isolation.

The fix is in EventHandler.cpp. In order to make sure that
mouse events get to the right process, currently first send
the event to the main frame web-process. If we are triggering in
a sub-frame, that information is passed onto a subframe in
the remoteUserInputEventData. If we have that data then we
know that the information is destined to head to another
process and we should not finish processing this
event in the main frame web process and returing to the
UI process. This check is all we need to circumvent
that.

Many of the rest of the changes are fixing capitalization of
toolTips to tooltips.

The rest is the plumbing needed to write a proper test.
Our current tooltip tests work by merely asking the web
process what tooltip we would expect for an element. That
is basically useless in a site isolated world. I have
added C API to allow for the passing back of the current
tooltip string when the tooltip changes. This is C API
only since the only use is for testing.

* 
LayoutTests/http/tests/site-isolation/mouse-events/iframes-with-tooltips-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/mouse-events/iframes-with-tooltips.html: 
Added.
* 
LayoutTests/http/tests/site-isolation/mouse-events/resources/tooltip-subframe-a.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/mouse-events/resources/tooltip-subframe-b.html:
 Added.
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::mouseMoved):
* Source/WebKit/Shared/WebHitTestResultData.cpp:
(WebKit::WebHitTestResultData::WebHitTestResultData):
* Source/WebKit/Shared/WebHitTestResultData.h:
* Source/WebKit/Shared/WebHitTestResultData.serialization.in:
* Source/WebKit/UIProcess/API/APIUIClient.h:
(API::UIClient::tooltipDidChange):
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* Source/WebKit/UIProcess/API/C/WKPageUIClient.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mouseDidMoveOverElement):
(WebKit::WebPageProxy::setToolTip):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::handleContextMenuLookUpImage):
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::tooltipDidChange):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::setTooltipDidChangeCallback):
(WTR::TestController::tooltipDidChange):
(WTR::TestController::createOtherPlatformWebView):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::runTest):
(WTR::TestController::didReceiveAsyncMessageFromInjectedBundle):
* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to