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

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

Issue 419023007: Autocomplete confused about direction if inline style and inherited dir attribute are mixed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporated review comments Created 6 years, 4 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
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.h ('k') | Source/web/WebFormControlElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.h ('k') | Source/web/WebFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698