Bug 192483

Summary: [Attachment Support] Cloned attachment elements lose their unique identifiers
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, cdumez, commit-queue, esprehn+autocc, ews-watchlist, gyuyoung.kim, mitz, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Wenson Hsieh
Reported 2018-12-06 16:38:39 PST
When using cloneNode() to clone an attachment element, the resulting attachment element's `uniqueIdentifier` will be the empty string, rather than the original attachment element's unique identifier. Currently, WebKit clients (e.g. Mail) work around this by saving the original attachment's unique identifier to a temporary attribute prior to cloning. Ideally, clients shouldn't need to hack around this for nodes that never appear in the document, since the attachment unique identifier is only guaranteed to uniquely identify attachment elements that are connected to the document.
Attachments
Patch (4.68 KB, patch)
2018-12-06 19:13 PST, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2018-12-06 19:13:55 PST
WebKit Commit Bot
Comment 2 2018-12-07 10:38:07 PST
Comment on attachment 356776 [details] Patch Clearing flags on attachment: 356776 Committed r238954: <https://trac.webkit.org/changeset/238954>
WebKit Commit Bot
Comment 3 2018-12-07 10:38:09 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4 2018-12-07 10:39:26 PST
Note You need to log in before you can comment on or make changes to this bug.