Chromium Code Reviews| Index: Source/core/html/HTMLTextFormControlElement.cpp |
| diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp |
| index 75d581472524963b79f74e814aca09074c91ea7f..5e33ca46246ad85f26384074f64de46f5ceb8259 100644 |
| --- a/Source/core/html/HTMLTextFormControlElement.cpp |
| +++ b/Source/core/html/HTMLTextFormControlElement.cpp |
| @@ -31,6 +31,7 @@ |
| #include "core/accessibility/AXObjectCache.h" |
| #include "core/dom/Document.h" |
| #include "core/dom/NodeList.h" |
| +#include "core/dom/NodeRenderStyle.h" |
| #include "core/dom/NodeTraversal.h" |
| #include "core/dom/Text.h" |
| #include "core/dom/shadow/ShadowRoot.h" |
| @@ -730,6 +731,15 @@ String HTMLTextFormControlElement::directionForFormData() const |
| return "ltr"; |
| } |
| +String HTMLTextFormControlElement::directionForAutocomplete() const |
|
tkent
2014/08/07 05:25:02
You don't need to add new function.
Please replace
Sunil Ratnu
2014/08/07 07:06:18
Done.
|
| +{ |
| + if (const HTMLElement* element = this) { |
|
tkent
2014/08/07 05:25:02
|this| must not be null.
Sunil Ratnu
2014/08/07 07:06:18
|this| can not be NULL here. What i understood it
tkent
2014/08/07 07:13:46
Right. The check is unnecessary.
|
| + if (RenderStyle* style = element->renderStyle()) |
| + return style->isLeftToRightDirection() ? "ltr" : "rtl"; |
| + } |
| + return "ltr"; |
| +} |
| + |
| HTMLElement* HTMLTextFormControlElement::innerEditorElement() const |
| { |
| return toHTMLElement(userAgentShadowRoot()->getElementById(ShadowElementNames::innerEditor())); |