[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
Sun Aug 4 13:54:44 PDT 2019


--- Comment #9 from Geoffrey Garen <ggaren at apple.com> ---
> It seems the SPI client invokes this when it wishes to begin temporarily
> begin suppressing certain types of interaction in the web view until the
> next user gesture — for instance, scrolling, pinching, tapping, or long
> pressing. When such a gesture happens, the completion handler passed in by
> the client is then invoked.
> This means the call to -_restoreAllInteractions is actually optional, and
> only allows the client to stop suppressing interactions prematurely.

I missed this detail the first time around. It's nice that the implementation automatically restores interaction upon the first interaction. That helps.

Even so, it looks like long press and context menu will not automatically restore? So there is still some risk here.

> > (2) Instead of accepting a BOOL argument, return a token object, which
> > offers a -cancel method, and which also calls -cancel automatically in its
> > -dealloc method;

Looking at the described used case, and at the implementation here, I do still think that a token object that held a -cancel method and a completionHandler would be a nice way to model this behavior. (Specifically, I would have WebKit hold a weak reference to the token, and the client hold a strong reference.)

This suppression is associated with a specific object in the client, so that object can own the token object.

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/20190804/5e036b4e/attachment.html>

More information about the webkit-unassigned mailing list