Bug 192483 - [Attachment Support] Cloned attachment elements lose their unique identifiers
Summary: [Attachment Support] Cloned attachment elements lose their unique identifiers
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
Keywords: InRadar
Depends on:
Reported: 2018-12-06 16:38 PST by Wenson Hsieh
Modified: 2018-12-07 10:39 PST (History)
10 users (show)

See Also:

Patch (4.68 KB, patch)
2018-12-06 19:13 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 WebKit Commit Bot 2018-12-07 10:38:07 PST
Comment on attachment 356776 [details]

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