<rdar://problem/35756268>
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>