[Webkit-unassigned] [Bug 41519] Unable to create xmlns attribute
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 26 14:10:17 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=41519
Rob Buis <rwlbuis at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rwlbuis at gmail.com
--- Comment #1 from Rob Buis <rwlbuis at gmail.com> 2013-07-26 14:10:06 PST ---
(In reply to comment #0)
> This incorrectly fails with a NAMESPACE_ERR:
>
> document.createAttribute('http://www.w3.org/2000/xmlns/', 'xmlns')
I assume you mean createElementNS here, since you reference it below.
> The problem is here: http://trac.webkit.org/browser/trunk/WebCore/dom/Document.cpp#L850
>
> This code only checks for prefixes, whereas the spec says that this should also check for qualified name:
>
> - if ((qName.prefix() == xmlnsAtom && qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI) || (qName.prefix() != xmlnsAtom && qName.namespaceURI() == XMLNSNames::xmlnsNamespaceURI))
> - return true;
> + if (((qName.prefix() == xmlnsAtom || qName.toString() == xmlnsAtom) && qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI) || ((qName.prefix() != xmlnsAtom || qName.toString() == xmlnsAtom) && qName.namespaceURI() == XMLNSNames::xmlnsNamespaceURI))
> + return true;
>
> See:
> http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-DocCrElNS
> http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-DocCrAttrNS
When I use this with trunk:
document.createAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns')
it will create an attribute, which would mean this bug can be closed. Can you verify with a recent build?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list