Assigning to Element.prefix should throw exception when using illegal characters
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 07:39:41 +0000 (07:39 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 07:39:41 +0000 (07:39 +0000)
commit93b409162c4442b49d508cf52e24137b53a3d504
treeed1d3ffbeb3a513b509be878986d18023fe03584
parent80e47ae6d53531c46b6e6decd65e9595cdf4b4e5
Assigning to Element.prefix should throw exception when using illegal characters
https://bugs.webkit.org/show_bug.cgi?id=76589

Reviewed by Eric Seidel.

This patch fixes a FIXME and implements the INVALID_CHARACTER_ERR
exception described in
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSPrefix

Tests: fast/dom/Element/prefix-setter-exception.html

* dom/Node.cpp:
(WebCore::isValidNameStartCharacter):
(WebCore::isValidNameCharacter):
(WebCore::hasInvalidValidNameCharacters):
(WebCore::Node::checkSetPrefix):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/dom/Element/prefix-setter-exception-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Element/prefix-setter-exception.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Node.cpp