[Webkit-unassigned] [Bug 41519] New: Unable to create xmlns attribute
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 2 05:04:39 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=41519
Summary: Unable to create xmlns attribute
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: laurens.nospam at grauw.nl
This incorrectly fails with a NAMESPACE_ERR:
document.createAttribute('http://www.w3.org/2000/xmlns/', 'xmlns')
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
--
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