Bug 214628

Summary: Tapped DataDetected links present sub-menus from the wrong location.
Product: WebKit Reporter: Megan Gardner <megan_gardner>
Component: New BugsAssignee: Megan Gardner <megan_gardner>
Status: RESOLVED FIXED    
Severity: Normal CC: thorton, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Megan Gardner 2020-07-22 00:24:00 PDT
Tapped DataDetected links present sub-menus from the wrong location.
Comment 1 Megan Gardner 2020-07-22 00:30:29 PDT
Created attachment 404905 [details]
Patch
Comment 2 Megan Gardner 2020-07-22 00:30:59 PDT
<rdar://problem/64808642>
Comment 3 Wenson Hsieh 2020-07-22 07:54:01 PDT
Comment on attachment 404905 [details]
Patch

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

> Source/WebKit/ChangeLog:12
> +        Setting this bit ensures that all the necessary data is calculated and returned
> +        when a DataDetector link is tapped.

Just curious — where is the logic that uses this linkIndicator information?
Comment 4 Megan Gardner 2020-07-22 09:07:22 PDT
Comment on attachment 404905 [details]
Patch

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

>> Source/WebKit/ChangeLog:12
>> +        when a DataDetector link is tapped.
> 
> Just curious — where is the logic that uses this linkIndicator information?

It's the bailout condition at the top of linkIndicatorPositionInformation in WebPageIOS, which in this case we do not want to bail out of, so that sourceRect = _positionInformation->linkIndicator.textBoundingRectInRootViewCoordinates gives good date when sending a source rect to DD.
Comment 5 EWS 2020-07-22 09:09:57 PDT
Committed r264699: <https://trac.webkit.org/changeset/264699>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404905 [details].
Comment 6 Tim Horton 2020-07-22 09:40:27 PDT
Heh, this is a slightly heavyweight solution (because it involves needless snapshotting), but it will do the trick for now, until we split positionInformation up into more bite-sized chunks.