| Summary: | [iOS] Add support for a "markup image" item in the callout bar when selecting a single image | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||||||||||
| Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | akeerthi, bdakin, hi, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| Bug Depends on: | 236403, 236406 | ||||||||||||||||
| Bug Blocks: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Wenson Hsieh
2022-02-09 16:28:22 PST
Created attachment 451478 [details]
Depends on #236406
Created attachment 451563 [details]
Depends on #236406
Created attachment 451585 [details]
Rebase on trunk
Created attachment 451608 [details]
Fix iOS 15 build
Created attachment 451619 [details]
Actually fix iOS 15 build
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. 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? Created attachment 451699 [details]
Patch for landing
(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? 👍 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]. |