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

Unified Diff: Source/core/dom/TreeWalker.cpp

Issue 1208583002: Code cleanup #1 in core/dom/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/dom/TransformSource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeWalker.cpp
diff --git a/Source/core/dom/TreeWalker.cpp b/Source/core/dom/TreeWalker.cpp
index 3a64e6a898abe2b458f0766de5f3cd8d35c53ad0..aa8fbbff13849d807dcee0645723e0969d48b757 100644
--- a/Source/core/dom/TreeWalker.cpp
+++ b/Source/core/dom/TreeWalker.cpp
@@ -77,17 +77,17 @@ Node* TreeWalker::firstChild(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
- m_current = node.release();
- return m_current.get();
- case NodeFilter::FILTER_SKIP:
- if (node->hasChildren()) {
- node = node->firstChild();
- continue;
- }
- break;
- case NodeFilter::FILTER_REJECT:
- break;
+ case NodeFilter::FILTER_ACCEPT:
+ m_current = node.release();
+ return m_current.get();
+ case NodeFilter::FILTER_SKIP:
+ if (node->hasChildren()) {
+ node = node->firstChild();
+ continue;
+ }
+ break;
+ case NodeFilter::FILTER_REJECT:
+ break;
}
do {
if (node->nextSibling()) {
@@ -110,17 +110,17 @@ Node* TreeWalker::lastChild(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
- m_current = node.release();
- return m_current.get();
- case NodeFilter::FILTER_SKIP:
- if (node->lastChild()) {
- node = node->lastChild();
- continue;
- }
- break;
- case NodeFilter::FILTER_REJECT:
- break;
+ case NodeFilter::FILTER_ACCEPT:
+ m_current = node.release();
+ return m_current.get();
+ case NodeFilter::FILTER_SKIP:
+ if (node->lastChild()) {
+ node = node->lastChild();
+ continue;
+ }
+ break;
+ case NodeFilter::FILTER_REJECT:
+ break;
}
do {
if (node->previousSibling()) {
@@ -147,18 +147,18 @@ Node* TreeWalker::previousSibling(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
- m_current = sibling.release();
- return m_current.get();
- case NodeFilter::FILTER_SKIP:
- if (sibling->lastChild()) {
- sibling = sibling->lastChild();
- node = sibling;
- continue;
- }
- break;
- case NodeFilter::FILTER_REJECT:
- break;
+ case NodeFilter::FILTER_ACCEPT:
+ m_current = sibling.release();
+ return m_current.get();
+ case NodeFilter::FILTER_SKIP:
+ if (sibling->lastChild()) {
+ sibling = sibling->lastChild();
+ node = sibling;
+ continue;
+ }
+ break;
+ case NodeFilter::FILTER_REJECT:
+ break;
}
sibling = sibling->previousSibling();
}
@@ -184,18 +184,18 @@ Node* TreeWalker::nextSibling(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
- m_current = sibling.release();
- return m_current.get();
- case NodeFilter::FILTER_SKIP:
- if (sibling->hasChildren()) {
- sibling = sibling->firstChild();
- node = sibling;
- continue;
- }
- break;
- case NodeFilter::FILTER_REJECT:
- break;
+ case NodeFilter::FILTER_ACCEPT:
+ m_current = sibling.release();
+ return m_current.get();
+ case NodeFilter::FILTER_SKIP:
+ if (sibling->hasChildren()) {
+ sibling = sibling->firstChild();
+ node = sibling;
+ continue;
+ }
+ break;
+ case NodeFilter::FILTER_REJECT:
+ break;
}
sibling = sibling->nextSibling();
}
« no previous file with comments | « Source/core/dom/TransformSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698