| Index: Source/web/WebFormControlElement.cpp
|
| diff --git a/Source/web/WebFormControlElement.cpp b/Source/web/WebFormControlElement.cpp
|
| index 34ec147ad70ecc8ccc350e28cf3e0e9f7755f729..997b1f5738b9366fc8a352325bff3ca840ecb17b 100644
|
| --- a/Source/web/WebFormControlElement.cpp
|
| +++ b/Source/web/WebFormControlElement.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "config.h"
|
| #include "public/web/WebFormControlElement.h"
|
|
|
| +#include "core/dom/NodeRenderStyle.h"
|
| #include "core/html/HTMLFormControlElement.h"
|
| #include "core/html/HTMLFormElement.h"
|
| #include "core/html/HTMLInputElement.h"
|
| @@ -171,11 +172,9 @@ int WebFormControlElement::selectionEnd() const
|
|
|
| WebString WebFormControlElement::directionForFormData() const
|
| {
|
| - if (isHTMLInputElement(*m_private))
|
| - return constUnwrap<HTMLInputElement>()->directionForFormData();
|
| - if (isHTMLTextAreaElement(*m_private))
|
| - return constUnwrap<HTMLTextAreaElement>()->directionForFormData();
|
| - return WebString();
|
| + if (RenderStyle* style = constUnwrap<HTMLFormControlElement>()->renderStyle())
|
| + return style->isLeftToRightDirection() ? WebString::fromUTF8("ltr") : WebString::fromUTF8("rtl");
|
| + return WebString::fromUTF8("ltr");
|
| }
|
|
|
| bool WebFormControlElement::isActivatedSubmit() const
|
|
|