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

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 69543007: Have NodeTraversal::nextSkippingChildren() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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/html/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index ca936a439440cae9faa2534a034264ba4f1ac7da..3be827717869a0807fb0eb671583a1ab14fc78c5 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -771,7 +771,7 @@ static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastN
if (elementAffectsDirectionality(node)) {
if (node == lastNode)
return;
- node = NodeTraversal::nextSkippingChildren(node, firstNode);
+ node = NodeTraversal::nextSkippingChildren(*node, firstNode);
continue;
}
node->setSelfOrAncestorHasDirAutoAttribute(flag);
@@ -829,7 +829,7 @@ TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) c
// Skip bdi, script, style and text form controls.
if (equalIgnoringCase(node->nodeName(), "bdi") || node->hasTagName(scriptTag) || node->hasTagName(styleTag)
|| (node->isElementNode() && toElement(node)->isTextFormControl())) {
- node = NodeTraversal::nextSkippingChildren(node, this);
+ node = NodeTraversal::nextSkippingChildren(*node, this);
continue;
}
@@ -837,7 +837,7 @@ TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) c
if (node->isElementNode()) {
AtomicString dirAttributeValue = toElement(node)->fastGetAttribute(dirAttr);
if (isValidDirAttribute(dirAttributeValue)) {
- node = NodeTraversal::nextSkippingChildren(node, this);
+ node = NodeTraversal::nextSkippingChildren(*node, this);
continue;
}
}
@@ -898,8 +898,8 @@ void HTMLElement::calculateAndAdjustDirectionality()
void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeChange, int childCountDelta)
{
if (document().renderer() && childCountDelta < 0) {
- Node* node = beforeChange ? NodeTraversal::nextSkippingChildren(beforeChange) : 0;
- for (int counter = 0; node && counter < childCountDelta; counter++, node = NodeTraversal::nextSkippingChildren(node)) {
+ Node* node = beforeChange ? NodeTraversal::nextSkippingChildren(*beforeChange) : 0;
+ for (int counter = 0; node && counter < childCountDelta; counter++, node = NodeTraversal::nextSkippingChildren(*node)) {
if (elementAffectsDirectionality(node))
continue;
@@ -910,9 +910,9 @@ void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeC
if (!selfOrAncestorHasDirAutoAttribute())
return;
- Node* oldMarkedNode = beforeChange ? NodeTraversal::nextSkippingChildren(beforeChange) : 0;
+ Node* oldMarkedNode = beforeChange ? NodeTraversal::nextSkippingChildren(*beforeChange) : 0;
while (oldMarkedNode && elementAffectsDirectionality(oldMarkedNode))
- oldMarkedNode = NodeTraversal::nextSkippingChildren(oldMarkedNode, this);
+ oldMarkedNode = NodeTraversal::nextSkippingChildren(*oldMarkedNode, this);
if (oldMarkedNode)
setHasDirAutoFlagRecursively(oldMarkedNode, false);
« no previous file with comments | « Source/core/html/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698