Attr nodes are not cloned properly according to: - https://dom.spec.whatwg.org/#concept-node-clone A cloned Attr node should retain its prefix and namespace. Both Gecko and Blink agree with the DOM specification here.
Created attachment 366428 [details] Patch
Comment on attachment 366428 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366428&action=review > Source/WebCore/dom/Document.cpp:992 > // FIXME: This will "Attr::normalize" child nodes of Attr. Should we remove this FIXME?
Comment on attachment 366428 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366428&action=review >> Source/WebCore/dom/Document.cpp:992 >> // FIXME: This will "Attr::normalize" child nodes of Attr. > > Should we remove this FIXME? Is it not valid anymore?
(In reply to Chris Dumez from comment #3) > Comment on attachment 366428 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=366428&action=review > > >> Source/WebCore/dom/Document.cpp:992 > >> // FIXME: This will "Attr::normalize" child nodes of Attr. > > > > Should we remove this FIXME? > > Is it not valid anymore? There is no Attr::normalize anymore. This is about normalizing the text child nodes of Attr when we supported multiple child nodes for Attr: https://dom.spec.whatwg.org/#dom-node-normalize But that's totally irrelevant now since Attr isn't even a ContainerNode now.
Committed r243734: <https://trac.webkit.org/changeset/243734>
<rdar://problem/49506786>
(In reply to Ryosuke Niwa from comment #4) > (In reply to Chris Dumez from comment #3) > > Comment on attachment 366428 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=366428&action=review > > > > >> Source/WebCore/dom/Document.cpp:992 > > >> // FIXME: This will "Attr::normalize" child nodes of Attr. > > > > > > Should we remove this FIXME? > > > > Is it not valid anymore? > > There is no Attr::normalize anymore. This is about normalizing the text > child nodes of Attr when we supported multiple child nodes for Attr: > https://dom.spec.whatwg.org/#dom-node-normalize > > But that's totally irrelevant now since Attr isn't even a ContainerNode now. Oh right. Fixed before landing, thanks.