Bug 211824

Summary: Add SPI for reverting to touch events for iPad trackpad interactions
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, ews-watchlist, japhet, megan_gardner, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Tim Horton 2020-05-12 18:51:00 PDT
Add SPI for reverting to touch events for iPad trackpad interactions
Comment 1 Tim Horton 2020-05-12 18:51:48 PDT
Created attachment 399221 [details]
Patch
Comment 2 Tim Horton 2020-05-12 18:51:50 PDT
<rdar://problem/61363084>
Comment 3 Tim Horton 2020-05-12 18:53:04 PDT
Created attachment 399223 [details]
Patch
Comment 4 Tim Horton 2020-05-12 19:10:12 PDT
Created attachment 399228 [details]
Patch
Comment 5 Tim Horton 2020-05-12 22:36:24 PDT
Created attachment 399241 [details]
Patch
Comment 6 Megan Gardner 2020-05-12 23:34:51 PDT
Comment on attachment 399241 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399241&action=review

lots of plumbing, I wish it could be a default that could be set/read, but I know that those systems aren't a broad as is probably needed for this.

> Source/WebKit/ChangeLog:8
> +

A note maybe about being covered by existing tests + one new test?

> Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:59
> +#if TARGET_OS_IPHONE

why not #if ENABLE(IOS_TOUCH_EVENTS)?
Comment 7 Tim Horton 2020-05-12 23:56:59 PDT
(In reply to Megan Gardner from comment #6)
> Comment on attachment 399241 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399241&action=review
> 
> lots of plumbing, I wish it could be a default that could be set/read, but I
> know that those systems aren't a broad as is probably needed for this.

The five-line solution (just add a switch to WKWebView) would be "fine", but WKWebpagePreferences has the additional nicety that it applies the preferences /when the page actually loads/ instead of at some random time, so it's good for things that feel like per-site quirks.
> > Source/WebKit/ChangeLog:8
> > +
> 
> A note maybe about being covered by existing tests + one new test?
> 
> > Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:59
> > +#if TARGET_OS_IPHONE
> 
> why not #if ENABLE(IOS_TOUCH_EVENTS)?

This is an SPI header, so the WTF feature macros aren't available.
Comment 8 Wenson Hsieh 2020-05-13 07:42:06 PDT
Comment on attachment 399241 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399241&action=review

LGTM as well.

> Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:1903
> +		4971B12E24623A3B0096994D /* basicITPDatabase.db-wal */ = {isa = PBXFileReference; lastKnownFileType = text; path = "basicITPDatabase.db-wal"; sourceTree = SOURCE_ROOT; };

0.o
Comment 9 Tim Horton 2020-05-13 12:27:02 PDT
Created attachment 399288 [details]
Patch
Comment 10 Tim Horton 2020-05-13 12:33:20 PDT
(In reply to Wenson Hsieh from comment #8)
> Comment on attachment 399241 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399241&action=review
> 
> LGTM as well.
> 
> > Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:1903
> > +		4971B12E24623A3B0096994D /* basicITPDatabase.db-wal */ = {isa = PBXFileReference; lastKnownFileType = text; path = "basicITPDatabase.db-wal"; sourceTree = SOURCE_ROOT; };
> 
> 0.o

Xcode insists, so I am leaving it alone
Comment 11 EWS 2020-05-13 12:59:13 PDT
Committed r261640: <https://trac.webkit.org/changeset/261640>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399288 [details].