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; |