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

Unified Diff: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp

Issue 419053005: Fix crash in HTMLInputElement::setupDateTimeChooserParameters (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 5 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/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h ('k') | Source/core/html/forms/InputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
diff --git a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
index 9f2293665293085f750dee726cee6b3c26c412a6..32c5ab6b321b535bd9887ea3b07c960cbb90c6dd 100644
--- a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -326,7 +326,7 @@ PassRefPtr<RenderStyle> BaseMultipleFieldsDateAndTimeInputType::customStyleForRe
newDisplay = INLINE_FLEX;
else if (originalDisplay == BLOCK)
newDisplay = FLEX;
- TextDirection contentDirection = element().locale().isRTL() ? RTL : LTR;
+ TextDirection contentDirection = computedTextDirection();
if (originalStyle->direction() == contentDirection && originalDisplay == newDisplay)
return originalStyle;
@@ -615,6 +615,11 @@ void BaseMultipleFieldsDateAndTimeInputType::updateClearButtonVisibility()
}
}
+TextDirection BaseMultipleFieldsDateAndTimeInputType::computedTextDirection()
+{
+ return element().locale().isRTL() ? RTL : LTR;
+}
+
} // namespace blink
#endif
« no previous file with comments | « Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h ('k') | Source/core/html/forms/InputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698