createAttributeNS should understand that "xmlns" is allowed in the http://www.w3...
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 08:31:13 +0000 (08:31 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 08:31:13 +0000 (08:31 +0000)
commit427e9f11c7a1430ac882dbd1a51afd24cf8b9f96
tree14f6292d684c6679223972377b933fcba4e71a81
parentff1ed23563454a37cc7f7ec466e2f8d7f3919862
createAttributeNS should understand that "xmlns" is allowed in the w3.org/2000/xmlns/
https://bugs.webkit.org/show_bug.cgi?id=76579

Reviewed by Eric Seidel.

Source/WebCore:

This patch cleans up a tiny corner case involving the (somewhat
magical) xmlns attribute that we uncovered when working on
setAttributeNS.

Tests: fast/dom/Document/createAttributeNS-namespace-err.html

* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::hasValidNamespaceForElements):
(WebCore::Document::hasValidNamespaceForAttributes):
(WebCore::Document::createElementNS):
(WebCore::Document::createAttributeNS):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::setAttributeNS):

LayoutTests:

* fast/dom/Document/createAttributeNS-namespace-err-expected.txt:
* fast/dom/Document/script-tests/createAttributeNS-namespace-err.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Document/createAttributeNS-namespace-err-expected.txt
LayoutTests/fast/dom/Document/script-tests/createAttributeNS-namespace-err.js
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.cpp