Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: Source/core/dom/Node.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/MutationObserver.cpp ('k') | Source/core/dom/NodeIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index fcf5f9dba020cd43b9e530a1346ca9a57989ec8b..caa4052ff9e5b481fef4380985e8051f5151ed04 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -645,8 +645,8 @@ void Node::setPrefix(const AtomicString& /*prefix*/, ExceptionCode& ec)
{
// The spec says that for nodes other than elements and attributes, prefix is always null.
// It does not say what to do when the user tries to set the prefix on another type of
- // node, however Mozilla throws a NAMESPACE_ERR exception.
- ec = NAMESPACE_ERR;
+ // node, however Mozilla throws a NamespaceError exception.
+ ec = NamespaceError;
}
const AtomicString& Node::localName() const
@@ -977,12 +977,12 @@ void Node::checkSetPrefix(const AtomicString& prefix, ExceptionCode& ec)
return;
}
- // FIXME: Raise NAMESPACE_ERR if prefix is malformed per the Namespaces in XML specification.
+ // FIXME: Raise NamespaceError if prefix is malformed per the Namespaces in XML specification.
const AtomicString& nodeNamespaceURI = namespaceURI();
if ((nodeNamespaceURI.isEmpty() && !prefix.isEmpty())
|| (prefix == xmlAtom && nodeNamespaceURI != XMLNames::xmlNamespaceURI)) {
- ec = NAMESPACE_ERR;
+ ec = NamespaceError;
return;
}
// Attribute-specific checks are in Attr::setPrefix().
@@ -1346,7 +1346,7 @@ PassRefPtr<RadioNodeList> Node::radioNodeList(const AtomicString& name)
PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, ExceptionCode& ec)
{
if (selectors.isEmpty()) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return 0;
}
@@ -1359,7 +1359,7 @@ PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, Exception
PassRefPtr<NodeList> Node::querySelectorAll(const AtomicString& selectors, ExceptionCode& ec)
{
if (selectors.isEmpty()) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return 0;
}
« no previous file with comments | « Source/core/dom/MutationObserver.cpp ('k') | Source/core/dom/NodeIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698