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

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

Issue 524593003: Resolve direction correctly when dir attribute is not in a defined state Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added code for resolving direction Created 6 years, 3 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: Source/core/html/HTMLTextFormControlElement.cpp
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index 658ef9df2375ac4015e2f817e6984bd35abc38bf..e23baf1d01a2f9d46e1fdf3cf357f8a8e9780eff 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -700,26 +700,6 @@ HTMLTextFormControlElement* enclosingTextFormControl(Node* container)
return ancestor && isHTMLTextFormControlElement(*ancestor) && container->containingShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot ? toHTMLTextFormControlElement(ancestor) : 0;
}
-String HTMLTextFormControlElement::directionForFormData() const
-{
- for (const HTMLElement* element = this; element; element = Traversal<HTMLElement>::firstAncestor(*element)) {
- const AtomicString& dirAttributeValue = element->fastGetAttribute(dirAttr);
- if (dirAttributeValue.isNull())
- continue;
-
- if (equalIgnoringCase(dirAttributeValue, "rtl") || equalIgnoringCase(dirAttributeValue, "ltr"))
- return dirAttributeValue;
-
- if (equalIgnoringCase(dirAttributeValue, "auto")) {
- bool isAuto;
- TextDirection textDirection = element->directionalityIfhasDirAutoAttribute(isAuto);
- return textDirection == RTL ? "rtl" : "ltr";
- }
- }
-
- return "ltr";
-}
-
HTMLElement* HTMLTextFormControlElement::innerEditorElement() const
{
return toHTMLElement(userAgentShadowRoot()->getElementById(ShadowElementNames::innerEditor()));
« Source/core/html/HTMLElement.cpp ('K') | « Source/core/html/HTMLTextFormControlElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698