RESOLVED FIXED 236415
[iOS] Add support for a "markup image" item in the callout bar when selecting a single image
https://bugs.webkit.org/show_bug.cgi?id=236415
Summary [iOS] Add support for a "markup image" item in the callout bar when selecting...
Wenson Hsieh
Reported 2022-02-09 16:28:22 PST
Attachments
Depends on #236406 (32.95 KB, patch)
2022-02-09 18:35 PST, Wenson Hsieh
no flags
Depends on #236406 (34.87 KB, patch)
2022-02-10 10:12 PST, Wenson Hsieh
no flags
Rebase on trunk (35.00 KB, patch)
2022-02-10 11:37 PST, Wenson Hsieh
ews-feeder: commit-queue-
Fix iOS 15 build (34.98 KB, patch)
2022-02-10 15:01 PST, Wenson Hsieh
no flags
Actually fix iOS 15 build (34.86 KB, patch)
2022-02-10 16:44 PST, Wenson Hsieh
akeerthi: review+
Patch for landing (34.82 KB, patch)
2022-02-11 08:06 PST, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2022-02-09 18:35:49 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 2 2022-02-10 10:12:15 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 3 2022-02-10 11:37:15 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 4 2022-02-10 15:01:45 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 5 2022-02-10 16:44:23 PST
Created attachment 451619 [details] Actually fix iOS 15 build
Aditya Keerthi
Comment 6 2022-02-10 20:02:03 PST
Comment on attachment 451619 [details] Actually fix iOS 15 build View in context: https://bugs.webkit.org/attachment.cgi?id=451619&action=review > Source/WebKit/ChangeLog:100 > + well, which does use custo menu items. "custo" > Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:248 > +struct ImageAnalysisMarkupResults { Consider `ImageAnalysisMarkupData` or `ImageAnalysisMarkupInformation`, since this really represents a single "result". > Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:250 > + RetainPtr<CGImageRef> result; Consider renaming to `image`. That name is used below when unpacking this struct. > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:376 > +static RetainPtr<NSData> transcode(CGImageRef image, CFStringRef typeIdentifier) This helper can probably be reused in `provideDataForItem:` further down in this file.
Wenson Hsieh
Comment 7 2022-02-11 08:00:42 PST
Comment on attachment 451619 [details] Actually fix iOS 15 build View in context: https://bugs.webkit.org/attachment.cgi?id=451619&action=review Thanks for the review! >> Source/WebKit/ChangeLog:100 >> + well, which does use custo menu items. > > "custo" Fixed! >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:248 >> +struct ImageAnalysisMarkupResults { > > Consider `ImageAnalysisMarkupData` or `ImageAnalysisMarkupInformation`, since this really represents a single "result". Makes sense! Renamed to `ImageAnalysisMarkupData` (and renamed the corresponding ivar to `_imageAnalysisMarkupData`). >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:250 >> + RetainPtr<CGImageRef> result; > > Consider renaming to `image`. That name is used below when unpacking this struct. 👍🏻 Renamed to `image`. >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:376 >> +static RetainPtr<NSData> transcode(CGImageRef image, CFStringRef typeIdentifier) > > This helper can probably be reused in `provideDataForItem:` further down in this file. Hm…I think this patch already adjusts `-provideDataForItem:` to use this new helper function?
Wenson Hsieh
Comment 8 2022-02-11 08:06:59 PST
Created attachment 451699 [details] Patch for landing
Aditya Keerthi
Comment 9 2022-02-11 08:44:20 PST
(In reply to Wenson Hsieh from comment #7) > Comment on attachment 451619 [details] > Actually fix iOS 15 build > > View in context: > https://bugs.webkit.org/attachment.cgi?id=451619&action=review > > Thanks for the review! > > >> Source/WebKit/ChangeLog:100 > >> + well, which does use custo menu items. > > > > "custo" > > Fixed! > > >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:248 > >> +struct ImageAnalysisMarkupResults { > > > > Consider `ImageAnalysisMarkupData` or `ImageAnalysisMarkupInformation`, since this really represents a single "result". > > Makes sense! Renamed to `ImageAnalysisMarkupData` (and renamed the > corresponding ivar to `_imageAnalysisMarkupData`). > > >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:250 > >> + RetainPtr<CGImageRef> result; > > > > Consider renaming to `image`. That name is used below when unpacking this struct. > > 👍🏻 Renamed to `image`. > > >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:376 > >> +static RetainPtr<NSData> transcode(CGImageRef image, CFStringRef typeIdentifier) > > > > This helper can probably be reused in `provideDataForItem:` further down in this file. > > Hm…I think this patch already adjusts `-provideDataForItem:` to use this new > helper function? 👍
EWS
Comment 10 2022-02-11 09:03:08 PST
Committed r289623 (247134@main): <https://commits.webkit.org/247134@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451699 [details].
Note You need to log in before you can comment on or make changes to this bug.