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

Description Wenson Hsieh 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.
Comment 1 Wenson Hsieh 2018-12-06 19:13:55 PST
Created attachment 356776 [details]
Patch
Comment 2 WebKit Commit Bot 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>
Comment 3 WebKit Commit Bot 2018-12-07 10:38:09 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-12-07 10:39:26 PST
<rdar://problem/46558085>