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

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

Issue 1254243002: Remove Node.localName and Node.namespaceURI (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix layout test failure Created 5 years, 5 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/Node.h ('k') | Source/core/dom/Node.idl » ('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 016dec1a6d77208db79afa343e2d0d13e346f9e1..836972108393d842f6cb09f77db06b772caa2326 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -519,16 +519,6 @@ void Node::normalize()
}
}
-const AtomicString& Node::localName() const
-{
- return nullAtom;
-}
-
-const AtomicString& Node::namespaceURI() const
-{
- return nullAtom;
-}
-
bool Node::isContentEditable(UserSelectAllTreatment treatment)
{
document().updateLayoutTreeIfNeeded();
@@ -1100,17 +1090,25 @@ bool Node::isEqualNode(Node* other) const
if (nodeName() != other->nodeName())
return false;
- if (localName() != other->localName())
+ if (nodeValue() != other->nodeValue())
return false;
- if (namespaceURI() != other->namespaceURI())
- return false;
+ if (isAttributeNode()) {
+ if (toAttr(this)->localName() != toAttr(other)->localName())
+ return false;
- if (nodeValue() != other->nodeValue())
- return false;
+ if (toAttr(this)->namespaceURI() != toAttr(other)->namespaceURI())
+ return false;
+ } else if (isElementNode()) {
+ if (toElement(this)->localName() != toElement(other)->localName())
+ return false;
- if (isElementNode() && !toElement(this)->hasEquivalentAttributes(toElement(other)))
- return false;
+ if (toElement(this)->namespaceURI() != toElement(other)->namespaceURI())
+ return false;
+
+ if (!toElement(this)->hasEquivalentAttributes(toElement(other)))
+ return false;
+ }
Node* child = firstChild();
Node* otherChild = other->firstChild();
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/Node.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698