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

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

Issue 14859003: Remove the compile time flag for DATALIST Element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasing after r150849 Created 7 years, 7 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/features.gypi ('k') | Source/core/html/ColorInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
diff --git a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
index a3f887efb6753cdb401bfdce4ffb057fff0a1335..72a9a6d2cc4d1d5a6ea1a66cb98f35cc0557bb58 100644
--- a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -33,6 +33,7 @@
#include "core/html/BaseMultipleFieldsDateAndTimeInputType.h"
#include "CSSValueKeywords.h"
+#include "RuntimeEnabledFeatures.h"
#include "core/dom/KeyboardEvent.h"
#include "core/dom/NodeTraversal.h"
#include "core/dom/shadow/ElementShadow.h"
@@ -307,10 +308,8 @@ void BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree()
container->appendChild(spinButton);
bool shouldAddPickerIndicator = false;
-#if ENABLE(DATALIST_ELEMENT)
if (InputType::themeSupportsDataListUI(this))
shouldAddPickerIndicator = true;
-#endif
RefPtr<RenderTheme> theme = document->page() ? document->page()->theme() : RenderTheme::defaultTheme();
if (theme->supportsCalendarPicker(formControlType())) {
shouldAddPickerIndicator = true;
@@ -508,12 +507,10 @@ void BaseMultipleFieldsDateAndTimeInputType::valueAttributeChanged()
updateInnerTextValue();
}
-#if ENABLE(DATALIST_ELEMENT)
void BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged()
{
updatePickerIndicatorVisibility();
}
-#endif
void BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility()
{
@@ -521,18 +518,18 @@ void BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility()
showPickerIndicator();
return;
}
-#if ENABLE(DATALIST_ELEMENT)
- if (HTMLDataListElement* dataList = element()->dataList()) {
- RefPtr<HTMLCollection> options = dataList->options();
- for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); ++i) {
- if (element()->isValidValue(option->value())) {
- showPickerIndicator();
- return;
+ if (RuntimeEnabledFeatures::dataListElementEnabled()) {
+ if (HTMLDataListElement* dataList = element()->dataList()) {
+ RefPtr<HTMLCollection> options = dataList->options();
+ for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); ++i) {
+ if (element()->isValidValue(option->value())) {
+ showPickerIndicator();
+ return;
+ }
}
}
+ hidePickerIndicator();
}
- hidePickerIndicator();
-#endif
}
void BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator()
« no previous file with comments | « Source/core/features.gypi ('k') | Source/core/html/ColorInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698