Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 4cada1d

Browse files
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls
https://bugs.webkit.org/show_bug.cgi?id=213949 Reviewed by Darin Adler. Source/WebCore: Enable date/time related input element types on all Cocoa platforms, but disable them at runtime. To make runtime disabling work completely, the user agent style for these element types was extracted from html.css and is now only added when needed via UserAgentStyle::ensureDefaultStyleSheetsForElement. This is the first step to allowing us to run a subset of the date/time related input element tests on more platforms. If this is successful, we should consider do this for all platforms, not just Cocoa. * css/html.css: Move to RenderTheme accessors for conditional inclusion based on Settings. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isDateTimeField const): Deleted. * html/HTMLInputElement.h: Removed dead isDateTimeField() code. This should have been removed when datetime was removed. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore::InputType::create): Switch from using RuntimeEnabledFeatures to Settings for checking for enabling (Settings allows us to write less boilerplate code and is more versatile for testing) and switch to checking the condition on each InputType construction, rather than just on map's creation (again, this allows us to have more flexibility in testing). * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Deleted. Remove hand written code infavor of code genreated from Settings.yaml. * page/Settings.yaml: Moved from RuntimeEnabledFeatures. * platform/LocalizedStrings.h: Remove weekFormatInLDML() declaration, which had not implementation. * platform/text/PlatformLocale.cpp: (WebCore::Locale::formatDateTime): * platform/text/PlatformLocale.h: Simplify code by marking formatDateTime() virtual on all platforms and un-#ifdefing the base implementation. Platforms that wish to override it still can. * platform/text/cocoa/LocaleCocoa.h: * platform/text/cocoa/LocaleCocoa.mm: * platform/text/ios/LocalizedDateCache.h: * platform/text/ios/LocalizedDateCache.mm: Remove iOS specific #ifdefs around code that should work on all Cocoa platforms. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::colorInputStyleSheet const): (WebCore::RenderTheme::dateInputStyleSheet const): (WebCore::RenderTheme::dateTimeLocalInputStyleSheet const): (WebCore::RenderTheme::monthInputStyleSheet const): (WebCore::RenderTheme::timeInputStyleSheet const): (WebCore::RenderTheme::weekInputStyleSheet const): * rendering/RenderTheme.h: Add default user agent stylesheet strings for input types. All moved from html.css. * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * style/UserAgentStyle.h: Conditionally add the input type specific user agent stylesheets only if the actual input type is being passed in. Since creation of the input types is guarded by a Setting, this can only happen if the type has been enabled. Source/WebKit: * Shared/FocusedElementInformation.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKFocusedElementInfo initWithFocusedElementInformation:isUserInitiated:userObject:]): (-[WKContentView requiresAccessoryView]): (-[WKContentView textInputTraits]): (mayContainSelectableText): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation): Remove DateTime from the InputType enum. This should have been removed when datetime was removed. * Shared/WebPreferences.yaml: Add preferences for all the date/time related input types, and have them automatically link up with the newly added WebCore Settings of the same names (this is the default behavior if no explicit webcoreBinding: is provided). * Shared/WebPreferencesDefaultValues.h: Disable date/time input elements by default for non iOS/watchOS cocoa platforms. For non-Cocoa platforms (and iOS/watchOS), they are enabled by default, but only actually get enabled if the appropriate ENABLE_* macro is also set. Source/WTF: * wtf/PlatformEnableCocoa.h: Enable building date/time input types on all Cocoa ports. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@263977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 50ef974 commit 4cada1d

27 files changed

+347
-188
lines changed

Source/WTF/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2020-07-06 Sam Weinig <[email protected]>
2+
3+
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls
4+
https://bugs.webkit.org/show_bug.cgi?id=213949
5+
6+
Reviewed by Darin Adler.
7+
8+
* wtf/PlatformEnableCocoa.h:
9+
Enable building date/time input types on all Cocoa ports.
10+
111
2020-07-06 Geoffrey Garen <[email protected]>
212

313
RunLoop::dispatch should only call wakeUp when needed

Source/WTF/wtf/PlatformEnableCocoa.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,23 +236,23 @@
236236
#define ENABLE_INDEXED_DATABASE_IN_WORKERS 1
237237
#endif
238238

239-
#if !defined(ENABLE_INPUT_TYPE_DATE) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)
239+
#if !defined(ENABLE_INPUT_TYPE_DATE)
240240
#define ENABLE_INPUT_TYPE_DATE 1
241241
#endif
242242

243-
#if !defined(ENABLE_INPUT_TYPE_DATETIMELOCAL) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)
243+
#if !defined(ENABLE_INPUT_TYPE_DATETIMELOCAL)
244244
#define ENABLE_INPUT_TYPE_DATETIMELOCAL 1
245245
#endif
246246

247-
#if !defined(ENABLE_INPUT_TYPE_MONTH) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)
247+
#if !defined(ENABLE_INPUT_TYPE_MONTH)
248248
#define ENABLE_INPUT_TYPE_MONTH 1
249249
#endif
250250

251-
#if !defined(ENABLE_INPUT_TYPE_TIME) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)
251+
#if !defined(ENABLE_INPUT_TYPE_TIME)
252252
#define ENABLE_INPUT_TYPE_TIME 1
253253
#endif
254254

255-
#if !defined(ENABLE_INPUT_TYPE_WEEK) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)
255+
#if !defined(ENABLE_INPUT_TYPE_WEEK)
256256
#define ENABLE_INPUT_TYPE_WEEK 1
257257
#endif
258258

Source/WebCore/ChangeLog

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
1+
2020-07-06 Sam Weinig <[email protected]>
2+
3+
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls
4+
https://bugs.webkit.org/show_bug.cgi?id=213949
5+
6+
Reviewed by Darin Adler.
7+
8+
Enable date/time related input element types on all Cocoa platforms, but disable them at runtime.
9+
To make runtime disabling work completely, the user agent style for these element types was
10+
extracted from html.css and is now only added when needed via UserAgentStyle::ensureDefaultStyleSheetsForElement.
11+
12+
This is the first step to allowing us to run a subset of the date/time related input element tests
13+
on more platforms. If this is successful, we should consider do this for all platforms, not just Cocoa.
14+
15+
* css/html.css:
16+
Move to RenderTheme accessors for conditional inclusion based on Settings.
17+
18+
* html/HTMLInputElement.cpp:
19+
(WebCore::HTMLInputElement::isDateTimeField const): Deleted.
20+
* html/HTMLInputElement.h:
21+
Removed dead isDateTimeField() code. This should have been removed when datetime was removed.
22+
23+
* html/InputType.cpp:
24+
(WebCore::createInputTypeFactoryMap):
25+
(WebCore::InputType::create):
26+
Switch from using RuntimeEnabledFeatures to Settings for checking for enabling (Settings allows
27+
us to write less boilerplate code and is more versatile for testing) and switch to checking the
28+
condition on each InputType construction, rather than just on map's creation (again, this allows
29+
us to have more flexibility in testing).
30+
31+
* page/RuntimeEnabledFeatures.h:
32+
(WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const): Deleted.
33+
(WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled): Deleted.
34+
(WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled const): Deleted.
35+
(WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Deleted.
36+
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled const): Deleted.
37+
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Deleted.
38+
(WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled const): Deleted.
39+
(WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Deleted.
40+
(WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled const): Deleted.
41+
(WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Deleted.
42+
(WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled const): Deleted.
43+
(WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Deleted.
44+
Remove hand written code infavor of code genreated from Settings.yaml.
45+
46+
* page/Settings.yaml:
47+
Moved from RuntimeEnabledFeatures.
48+
49+
* platform/LocalizedStrings.h:
50+
Remove weekFormatInLDML() declaration, which had not implementation.
51+
52+
* platform/text/PlatformLocale.cpp:
53+
(WebCore::Locale::formatDateTime):
54+
* platform/text/PlatformLocale.h:
55+
Simplify code by marking formatDateTime() virtual on all platforms and un-#ifdefing
56+
the base implementation. Platforms that wish to override it still can.
57+
58+
* platform/text/cocoa/LocaleCocoa.h:
59+
* platform/text/cocoa/LocaleCocoa.mm:
60+
* platform/text/ios/LocalizedDateCache.h:
61+
* platform/text/ios/LocalizedDateCache.mm:
62+
Remove iOS specific #ifdefs around code that should work on all Cocoa platforms.
63+
64+
* rendering/RenderTheme.cpp:
65+
(WebCore::RenderTheme::colorInputStyleSheet const):
66+
(WebCore::RenderTheme::dateInputStyleSheet const):
67+
(WebCore::RenderTheme::dateTimeLocalInputStyleSheet const):
68+
(WebCore::RenderTheme::monthInputStyleSheet const):
69+
(WebCore::RenderTheme::timeInputStyleSheet const):
70+
(WebCore::RenderTheme::weekInputStyleSheet const):
71+
* rendering/RenderTheme.h:
72+
Add default user agent stylesheet strings for input types. All moved from html.css.
73+
74+
* style/UserAgentStyle.cpp:
75+
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
76+
* style/UserAgentStyle.h:
77+
Conditionally add the input type specific user agent stylesheets only if the actual
78+
input type is being passed in. Since creation of the input types is guarded by a Setting,
79+
this can only happen if the type has been enabled.
80+
181
2020-07-06 Rob Buis <[email protected]>
282

383
Allow setting empty host/hostname on URLs if they use file scheme

Source/WebCore/css/html.css

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -475,62 +475,6 @@ input[type="search"]::-webkit-search-results-button {
475475
flex: none;
476476
}
477477

478-
#if defined(ENABLE_INPUT_TYPE_DATE) && ENABLE_INPUT_TYPE_DATE
479-
input[type="date"] {
480-
align-items: center;
481-
-webkit-appearance: menulist-button;
482-
display: -webkit-inline-flex;
483-
overflow: hidden;
484-
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
485-
width: 10em;
486-
#endif
487-
}
488-
#endif
489-
#if defined(ENABLE_INPUT_TYPE_DATETIMELOCAL) && ENABLE_INPUT_TYPE_DATETIMELOCAL
490-
input[type="datetime-local"] {
491-
align-items: center;
492-
-webkit-appearance: menulist-button;
493-
display: -webkit-inline-flex;
494-
overflow: hidden;
495-
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
496-
width: 10em;
497-
#endif
498-
}
499-
#endif
500-
#if defined(ENABLE_INPUT_TYPE_MONTH) && ENABLE_INPUT_TYPE_MONTH
501-
input[type="month"] {
502-
align-items: center;
503-
-webkit-appearance: menulist-button;
504-
display: -webkit-inline-flex;
505-
overflow: hidden;
506-
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
507-
width: 10em;
508-
#endif
509-
}
510-
#endif
511-
#if defined(ENABLE_INPUT_TYPE_TIME) && ENABLE_INPUT_TYPE_TIME
512-
input[type="time"] {
513-
align-items: center;
514-
-webkit-appearance: menulist-button;
515-
display: -webkit-inline-flex;
516-
overflow: hidden;
517-
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
518-
width: 10em;
519-
#endif
520-
}
521-
#endif
522-
#if defined(ENABLE_INPUT_TYPE_WEEK) && ENABLE_INPUT_TYPE_WEEK
523-
#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
524-
input[type="week"] {
525-
align-items: center;
526-
-webkit-appearance: menulist-button;
527-
display: -webkit-inline-flex;
528-
overflow: hidden;
529-
width: 10em;
530-
}
531-
#endif
532-
#endif
533-
534478
input::-webkit-date-and-time-value {
535479
#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY
536480
margin-right: 18px;

Source/WebCore/html/HTMLInputElement.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,11 +1766,6 @@ bool HTMLInputElement::isDateField() const
17661766
return m_inputType->isDateField();
17671767
}
17681768

1769-
bool HTMLInputElement::isDateTimeField() const
1770-
{
1771-
return m_inputType->isDateTimeField();
1772-
}
1773-
17741769
bool HTMLInputElement::isDateTimeLocalField() const
17751770
{
17761771
return m_inputType->isDateTimeLocalField();

Source/WebCore/html/HTMLInputElement.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ class HTMLInputElement : public HTMLTextFormControlElement {
122122
WEBCORE_EXPORT bool isTelephoneField() const;
123123
WEBCORE_EXPORT bool isURLField() const;
124124
WEBCORE_EXPORT bool isDateField() const;
125-
WEBCORE_EXPORT bool isDateTimeField() const;
126125
WEBCORE_EXPORT bool isDateTimeLocalField() const;
127126
WEBCORE_EXPORT bool isMonthField() const;
128127
WEBCORE_EXPORT bool isTimeField() const;

Source/WebCore/html/InputType.cpp

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
#include "RenderElement.h"
6262
#include "RenderTheme.h"
6363
#include "ResetInputType.h"
64-
#include "RuntimeEnabledFeatures.h"
6564
#include "ScopedEventQueue.h"
6665
#include "SearchInputType.h"
66+
#include "Settings.h"
6767
#include "ShadowRoot.h"
6868
#include "SubmitInputType.h"
6969
#include "TelephoneInputType.h"
@@ -82,13 +82,12 @@ namespace WebCore {
8282

8383
using namespace HTMLNames;
8484

85-
typedef bool (RuntimeEnabledFeatures::*InputTypeConditionalFunction)() const;
85+
typedef bool (Settings::*InputTypeConditionalFunction)() const;
8686
typedef const AtomString& (*InputTypeNameFunction)();
8787
typedef Ref<InputType> (*InputTypeFactoryFunction)(HTMLInputElement&);
88-
typedef HashMap<AtomString, InputTypeFactoryFunction, ASCIICaseInsensitiveHash> InputTypeFactoryMap;
88+
typedef HashMap<AtomString, std::pair<InputTypeConditionalFunction, InputTypeFactoryFunction>, ASCIICaseInsensitiveHash> InputTypeFactoryMap;
8989

90-
template<class T>
91-
static Ref<InputType> createInputType(HTMLInputElement& element)
90+
template<class T> static Ref<InputType> createInputType(HTMLInputElement& element)
9291
{
9392
return adoptRef(*new T(element));
9493
}
@@ -103,20 +102,20 @@ static InputTypeFactoryMap createInputTypeFactoryMap()
103102
{ nullptr, &InputTypeNames::button, &createInputType<ButtonInputType> },
104103
{ nullptr, &InputTypeNames::checkbox, &createInputType<CheckboxInputType> },
105104
#if ENABLE(INPUT_TYPE_COLOR)
106-
{ &RuntimeEnabledFeatures::inputTypeColorEnabled, &InputTypeNames::color, &createInputType<ColorInputType> },
105+
{ &Settings::inputTypeColorEnabled, &InputTypeNames::color, &createInputType<ColorInputType> },
107106
#endif
108107
#if ENABLE(INPUT_TYPE_DATE)
109-
{ &RuntimeEnabledFeatures::inputTypeDateEnabled, &InputTypeNames::date, &createInputType<DateInputType> },
108+
{ &Settings::inputTypeDateEnabled, &InputTypeNames::date, &createInputType<DateInputType> },
110109
#endif
111110
#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
112-
{ &RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled, &InputTypeNames::datetimelocal, &createInputType<DateTimeLocalInputType> },
111+
{ &Settings::inputTypeDateTimeLocalEnabled, &InputTypeNames::datetimelocal, &createInputType<DateTimeLocalInputType> },
113112
#endif
114113
{ nullptr, &InputTypeNames::email, &createInputType<EmailInputType> },
115114
{ nullptr, &InputTypeNames::file, &createInputType<FileInputType> },
116115
{ nullptr, &InputTypeNames::hidden, &createInputType<HiddenInputType> },
117116
{ nullptr, &InputTypeNames::image, &createInputType<ImageInputType> },
118117
#if ENABLE(INPUT_TYPE_MONTH)
119-
{ &RuntimeEnabledFeatures::inputTypeMonthEnabled, &InputTypeNames::month, &createInputType<MonthInputType> },
118+
{ &Settings::inputTypeMonthEnabled, &InputTypeNames::month, &createInputType<MonthInputType> },
120119
#endif
121120
{ nullptr, &InputTypeNames::number, &createInputType<NumberInputType> },
122121
{ nullptr, &InputTypeNames::password, &createInputType<PasswordInputType> },
@@ -127,29 +126,27 @@ static InputTypeFactoryMap createInputTypeFactoryMap()
127126
{ nullptr, &InputTypeNames::submit, &createInputType<SubmitInputType> },
128127
{ nullptr, &InputTypeNames::telephone, &createInputType<TelephoneInputType> },
129128
#if ENABLE(INPUT_TYPE_TIME)
130-
{ &RuntimeEnabledFeatures::inputTypeTimeEnabled, &InputTypeNames::time, &createInputType<TimeInputType> },
129+
{ &Settings::inputTypeTimeEnabled, &InputTypeNames::time, &createInputType<TimeInputType> },
131130
#endif
132131
{ nullptr, &InputTypeNames::url, &createInputType<URLInputType> },
133132
#if ENABLE(INPUT_TYPE_WEEK)
134-
{ &RuntimeEnabledFeatures::inputTypeWeekEnabled, &InputTypeNames::week, &createInputType<WeekInputType> },
133+
{ &Settings::inputTypeWeekEnabled, &InputTypeNames::week, &createInputType<WeekInputType> },
135134
#endif
136135
// No need to register "text" because it is the default type.
137136
};
138137

139138
InputTypeFactoryMap map;
140-
for (auto& inputType : inputTypes) {
141-
auto conditionalFunction = inputType.conditionalFunction;
142-
if (!conditionalFunction || (RuntimeEnabledFeatures::sharedFeatures().*conditionalFunction)())
143-
map.add(inputType.nameFunction(), inputType.factoryFunction);
144-
}
139+
for (auto& inputType : inputTypes)
140+
map.add(inputType.nameFunction(), std::make_pair(inputType.conditionalFunction, inputType.factoryFunction));
145141
return map;
146142
}
147143

148144
Ref<InputType> InputType::create(HTMLInputElement& element, const AtomString& typeName)
149145
{
150146
if (!typeName.isEmpty()) {
151147
static const auto factoryMap = makeNeverDestroyed(createInputTypeFactoryMap());
152-
if (auto factory = factoryMap.get().get(typeName))
148+
auto&& [conditional, factory] = factoryMap.get().get(typeName);
149+
if (factory && (!conditional || std::invoke(conditional, element.document().settings())))
153150
return factory(element);
154151
}
155152
return adoptRef(*new TextInputType(element));

Source/WebCore/page/RuntimeEnabledFeatures.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ RuntimeEnabledFeatures::RuntimeEnabledFeatures()
4747
#if PLATFORM(WATCHOS)
4848
m_isWebSocketEnabled = false;
4949
#endif
50-
#if PLATFORM(GTK) && ENABLE(INPUT_TYPE_COLOR)
51-
m_isInputTypeColorEnabled = true;
52-
#endif
5350
}
5451

5552
RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures()

Source/WebCore/page/RuntimeEnabledFeatures.h

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -260,41 +260,11 @@ class RuntimeEnabledFeatures {
260260
bool legacyCSSVendorPrefixesEnabled() const { return m_isLegacyCSSVendorPrefixesEnabled; }
261261
#endif
262262

263-
#if ENABLE(INPUT_TYPE_COLOR)
264-
bool inputTypeColorEnabled() const { return m_isInputTypeColorEnabled; }
265-
void setInputTypeColorEnabled(bool isEnabled) { m_isInputTypeColorEnabled = isEnabled; }
266-
#endif
267-
268263
#if ENABLE(DATALIST_ELEMENT)
269264
bool dataListElementEnabled() const { return m_isDataListElementEnabled; }
270265
void setDataListElementEnabled(bool isEnabled) { m_isDataListElementEnabled = isEnabled; }
271266
#endif
272267

273-
#if ENABLE(INPUT_TYPE_DATE)
274-
bool inputTypeDateEnabled() const { return m_isInputTypeDateEnabled; }
275-
void setInputTypeDateEnabled(bool isEnabled) { m_isInputTypeDateEnabled = isEnabled; }
276-
#endif
277-
278-
#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
279-
bool inputTypeDateTimeLocalEnabled() const { return m_isInputTypeDateTimeLocalEnabled; }
280-
void setInputTypeDateTimeLocalEnabled(bool isEnabled) { m_isInputTypeDateTimeLocalEnabled = isEnabled; }
281-
#endif
282-
283-
#if ENABLE(INPUT_TYPE_MONTH)
284-
bool inputTypeMonthEnabled() const { return m_isInputTypeMonthEnabled; }
285-
void setInputTypeMonthEnabled(bool isEnabled) { m_isInputTypeMonthEnabled = isEnabled; }
286-
#endif
287-
288-
#if ENABLE(INPUT_TYPE_TIME)
289-
bool inputTypeTimeEnabled() const { return m_isInputTypeTimeEnabled; }
290-
void setInputTypeTimeEnabled(bool isEnabled) { m_isInputTypeTimeEnabled = isEnabled; }
291-
#endif
292-
293-
#if ENABLE(INPUT_TYPE_WEEK)
294-
bool inputTypeWeekEnabled() const { return m_isInputTypeWeekEnabled; }
295-
void setInputTypeWeekEnabled(bool isEnabled) { m_isInputTypeWeekEnabled = isEnabled; }
296-
#endif
297-
298268
#if ENABLE(GAMEPAD)
299269
void setGamepadsEnabled(bool areEnabled) { m_areGamepadsEnabled = areEnabled; }
300270
bool gamepadsEnabled() const { return m_areGamepadsEnabled; }
@@ -522,34 +492,10 @@ class RuntimeEnabledFeatures {
522492
bool m_isLegacyCSSVendorPrefixesEnabled { false };
523493
#endif
524494

525-
#if ENABLE(INPUT_TYPE_COLOR)
526-
bool m_isInputTypeColorEnabled { false };
527-
#endif
528-
529495
#if ENABLE(DATALIST_ELEMENT)
530496
bool m_isDataListElementEnabled { false };
531497
#endif
532498

533-
#if ENABLE(INPUT_TYPE_DATE)
534-
bool m_isInputTypeDateEnabled { true };
535-
#endif
536-
537-
#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
538-
bool m_isInputTypeDateTimeLocalEnabled { true };
539-
#endif
540-
541-
#if ENABLE(INPUT_TYPE_MONTH)
542-
bool m_isInputTypeMonthEnabled { true };
543-
#endif
544-
545-
#if ENABLE(INPUT_TYPE_TIME)
546-
bool m_isInputTypeTimeEnabled { true };
547-
#endif
548-
549-
#if ENABLE(INPUT_TYPE_WEEK)
550-
bool m_isInputTypeWeekEnabled { true };
551-
#endif
552-
553499
#if ENABLE(GAMEPAD)
554500
bool m_areGamepadsEnabled { false };
555501
#endif

0 commit comments

Comments
 (0)