| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index b77d6563978e66f75a18593a7f7cd6d682e44252..c715c9f912077c0f3e17f22e6549a2c54e4daa2e 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -965,21 +965,14 @@ bool Document::hasValidNamespaceForElements(const QualifiedName& qName)
|
|
|
| // Required by DOM Level 3 Core and unspecified by DOM Level 2 Core:
|
| // http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-DocCrElNS
|
| - // createElementNS("http://www.w3.org/2000/xmlns/", "foo:bar"), createElementNS(null, "xmlns:bar")
|
| - if ((qName.prefix() == xmlnsAtom && qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI) || (qName.prefix() != xmlnsAtom && qName.namespaceURI() == XMLNSNames::xmlnsNamespaceURI))
|
| - return false;
|
| -
|
| - return true;
|
| + // createElementNS("http://www.w3.org/2000/xmlns/", "foo:bar"), createElementNS(null, "xmlns:bar"), createElementNS(null, "xmlns")
|
| + if (qName.prefix() == xmlnsAtom || (qName.prefix().isEmpty() && qName.localName() == xmlnsAtom))
|
| + return qName.namespaceURI() == XMLNSNames::xmlnsNamespaceURI;
|
| + return qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI;
|
| }
|
|
|
| bool Document::hasValidNamespaceForAttributes(const QualifiedName& qName)
|
| {
|
| - // Spec: DOM Level 2 Core: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElSetAttrNS
|
| - if (qName.prefix().isEmpty() && qName.localName() == xmlnsAtom) {
|
| - // Note: The case of an "xmlns" qualified name with a namespace of
|
| - // xmlnsNamespaceURI is specifically allowed (See <http://www.w3.org/2000/xmlns/>).
|
| - return qName.namespaceURI() == XMLNSNames::xmlnsNamespaceURI;
|
| - }
|
| return hasValidNamespaceForElements(qName);
|
| }
|
|
|
|
|