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

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

Issue 308963002: Minimize calls to Node::nodeType() as it is virtual (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 7 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
« Source/core/dom/Node.cpp ('K') | « Source/core/xml/XPathStep.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathUtil.cpp
diff --git a/Source/core/xml/XPathUtil.cpp b/Source/core/xml/XPathUtil.cpp
index b36abf3de0e3240c2520e7bba9b289d2fa2e18bd..6b40d7535fb3ed1abb81af715903ada477cce9e4 100644
--- a/Source/core/xml/XPathUtil.cpp
+++ b/Source/core/xml/XPathUtil.cpp
@@ -49,7 +49,7 @@ String stringValue(Node* node)
case Node::CDATA_SECTION_NODE:
return node->nodeValue();
default:
- if (isRootDomNode(node) || node->nodeType() == Node::ELEMENT_NODE) {
+ if (isRootDomNode(node) || node->isElementNode()) {
StringBuilder result;
result.reserveCapacity(1024);
« Source/core/dom/Node.cpp ('K') | « Source/core/xml/XPathStep.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698