Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ac6ea44985584632f7154dfe7628cb2cb7ff406b
      
https://github.com/WebKit/WebKit/commit/ac6ea44985584632f7154dfe7628cb2cb7ff406b
  Author: Phipson Lee <phipsonle...@gmail.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WebKit/stagemode-model-page.html
    M Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm
    M Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h
    M Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm

  Log Message:
  -----------
  Add Unit Test Support for StageMode Interaction
https://bugs.webkit.org/show_bug.cgi?id=287943
rdar://145113469

Reviewed by Wenson Hsieh.

This PR adds support for unit tests for stagemode interaction. It leverages 
existing APIs for Drag and Drop
but adds additional calls to simulate the pan gesture recognizer for model 
interaction. Subsequent PRs will
be made to add additional support for testing correct behavior when mapping XY 
translation to rotation.

* Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _simulatePanGestureBeginAtPoint:]):
(-[WKWebView _simulatePanGestureUpdateAtPoint:]):
(-[WKWebView _stageModeInfoForTesting]):
- Adds calls into the WKContentView to start and update the pan gesture
- Also adds a call to fetch information about the stageModeSession packaged as 
a dictionary

* Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(TestWebKitAPI::TEST(DragAndDropTests, IgnoreHitTestStageModeModel)):
(TestWebKitAPI::TEST(DragAndDropTests, CanHitTestStageModeModel)):
- Adds unit tests to verify whether the returned information for stage mode is 
correct based on hit-testing

* Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator hitTestForStageModeAt:]):
(-[DragAndDropSimulator awaitingStageModeHitResult]):
(-[DragAndDropSimulator stageModeHitTestValidModel]):
- Adds additional APIs to the simulator to call into the WKWebView's testing 
API to simulate a pan

Canonical link: https://commits.webkit.org/291232@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