[webkit-reviews] review granted: [Bug 224517] [iOS] Make image extraction interactions work for elements inside links : [Attachment 425936] For EWS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 14 10:52:11 PDT 2021


Devin Rousso <drousso at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 224517: [iOS] Make image extraction interactions work for elements inside
links
https://bugs.webkit.org/show_bug.cgi?id=224517

Attachment 425936: For EWS

https://bugs.webkit.org/attachment.cgi?id=425936&action=review




--- Comment #6 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 425936
  --> https://bugs.webkit.org/attachment.cgi?id=425936
For EWS

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

r=me

>>> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2698
>>> +	 info.imageElementContext = page.contextForElement(element);
>> 
>> Won't this be the exact same value as `elementContext` since
`imagePositionInformation` is called with the same `Element` right before the
`elementContext` is set?  If so, would just `isImage` be enough to indicate
that the `elementContext` is for an image?
> 
> They are the same in the `elementPositionInformation` case, but not in the
case where the clickable element is a link (<a>).

Ah I see are you referring to the `downcast<HTMLImageElement>(*hitTestNode)`
below?	That makes sense.

NIT: In that case, are we concerned with having duplicate data in the non-link
scenario?  Should we only set the `imageElementContext` when we it's for a
different `Element` than the `elementContext`?


More information about the webkit-reviews mailing list