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

Unified Diff: Source/core/html/forms/TextFieldInputType.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: Fix failing test Created 6 years, 1 month 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/forms/TextFieldInputType.cpp
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp
index 135d7f9c7ca7f25b883b3fc76c6d8bc134747121..45d2da11b227bfbb54e6572bbd8b3059da5e00ad 100644
--- a/Source/core/html/forms/TextFieldInputType.cpp
+++ b/Source/core/html/forms/TextFieldInputType.cpp
@@ -53,6 +53,7 @@
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderTextControlSingleLine.h"
#include "core/rendering/RenderTheme.h"
+#include "platform/text/TextDirection.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -470,8 +471,10 @@ bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) cons
{
InputType::appendFormData(list, multipart);
const AtomicString& dirnameAttrValue = element().fastGetAttribute(dirnameAttr);
- if (!dirnameAttrValue.isNull())
- list.appendData(dirnameAttrValue, element().directionForFormData());
+ if (!dirnameAttrValue.isNull()) {
+ const AtomicString& dirValue = element().determineDirection() == RTL ? "rtl" :"ltr";
+ list.appendData(dirnameAttrValue, dirValue);
+ }
return true;
}
« Source/core/html/HTMLElement.cpp ('K') | « Source/core/html/HTMLTextFormControlElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698