[webkit-reviews] review granted: [Bug 214042] [iOS] Sharing an <img> element with a base64-encoded URL shares the URL as raw text instead of an image : [Attachment 403684] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 7 09:56:13 PDT 2020
Darin Adler <darin at apple.com> has granted Antoine Quint <graouts at apple.com>'s
request for review:
Bug 214042: [iOS] Sharing an <img> element with a base64-encoded URL shares the
URL as raw text instead of an image
https://bugs.webkit.org/show_bug.cgi?id=214042
Attachment 403684: Patch
https://bugs.webkit.org/attachment.cgi?id=403684&action=review
--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 403684
--> https://bugs.webkit.org/attachment.cgi?id=403684
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=403684&action=review
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:831
> + if ([element.imageURL.scheme isEqualToString:@"data"] &&
element.image && [delegate
respondsToSelector:@selector(actionSheetAssistant:shareElementWithImage:rect:)]
)
Does the "scheme" getter convert the text to lowercase? If not, then we should
be checking in an ASCII case-insensitive way.
> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:6917
> + shareData.files = { { "Image.png",
WebCore::SharedBuffer::create(UIImagePNGRepresentation(image)) } };
Is "Image.png" the best file name to use? Anything we can do better given the
context? I’m not specifically suggesting this bug even "SharedImage.png" might
be better? Or maybe lowercased "image.png".
> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:6918
> + [self _showShareSheet:shareData inRect: { [self convertRect:boundingRect
toView:self.webView] } completionHandler:[] (bool success) { }];
This seems to be a pasted copy of a line of code from above; these small
possible mistakes were copied:
Extra space here after "inRect:". Not sure I understand those braces, it
compiles, so OK. Don’t think we need the word "success" there in "(bool
success)". Can we pass null for the completion handler instead of a block?
More information about the webkit-reviews
mailing list