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

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: 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/HTMLTextAreaElement.cpp
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp
index 59385d87e6c9509bb5ce24461e767df1672eb510..62edbb91755d940aeabbc27ba8fbd4df87389bc7 100644
--- a/Source/core/html/HTMLTextAreaElement.cpp
+++ b/Source/core/html/HTMLTextAreaElement.cpp
@@ -50,6 +50,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"
@@ -214,8 +215,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