[Webkit-unassigned] [Bug 200398] Add an SPI to suppress all WKWebView interactions except scrolling or zooming

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 2 16:07:39 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=200398

--- Comment #4 from Luming Yin <luming_yin at apple.com> ---
(In reply to Wenson Hsieh from comment #2)
> Comment on attachment 375450 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=375450&action=review
> 
> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3995
> > +        [self _startSuppressingSelectionAssistantForReason:WebKit::InteractionIsHappening];
> 
> Nit - I feel like this might warrant its own separate suppression reason
> (InteractionIsHappening is about the new context menu for peek).
Thanks for the context - I didn't know InteractionIsHappening was only for peek context menus. Updated my patch to introduce a new suppression reason OnlyScrollOrZoomIsAllowed.

> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4003
> > +        [self _didChangeWebViewEditability];
> 
> It seems a bit odd to call -_didChangeWebViewEditability here, since web
> view edibility didn’t really change. Perhaps we could factor out the logic
> for resetting the double tap gesture into a separate helper method, and then
> call it from both places?
Factored out into -_updateTwoFingerSingleTapGestureRecognizer to be called from both places.

> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4004
> > +        _webView._dragInteractionPolicy = _WKDragInteractionPolicyDefault;
> 
> It seems like this would enable the drag interaction after interaction
> suppression ends, in the case where a client sets
> `_webView._dragInteractionPolicy = _WKDragInteractionPolicyAlwaysDisable;`
> but would then use this SPI to temporarily suppress interactions. We’d
> probably want to restore _dragInteractionPolicy to its value prior to this
> call.
Updated the patch to cache and restore the prior _dragInteractionPolicy in _dragInteractionPolicyPriorToSuppression.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190802/7cde5f5d/attachment.html>


More information about the webkit-unassigned mailing list