Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4c3f8479961b623e579564628b50243d9d30cbcc
      
https://github.com/WebKit/WebKit/commit/4c3f8479961b623e579564628b50243d9d30cbcc
  Author: Wenson Hsieh <[email protected]>
  Date:   2023-11-06 (Mon, 06 Nov 2023)

  Changed paths:
    M Source/WebKit/Shared/ios/InteractionInformationRequest.cpp
    M Source/WebKit/Shared/ios/InteractionInformationRequest.h
    M Source/WebKit/Shared/ios/InteractionInformationRequest.serialization.in
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [iOS] Remove the image analysis timeout gesture
https://bugs.webkit.org/show_bug.cgi?id=264289

Reviewed by Megan Gardner.

Remove the image analysis timeout gesture, along with the 
`disallowUserAgentShadowContent` position
information request flag (which was only set in this scenario). The timeout 
gesture currently allows
the user to show an image context menu after selecting Live Text, by continuing 
to hold down over
the image for 2 seconds after making a selection.

This was originally devised to make it possible to invoke the context menu over 
an image that is
completely covered by selectable Live Text; however:

1.  This scenario is extremely rare, and doesn't come up in practice; 
screenshots filled with text
    generally still contain enough space before or after lines, or in between 
paragraphs that it's
    possible to invoke the image context menu.

2.  The very long, 2 second delay made this fallback mechanism very difficult 
to discover in the
    first place.

For consistency with Live Text on the rest of the platform (e.g. Photos), and 
because it'll soon
become untennable to programmatically present context menus outside of the 
context of UI controls,
let's experiment with removing this fallback mechanism.

* Source/WebKit/Shared/ios/InteractionInformationRequest.cpp:
(WebKit::InteractionInformationRequest::isValidForRequest const):
* Source/WebKit/Shared/ios/InteractionInformationRequest.h:
(WebKit::InteractionInformationRequest::InteractionInformationRequest):
* Source/WebKit/Shared/ios/InteractionInformationRequest.serialization.in:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView 
gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):
(-[WKContentView 
deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):
(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView 
_internalContextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView imageAnalysisGestureDidTimeOut:]): Deleted.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Drive-by fix: add `InteractionInformationRequest.serialization.in` to the Xcode 
project.

* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::positionInformation):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to