Index: Source/core/html/HTMLElement.cpp |
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp |
index 7dec05b9fa663bd1599ed26862f5c046feff249c..1200546e88092bbaeeee22b4d2782a101157a719 100644 |
--- a/Source/core/html/HTMLElement.cpp |
+++ b/Source/core/html/HTMLElement.cpp |
@@ -45,6 +45,7 @@ |
#include "core/editing/markup.h" |
#include "core/html/HTMLBRElement.h" |
#include "core/html/HTMLFormElement.h" |
+#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLTemplateElement.h" |
#include "core/html/HTMLTextFormControlElement.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
@@ -846,12 +847,12 @@ TextDirection HTMLElement::directionalityIfhasDirAutoAttribute(bool& isAuto) con |
TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) const |
{ |
- if (isHTMLTextFormControlElement(this)) { |
- HTMLTextFormControlElement* textElement = toHTMLTextFormControlElement(const_cast<HTMLElement*>(this)); |
+ if (hasTagName(inputTag)) { |
+ HTMLInputElement* inputElement = toHTMLInputElement(const_cast<HTMLElement*>(this)); |
eseidel
2013/08/23 18:57:48
Seems we should just have a const-aware version of
|
bool hasStrongDirectionality; |
- Unicode::Direction textDirection = textElement->value().defaultWritingDirection(&hasStrongDirectionality); |
+ Unicode::Direction textDirection = inputElement->value().defaultWritingDirection(&hasStrongDirectionality); |
if (strongDirectionalityTextNode) |
- *strongDirectionalityTextNode = hasStrongDirectionality ? textElement : 0; |
+ *strongDirectionalityTextNode = hasStrongDirectionality ? inputElement : 0; |
return (textDirection == Unicode::LeftToRight) ? LTR : RTL; |
} |