Summary: | [Attachment Support] Insert images as inline attachments when pasting and dropping | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||||
Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, mitz, thorton, webkit-bug-importer, wenson_hsieh | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 180892 | ||||||||||
Attachments: |
|
Description
Wenson Hsieh
2017-12-14 17:24:20 PST
Created attachment 329447 [details]
First pass
Created attachment 329514 [details]
Slight test tweaks
Comment on attachment 329514 [details] Slight test tweaks View in context: https://bugs.webkit.org/attachment.cgi?id=329514&action=review > Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:425 > + HashMap<AtomicString, RefPtr<Blob>> urlToBlobMap; Is it at all possible to factor this out? It seems like these same four lines show up a bunch of times. > Source/WebCore/html/HTMLAttachmentElement.cpp:127 > + setAttributeWithoutSynchronization(HTMLNames::titleAttr, m_file->name()); I swear I've seen this code before Comment on attachment 329514 [details] Slight test tweaks View in context: https://bugs.webkit.org/attachment.cgi?id=329514&action=review >> Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:425 >> + HashMap<AtomicString, RefPtr<Blob>> urlToBlobMap; > > Is it at all possible to factor this out? It seems like these same four lines show up a bunch of times. Good idea — fixed. >> Source/WebCore/html/HTMLAttachmentElement.cpp:127 >> + setAttributeWithoutSynchronization(HTMLNames::titleAttr, m_file->name()); > > I swear I've seen this code before It's also in HTMLAttachmentElement::updateFileWithData. I'm not sure why I avoided refactoring that to use this new logic, but at a second glance, you're right — it totally should just call into this code instead. Fixed! Created attachment 329685 [details]
Patch for EWS.
Comment on attachment 329685 [details] Patch for EWS. Clearing flags on attachment: 329685 Committed r226085: <https://trac.webkit.org/changeset/226085> |