| 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()
|
|
|