| Summary: | [iOS] Adjust logic when determining whether to enable image extraction actions in the callout bar | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||
| Component: | Platform | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aestes, bdakin, hi, megan_gardner, thorton, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Wenson Hsieh
2021-05-28 11:48:37 PDT
Created attachment 430036 [details]
Patch
Comment on attachment 430036 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430036&action=review r=me > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3790 > + if (WebKit::isImageExtractionAction(action)) > + return editorState.isContentEditable && [super canPerformAction:action withSender:sender]; r=me > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3790 > + return editorState.isContentEditable && [super canPerformAction:action withSender:sender]; NIT: Seeing as how the next line is also `[super canPerformAction:action withSender:sender]` maybe we can adjust the `if` to avoid repeating it? ``` if (WebKit::isImageExtractionAction(action) && !editorState.isContentEditable) return NO; ``` Comment on attachment 430036 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430036&action=review >>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3790 >>> + return editorState.isContentEditable && [super canPerformAction:action withSender:sender]; >> >> r=me > > NIT: Seeing as how the next line is also `[super canPerformAction:action withSender:sender]` maybe we can adjust the `if` to avoid repeating it? > ``` > if (WebKit::isImageExtractionAction(action) && !editorState.isContentEditable) > return NO; > ``` 👍🏻 Created attachment 430039 [details]
Patch for landing
Committed r278221 (238259@main): <https://commits.webkit.org/238259@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 430039 [details]. |