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

Unified Diff: Source/WebCore/html/shadow/DateTimeEditElement.cpp

Issue 11548050: Merge 137152 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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/WebCore/html/shadow/DateTimeEditElement.cpp
===================================================================
--- Source/WebCore/html/shadow/DateTimeEditElement.cpp (revision 137542)
+++ Source/WebCore/html/shadow/DateTimeEditElement.cpp (working copy)
@@ -47,6 +47,7 @@
namespace WebCore {
using namespace HTMLNames;
+using namespace WTF::Unicode;
class DateTimeEditBuilder : private DateTimeFormat::TokenHandler {
WTF_MAKE_NONCOPYABLE(DateTimeEditBuilder);
@@ -288,6 +289,11 @@
ASSERT(text.length());
RefPtr<HTMLDivElement> element = HTMLDivElement::create(m_editElement.document());
element->setShadowPseudoId(textPseudoId);
+ if (m_parameters.locale.isRTL() && text.length()) {
+ Direction dir = direction(text[0]);
+ if (dir == SegmentSeparator || dir == WhiteSpaceNeutral || dir == OtherNeutral)
+ element->appendChild(Text::create(m_editElement.document(), String(&rightToLeftMark, 1)));
+ }
element->appendChild(Text::create(m_editElement.document(), text));
m_editElement.appendChild(element);
}

Powered by Google App Engine
This is Rietveld 408576698