| Summary: | Unable to copy and paste a PDF from Notes into Mail compose body | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||||
| Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | aestes, bdakin, commit-queue, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Other | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | 196435 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Wenson Hsieh
2019-04-01 07:39:40 PDT
Created attachment 366404 [details]
Patch
Created attachment 366405 [details]
Rebase on trunk
Comment on attachment 366405 [details] Rebase on trunk View in context: https://bugs.webkit.org/attachment.cgi?id=366405&action=review > Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:223 > static String mimeTypeFromContentType(const String& contentType) Why isn't this in UTIUtilities? Comment on attachment 366405 [details] Rebase on trunk View in context: https://bugs.webkit.org/attachment.cgi?id=366405&action=review >> Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:223 >> static String mimeTypeFromContentType(const String& contentType) > > Why isn't this in UTIUtilities? AFAICT, no good reason :P I'll pull this out into a separate helper in a separate change (https://bugs.webkit.org/show_bug.cgi?id=196455), since there are a number of other (unrelated) places that would also benefit from this refactoring. Comment on attachment 366405 [details] Rebase on trunk View in context: https://bugs.webkit.org/attachment.cgi?id=366405&action=review > Source/WebCore/platform/PasteboardItemInfo.h:73 > + return isNonTextType || containsFileURLAndFileUploadContent || !suggestedFileName.isEmpty(); As we discussed on IRC, I'm going to move the (isNonTextType || containsFileURLAndFileUploadContent) part of this out of canBeTreatedAsAttachmentOrFile() and back into Pasteboard::fileContentState, where it was originally. Relaxing the heuristic for items that contain non-text types or any file URL/file upload content causes copying and pasting text from Notes to Mail compose to insert an RTFD attachment instead of inline text :/ Created attachment 366420 [details]
Patch for landing
Comment on attachment 366420 [details] Patch for landing Clearing flags on attachment: 366420 Committed r243713: <https://trac.webkit.org/changeset/243713> |