Element.outerHTML is missing attribute prefixes in some cases in HTML documents.
Created attachment 375181 [details] WIP Patch
Created attachment 375187 [details] WIP Patch
Created attachment 375189 [details] WIP Patch
Created attachment 375190 [details] Patch
Created attachment 375194 [details] Patch
Comment on attachment 375194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375194&action=review > Source/WebCore/editing/MarkupAccumulator.cpp:562 > + AtomStringImpl* foundNS = namespaces && attribute.prefix().impl() ? namespaces->get(attribute.prefix().impl()) : 0; I know you're just moving code around but maybe use nullptr? > Source/WebCore/editing/MarkupAccumulator.cpp:565 > + if (AtomStringImpl* prefix = namespaces ? namespaces->get(attribute.namespaceURI().impl()) : 0) Ditto.
(In reply to Ryosuke Niwa from comment #6) > Comment on attachment 375194 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=375194&action=review > > > Source/WebCore/editing/MarkupAccumulator.cpp:562 > > + AtomStringImpl* foundNS = namespaces && attribute.prefix().impl() ? namespaces->get(attribute.prefix().impl()) : 0; > > I know you're just moving code around but maybe use nullptr? > > > Source/WebCore/editing/MarkupAccumulator.cpp:565 > > + if (AtomStringImpl* prefix = namespaces ? namespaces->get(attribute.namespaceURI().impl()) : 0) > > Ditto. Sure thing.
Committed r248042: <https://trac.webkit.org/changeset/248042>
<rdar://problem/53762119>