New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy-pasted attachments in mail show up as generic file icons #735
Conversation
@@ -1487,6 +1502,7 @@ @implementation FileWrapper | |||
auto attachment = retainPtr([webView _attachmentForIdentifier:attachmentIdentifier]); | |||
EXPECT_WK_STREQ(attachmentIdentifier, [attachment uniqueIdentifier]); | |||
EXPECT_WK_STREQ(attachmentIdentifier, [webView stringByEvaluatingJavaScript:@"document.querySelector('img').attachmentIdentifier"]); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, will remove this extra space
InstanceMethodSwizzler quickLookSwizzler { | ||
getQLThumbnailGeneratorClass(), | ||
@selector(generateBestRepresentationForRequest:completionHandler:), | ||
reinterpret_cast<IMP>(_generateBestRepresentationForRequest) | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to put this swizzler below the
[webView _synchronouslyExecuteEditCommand:@"Cut" argument:nil];
..line below. If we eventually fix -_insertAttachmentWithFileWrapper:
to automatically request QL thumbnails for the inserted attachment, then I think this test might become a false positive (since we'll get two calls to the swizzled _generateBestRepresentationForRequest
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok - I reset the bool variable to false below to avoid that but probably safe to move the swizzler as well.
Thanks for the review!
8a780fd
to
bf65cfe
Compare
Committed r294451 (250719@main): https://commits.webkit.org/250719@main Reviewed commits have been landed. Closing PR #735 and removing active labels. |
bf65cfe