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

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

Issue 1741873002: Fix isEqualNode behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 10 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 | « third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 71726f3e3f1e142488ff984e227a4599250f58aa..76f38c8c2f98cdca224fe55807b8dcd0eb108efd 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -1121,9 +1121,6 @@ bool Node::isEqualNode(Node* other) const
if (nodeType != other->getNodeType())
return false;
- if (nodeName() != other->nodeName())
- return false;
-
if (nodeValue() != other->nodeValue())
return false;
@@ -1134,14 +1131,13 @@ bool Node::isEqualNode(Node* other) const
if (toAttr(this)->namespaceURI() != toAttr(other)->namespaceURI())
return false;
} else if (isElementNode()) {
- if (toElement(this)->localName() != toElement(other)->localName())
- return false;
-
- if (toElement(this)->namespaceURI() != toElement(other)->namespaceURI())
+ if (toElement(this)->tagQName() != toElement(other)->tagQName())
return false;
if (!toElement(this)->hasEquivalentAttributes(toElement(other)))
return false;
+ } else if (nodeName() != other->nodeName()) {
+ return false;
}
Node* child = firstChild();
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698