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

Unified Diff: Source/core/html/HTMLTextAreaElement.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: Incorporating review comments Created 6 years, 3 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
Index: Source/core/html/HTMLTextAreaElement.cpp
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp
index aee74dfd44c484d1eb9d6286225aeba93da99afc..ea7e9395ecb37dd8d81742b8dfc5624785a5b6f0 100644
--- a/Source/core/html/HTMLTextAreaElement.cpp
+++ b/Source/core/html/HTMLTextAreaElement.cpp
@@ -49,6 +49,7 @@
#include "core/page/ChromeClient.h"
#include "core/rendering/RenderTextControlMultiLine.h"
#include "platform/text/PlatformLocale.h"
+#include "platform/text/TextDirection.h"
#include "wtf/StdLibExtras.h"
#include "wtf/text/StringBuilder.h"
@@ -211,8 +212,10 @@ bool HTMLTextAreaElement::appendFormData(FormDataList& encoding, bool)
encoding.appendData(name(), text);
const AtomicString& dirnameAttrValue = fastGetAttribute(dirnameAttr);
- if (!dirnameAttrValue.isNull())
- encoding.appendData(dirnameAttrValue, directionForFormData());
+ if (!dirnameAttrValue.isNull()) {
+ const AtomicString& dirValue = determineDirection() == RTL ? "rtl" : "ltr";
+ encoding.appendData(dirnameAttrValue, dirValue);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698