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

Unified Diff: third_party/WebKit/Source/core/xml/XPathUtil.cpp

Issue 2342163004: Simplify Attr code in XPathUtil (Closed)
Patch Set: rebase Created 4 years, 3 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 | « no previous file | 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/xml/XPathUtil.cpp
diff --git a/third_party/WebKit/Source/core/xml/XPathUtil.cpp b/third_party/WebKit/Source/core/xml/XPathUtil.cpp
index 37160678e406af8e1f53415d22995e59a5d9432d..02f76d1bf1bf80b660cfc39f724290b7e981f20e 100644
--- a/third_party/WebKit/Source/core/xml/XPathUtil.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathUtil.cpp
@@ -72,6 +72,7 @@ bool isValidContextNode(Node* node)
return false;
switch (node->getNodeType()) {
case Node::kAttributeNode:
+ case Node::kTextNode:
case Node::kCdataSectionNode:
case Node::kCommentNode:
case Node::kDocumentNode:
@@ -81,8 +82,6 @@ bool isValidContextNode(Node* node)
case Node::kDocumentFragmentNode:
case Node::kDocumentTypeNode:
return false;
- case Node::kTextNode:
- return !(node->parentNode() && node->parentNode()->isAttributeNode());
}
NOTREACHED();
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698