Index: third_party/WebKit/Source/core/html/HTMLElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp |
index bc3c1bd86be98f88dc2d7ee1f7e9544a13ba772f..d9e5e99d584e8c70154ce0cb7367d2736ac72f47 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp |
@@ -38,8 +38,8 @@ |
#include "core/dom/ExceptionCode.h" |
#include "core/dom/NodeTraversal.h" |
#include "core/dom/Text.h" |
-#include "core/dom/shadow/ComposedTreeTraversal.h" |
#include "core/dom/shadow/ElementShadow.h" |
+#include "core/dom/shadow/FlatTreeTraversal.h" |
#include "core/dom/shadow/ShadowRoot.h" |
#include "core/editing/serializers/Serialization.h" |
#include "core/events/EventListener.h" |
@@ -729,12 +729,12 @@ TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) c |
return textDirection; |
} |
- Node* node = ComposedTreeTraversal::firstChild(*this); |
+ Node* node = FlatTreeTraversal::firstChild(*this); |
while (node) { |
// Skip bdi, script, style and text form controls. |
if (equalIgnoringCase(node->nodeName(), "bdi") || isHTMLScriptElement(*node) || isHTMLStyleElement(*node) |
|| (node->isElementNode() && toElement(node)->isTextFormControl())) { |
- node = ComposedTreeTraversal::nextSkippingChildren(*node, this); |
+ node = FlatTreeTraversal::nextSkippingChildren(*node, this); |
continue; |
} |
@@ -742,7 +742,7 @@ TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) c |
if (node->isElementNode()) { |
AtomicString dirAttributeValue = toElement(node)->fastGetAttribute(dirAttr); |
if (isValidDirAttribute(dirAttributeValue)) { |
- node = ComposedTreeTraversal::nextSkippingChildren(*node, this); |
+ node = FlatTreeTraversal::nextSkippingChildren(*node, this); |
continue; |
} |
} |
@@ -756,7 +756,7 @@ TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) c |
return textDirection; |
} |
} |
- node = ComposedTreeTraversal::next(*node, this); |
+ node = FlatTreeTraversal::next(*node, this); |
} |
if (strongDirectionalityTextNode) |
*strongDirectionalityTextNode = 0; |
@@ -773,7 +773,7 @@ void HTMLElement::dirAttributeChanged(const AtomicString& value) |
// If an ancestor has dir=auto, and this node has the first character, |
// changes to dir attribute may affect the ancestor. |
updateDistribution(); |
- Element* parent = ComposedTreeTraversal::parentElement(*this); |
+ Element* parent = FlatTreeTraversal::parentElement(*this); |
if (parent && parent->isHTMLElement() && toHTMLElement(parent)->selfOrAncestorHasDirAutoAttribute()) |
toHTMLElement(parent)->adjustDirectionalityIfNeededAfterChildAttributeChanged(this); |
@@ -787,7 +787,7 @@ void HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged(Element |
TextDirection textDirection = directionality(); |
if (layoutObject() && layoutObject()->style() && layoutObject()->style()->direction() != textDirection) { |
Element* elementToAdjust = this; |
- for (; elementToAdjust; elementToAdjust = ComposedTreeTraversal::parentElement(*elementToAdjust)) { |
+ for (; elementToAdjust; elementToAdjust = FlatTreeTraversal::parentElement(*elementToAdjust)) { |
if (elementAffectsDirectionality(elementToAdjust)) { |
elementToAdjust->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange)); |
return; |
@@ -810,7 +810,7 @@ void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(const Childre |
updateDistribution(); |
- for (Element* elementToAdjust = this; elementToAdjust; elementToAdjust = ComposedTreeTraversal::parentElement(*elementToAdjust)) { |
+ for (Element* elementToAdjust = this; elementToAdjust; elementToAdjust = FlatTreeTraversal::parentElement(*elementToAdjust)) { |
if (elementAffectsDirectionality(elementToAdjust)) { |
toHTMLElement(elementToAdjust)->calculateAndAdjustDirectionality(); |
return; |