RESOLVED FIXED 226387
[iOS] Adjust logic when determining whether to enable image extraction actions in the callout bar
https://bugs.webkit.org/show_bug.cgi?id=226387
Summary [iOS] Adjust logic when determining whether to enable image extraction action...
Wenson Hsieh
Reported 2021-05-28 11:48:37 PDT
Attachments
Patch (1.94 KB, patch)
2021-05-28 11:52 PDT, Wenson Hsieh
no flags
Patch for landing (1.91 KB, patch)
2021-05-28 12:06 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2021-05-28 11:52:36 PDT
Devin Rousso
Comment 2 2021-05-28 11:55:48 PDT
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; ```
Wenson Hsieh
Comment 3 2021-05-28 11:58:08 PDT
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; > ``` 👍🏻
Wenson Hsieh
Comment 4 2021-05-28 12:06:53 PDT
Created attachment 430039 [details] Patch for landing
EWS
Comment 5 2021-05-28 13:02:36 PDT
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].
Note You need to log in before you can comment on or make changes to this bug.