Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6758aef56be9e945d503825d08065038c9995fee
      
https://github.com/WebKit/WebKit/commit/6758aef56be9e945d503825d08065038c9995fee
  Author: Alex Christensen <[email protected]>
  Date:   2025-05-05 (Mon, 05 May 2025)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/touch-events/resources/post-message-click-coordinates.html
    A 
LayoutTests/http/tests/site-isolation/touch-events/touch-click-coordinates-expected.txt
    A 
LayoutTests/http/tests/site-isolation/touch-events/touch-click-coordinates.html
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/page/EventHandler.cpp
    M Source/WebCore/page/EventHandler.h
    A Source/WebCore/page/RemoteFrameGeometryTransformer.cpp
    A Source/WebCore/page/RemoteFrameGeometryTransformer.h
    M Source/WebCore/page/SecurityOriginData.cpp
    M Source/WebCore/page/ios/EventHandlerIOS.mm
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/DerivedSources-input.xcfilelist
    M Source/WebKit/DerivedSources.make
    M Source/WebKit/Shared/NativeWebTouchEvent.h
    A Source/WebKit/Shared/RemoteWebTouchEvent.h
    A Source/WebKit/Shared/RemoteWebTouchEvent.serialization.in
    M Source/WebKit/Shared/WebTouchEvent.cpp
    M Source/WebKit/Shared/WebTouchEvent.h
    M Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
    M Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
    M Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
    M Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/UIProcess/playstation/PageClientImpl.cpp
    M Source/WebKit/UIProcess/playstation/PageClientImpl.h
    M Source/WebKit/UIProcess/win/PageClientImpl.cpp
    M Source/WebKit/UIProcess/win/PageClientImpl.h
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp
    M Source/WebKit/WebProcess/WebPage/EventDispatcher.h
    M Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  Clicks derived from touch events should go to correct process with site 
isolation on
https://bugs.webkit.org/show_bug.cgi?id=292460
rdar://150554734

Reviewed by Wenson Hsieh.

This fixes two issues with touch events on iOS with site isolation on.

First, 270954@main introduced the transformation of WebTouchEvent.position but 
the
other properties such as m_touchPoints were not transformed to the correct 
coordinate
space, causing most of the event to happen at the wrong location.

Second, WebPageProxy::potentialTapAtPosition and 
WebPageProxy::commitPotentialTap
were only sending to the main frame process, resulting in 
WebPage::handleSyntheticClick
only happening if we tapped on something in the main frame process.  I made 
this work
by doing something similar to what we do for other types of events: checking if 
we hit
a RemoteFrame, and if we do, tell the UI process to transform the event and 
forward
it to the correct process.  In order for WebCore to do transforming that will 
happen
in WebKit, I introduce RemoteFrameGeometryTransformer.

This implements the first half of rdar://148462813 with drag events still not 
working.

* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/RemoteWebTouchEvent.h: Copied from 
Source/WebKit/Shared/WebTouchEvent.cpp.
* Source/WebKit/Shared/RemoteWebTouchEvent.serialization.in: Added.
* Source/WebKit/Shared/WebTouchEvent.cpp:
(WebKit::WebTouchEvent::translateBy):
(WebKit::WebPlatformTouchPoint::translateBy):
* Source/WebKit/Shared/WebTouchEvent.h:
(WebKit::WebTouchEvent::setPosition): Deleted.
* Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent):
* Source/WebKit/UIProcess/API/gtk/PageClientImpl.h:
* Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent):
* Source/WebKit/UIProcess/API/wpe/PageClientImpl.h:
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sendPreventableTouchEvent):
(WebKit::WebPageProxy::handlePreventableTouchEvent):
(WebKit::WebPageProxy::sendUnpreventableTouchEvent):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::doneWithTouchEvent):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _touchEventsRecognized]):
(-[WKContentView _touchEvent:preventsNativeGestures:]):
(-[WKContentView _singleTapIdentified:]):
(-[WKContentView _singleTapRecognized:]):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::potentialTapAtPosition):
(WebKit::WebPageProxy::commitPotentialTap):
(WebKit::WebPageProxy::didReleaseAllTouchPoints):
* Source/WebKit/UIProcess/playstation/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent):
* Source/WebKit/UIProcess/playstation/PageClientImpl.h:
* Source/WebKit/UIProcess/win/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent):
* Source/WebKit/UIProcess/win/PageClientImpl.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::localRootFrame):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::didFinishContentChangeObserving):
(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::attemptSyntheticClick):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::potentialTapAtPosition):
(WebKit::WebPage::commitPotentialTap):
(WebKit::WebPage::commitPotentialTapFailed):

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



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

Reply via email to