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

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

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
Index: third_party/WebKit/Source/core/dom/TreeWalker.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeWalker.cpp b/third_party/WebKit/Source/core/dom/TreeWalker.cpp
index 9b367aea73965128e1cf0f51ce22c805c7e32090..13c423fc5178e3554ee504fc10fe9a57ce8bad2b 100644
--- a/third_party/WebKit/Source/core/dom/TreeWalker.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeWalker.cpp
@@ -59,7 +59,7 @@ Node* TreeWalker::parentNode(ExceptionState& exceptionState)
unsigned acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
+ if (acceptNodeResult == NodeFilter::kFilterAccept)
return setCurrent(node);
}
return 0;
@@ -72,16 +72,16 @@ Node* TreeWalker::firstChild(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
+ case NodeFilter::kFilterAccept:
m_current = node;
return m_current.get();
- case NodeFilter::FILTER_SKIP:
+ case NodeFilter::kFilterSkip:
if (node->hasChildren()) {
node = node->firstChild();
continue;
}
break;
- case NodeFilter::FILTER_REJECT:
+ case NodeFilter::kFilterReject:
break;
}
do {
@@ -105,16 +105,16 @@ Node* TreeWalker::lastChild(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
+ case NodeFilter::kFilterAccept:
m_current = node;
return m_current.get();
- case NodeFilter::FILTER_SKIP:
+ case NodeFilter::kFilterSkip:
if (node->lastChild()) {
node = node->lastChild();
continue;
}
break;
- case NodeFilter::FILTER_REJECT:
+ case NodeFilter::kFilterReject:
break;
}
do {
@@ -142,17 +142,17 @@ Node* TreeWalker::previousSibling(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
+ case NodeFilter::kFilterAccept:
m_current = sibling;
return m_current.get();
- case NodeFilter::FILTER_SKIP:
+ case NodeFilter::kFilterSkip:
if (sibling->lastChild()) {
sibling = sibling->lastChild();
node = sibling;
continue;
}
break;
- case NodeFilter::FILTER_REJECT:
+ case NodeFilter::kFilterReject:
break;
}
sibling = sibling->previousSibling();
@@ -163,7 +163,7 @@ Node* TreeWalker::previousSibling(ExceptionState& exceptionState)
unsigned acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
+ if (acceptNodeResult == NodeFilter::kFilterAccept)
return 0;
}
}
@@ -179,17 +179,17 @@ Node* TreeWalker::nextSibling(ExceptionState& exceptionState)
if (exceptionState.hadException())
return 0;
switch (acceptNodeResult) {
- case NodeFilter::FILTER_ACCEPT:
+ case NodeFilter::kFilterAccept:
m_current = sibling;
return m_current.get();
- case NodeFilter::FILTER_SKIP:
+ case NodeFilter::kFilterSkip:
if (sibling->hasChildren()) {
sibling = sibling->firstChild();
node = sibling;
continue;
}
break;
- case NodeFilter::FILTER_REJECT:
+ case NodeFilter::kFilterReject:
break;
}
sibling = sibling->nextSibling();
@@ -200,7 +200,7 @@ Node* TreeWalker::nextSibling(ExceptionState& exceptionState)
unsigned acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
+ if (acceptNodeResult == NodeFilter::kFilterAccept)
return 0;
}
}
@@ -214,17 +214,17 @@ Node* TreeWalker::previousNode(ExceptionState& exceptionState)
unsigned acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_REJECT)
+ if (acceptNodeResult == NodeFilter::kFilterReject)
continue;
while (Node* lastChild = node->lastChild()) {
node = lastChild;
acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_REJECT)
+ if (acceptNodeResult == NodeFilter::kFilterReject)
break;
}
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT) {
+ if (acceptNodeResult == NodeFilter::kFilterAccept) {
m_current = node;
return m_current.get();
}
@@ -238,7 +238,7 @@ Node* TreeWalker::previousNode(ExceptionState& exceptionState)
unsigned acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
+ if (acceptNodeResult == NodeFilter::kFilterAccept)
return setCurrent(node);
}
return 0;
@@ -253,9 +253,9 @@ Children:
unsigned acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
+ if (acceptNodeResult == NodeFilter::kFilterAccept)
return setCurrent(node);
- if (acceptNodeResult == NodeFilter::FILTER_REJECT)
+ if (acceptNodeResult == NodeFilter::kFilterReject)
break;
}
while (Node* nextSibling = NodeTraversal::nextSkippingChildren(*node, root())) {
@@ -263,9 +263,9 @@ Children:
unsigned acceptNodeResult = acceptNode(node, exceptionState);
if (exceptionState.hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
+ if (acceptNodeResult == NodeFilter::kFilterAccept)
return setCurrent(node);
- if (acceptNodeResult == NodeFilter::FILTER_SKIP)
+ if (acceptNodeResult == NodeFilter::kFilterSkip)
goto Children;
}
return 0;
« no previous file with comments | « third_party/WebKit/Source/core/dom/TreeScope.cpp ('k') | third_party/WebKit/Source/core/editing/DOMSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698