Bug 207575

Summary: Should not allow zooming to reveal focused element when suppressing selection assistant
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebKit Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: iOS 13   
Attachments:
Description Flags
Test case
none
Patch
none
Patch
none
Patch none

Description Daniel Bates 2020-02-11 12:49:26 PST
At the time of writing it always makes sense to forbid zooming to reveal the focused element when the selection assistant is suppressed.
Comment 1 Daniel Bates 2020-02-11 13:07:37 PST
Steps to reproduce:

1. Visit <data:text/html,<div contenteditable="true" style="height: 500px; width: 500px; border: 1px solid black"><span contenteditable="false"><a href="http://www.apple.com">Apple</a></span></div>>

2. Scroll and zoom the page such that "Apple" is partially offscreen, leave just enough on screen to tap-and-hold it.

3. Tap-and-hold on "Apple" to show a preview.

Then the page will scroll and zoom the content.
Comment 2 Daniel Bates 2020-02-11 14:43:58 PST
Created attachment 390428 [details]
Test case

Test case. Depends on Ahem.ttf being in the same directory as the test. Tap and hold on the purple square.

This file can be used to write a future API test. I tried writing an API test, but WebKit uses UIKit IPI, -previewClickInteraction, this IPI is not in my SDK. So, I get "-[_UIClickPresentationInteraction previewClickInteraction]: unrecognized selector sent to instance 0x7f9a8a631bb0" messages.
Comment 3 Daniel Bates 2020-02-11 14:48:17 PST
Blocked from writing a test because of <rdar://problem/59364638>.
Comment 4 Daniel Bates 2020-02-11 14:49:01 PST
Created attachment 390432 [details]
Patch
Comment 5 Daniel Bates 2020-02-11 14:49:51 PST
Created attachment 390433 [details]
Patch
Comment 6 Daniel Bates 2020-02-11 14:53:40 PST
Created attachment 390441 [details]
Patch
Comment 7 Daniel Bates 2020-02-11 14:54:23 PST
Thank you!
Comment 8 Daniel Bates 2020-02-11 14:57:43 PST
Comment on attachment 390441 [details]
Patch

Clearing flags on attachment: 390441

Committed r256378: <https://trac.webkit.org/changeset/256378>
Comment 9 Daniel Bates 2020-02-11 14:57:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2020-02-11 14:58:14 PST
<rdar://problem/59365183>