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

Unified Diff: Source/WebCore/html/HTMLInputElement.cpp

Issue 12159003: Merge 141195 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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/WebCore/html/HTMLInputElement.h ('k') | Source/WebCore/html/InputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLInputElement.cpp
===================================================================
--- Source/WebCore/html/HTMLInputElement.cpp (revision 141524)
+++ Source/WebCore/html/HTMLInputElement.cpp (working copy)
@@ -56,6 +56,7 @@
#include "Language.h"
#include "LocalizedStrings.h"
#include "MouseEvent.h"
+#include "PlatformLocale.h"
#include "RenderTextControlSingleLine.h"
#include "RenderTheme.h"
#include "RuntimeEnabledFeatures.h"
@@ -63,6 +64,7 @@
#include "SearchInputType.h"
#include "ShadowRoot.h"
#include "ScriptEventListener.h"
+#include "StyleResolver.h"
#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
@@ -132,6 +134,9 @@
, m_inputType(InputType::createText(this))
{
ASSERT(hasTagName(inputTag) || hasTagName(isindexTag));
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+ setHasCustomCallbacks();
+#endif
}
PassRefPtr<HTMLInputElement> HTMLInputElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form, bool createdByParser)
@@ -1936,4 +1941,19 @@
#endif
}
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
+{
+ RefPtr<RenderStyle> originalStyle = document()->styleResolver()->styleForElement(this);
+ if (!m_inputType->shouldApplyLocaleDirection())
+ return originalStyle.release();
+ TextDirection contentDirection = locale().isRTL() ? RTL : LTR;
+ if (originalStyle->direction() == contentDirection)
+ return originalStyle.release();
+ RefPtr<RenderStyle> style = RenderStyle::clone(originalStyle.get());
+ style->setDirection(contentDirection);
+ return style.release();
+}
+#endif
+
} // namespace
« no previous file with comments | « Source/WebCore/html/HTMLInputElement.h ('k') | Source/WebCore/html/InputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698