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

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

Issue 344553002: Fix style erros in XPath-related files. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/xml/XPathUtil.h ('k') | Source/core/xml/XPathValue.h » ('j') | 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 6b40d7535fb3ed1abb81af715903ada477cce9e4..4c56f284a02feeffb21c8ee234ac31d0c08f1463 100644
--- a/Source/core/xml/XPathUtil.cpp
+++ b/Source/core/xml/XPathUtil.cpp
@@ -42,26 +42,26 @@ bool isRootDomNode(Node* node)
String stringValue(Node* node)
{
switch (node->nodeType()) {
- case Node::ATTRIBUTE_NODE:
- case Node::PROCESSING_INSTRUCTION_NODE:
- case Node::COMMENT_NODE:
- case Node::TEXT_NODE:
- case Node::CDATA_SECTION_NODE:
- return node->nodeValue();
- default:
- if (isRootDomNode(node) || node->isElementNode()) {
- StringBuilder result;
- result.reserveCapacity(1024);
+ case Node::ATTRIBUTE_NODE:
+ case Node::PROCESSING_INSTRUCTION_NODE:
+ case Node::COMMENT_NODE:
+ case Node::TEXT_NODE:
+ case Node::CDATA_SECTION_NODE:
+ return node->nodeValue();
+ default:
+ if (isRootDomNode(node) || node->isElementNode()) {
+ StringBuilder result;
+ result.reserveCapacity(1024);
- for (Node* n = node->firstChild(); n; n = NodeTraversal::next(*n, node)) {
- if (n->isTextNode()) {
- const String& nodeValue = n->nodeValue();
- result.append(nodeValue);
- }
+ for (Node* n = node->firstChild(); n; n = NodeTraversal::next(*n, node)) {
+ if (n->isTextNode()) {
+ const String& nodeValue = n->nodeValue();
+ result.append(nodeValue);
}
-
- return result.toString();
}
+
+ return result.toString();
+ }
}
return String();
@@ -72,18 +72,18 @@ bool isValidContextNode(Node* node)
if (!node)
return false;
switch (node->nodeType()) {
- case Node::ATTRIBUTE_NODE:
- case Node::CDATA_SECTION_NODE:
- case Node::COMMENT_NODE:
- case Node::DOCUMENT_NODE:
- case Node::ELEMENT_NODE:
- case Node::PROCESSING_INSTRUCTION_NODE:
- return true;
- case Node::DOCUMENT_FRAGMENT_NODE:
- case Node::DOCUMENT_TYPE_NODE:
- return false;
- case Node::TEXT_NODE:
- return !(node->parentNode() && node->parentNode()->isAttributeNode());
+ case Node::ATTRIBUTE_NODE:
+ case Node::CDATA_SECTION_NODE:
+ case Node::COMMENT_NODE:
+ case Node::DOCUMENT_NODE:
+ case Node::ELEMENT_NODE:
+ case Node::PROCESSING_INSTRUCTION_NODE:
+ return true;
+ case Node::DOCUMENT_FRAGMENT_NODE:
+ case Node::DOCUMENT_TYPE_NODE:
+ return false;
+ case Node::TEXT_NODE:
+ return !(node->parentNode() && node->parentNode()->isAttributeNode());
}
ASSERT_NOT_REACHED();
return false;
« no previous file with comments | « Source/core/xml/XPathUtil.h ('k') | Source/core/xml/XPathValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698