| Index: Source/core/html/HTMLTextFormControlElement.cpp
|
| diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
|
| index 75d581472524963b79f74e814aca09074c91ea7f..658ef9df2375ac4015e2f817e6984bd35abc38bf 100644
|
| --- a/Source/core/html/HTMLTextFormControlElement.cpp
|
| +++ b/Source/core/html/HTMLTextFormControlElement.cpp
|
| @@ -700,19 +700,9 @@ HTMLTextFormControlElement* enclosingTextFormControl(Node* container)
|
| return ancestor && isHTMLTextFormControlElement(*ancestor) && container->containingShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot ? toHTMLTextFormControlElement(ancestor) : 0;
|
| }
|
|
|
| -static const HTMLElement* parentHTMLElement(const Element* element)
|
| -{
|
| - while (element) {
|
| - element = element->parentElement();
|
| - if (element && element->isHTMLElement())
|
| - return toHTMLElement(element);
|
| - }
|
| - return 0;
|
| -}
|
| -
|
| String HTMLTextFormControlElement::directionForFormData() const
|
| {
|
| - for (const HTMLElement* element = this; element; element = parentHTMLElement(element)) {
|
| + for (const HTMLElement* element = this; element; element = Traversal<HTMLElement>::firstAncestor(*element)) {
|
| const AtomicString& dirAttributeValue = element->fastGetAttribute(dirAttr);
|
| if (dirAttributeValue.isNull())
|
| continue;
|
|
|