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

Unified Diff: Source/core/rendering/RenderTheme.cpp

Issue 72683003: Auto-generate InputTypeNames source from InputTypeNames.in. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
Index: Source/core/rendering/RenderTheme.cpp
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp
index 04af283b615142cf5348c35ebae339964623ad99..3ee3ec80124d6647f165e781d85ffe37d47297d0 100644
--- a/Source/core/rendering/RenderTheme.cpp
+++ b/Source/core/rendering/RenderTheme.cpp
@@ -24,6 +24,7 @@
#include "CSSValueKeywords.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include "RuntimeEnabledFeatures.h"
#include "core/dom/Document.h"
#include "core/dom/shadow/ElementShadow.h"
@@ -34,7 +35,6 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLMeterElement.h"
#include "core/html/HTMLOptionElement.h"
-#include "core/html/forms/InputTypeNames.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/html/shadow/MediaControlElements.h"
#include "core/html/shadow/ShadowElementNames.h"
@@ -1172,26 +1172,26 @@ bool RenderTheme::shouldOpenPickerWithF4Key() const
bool RenderTheme::supportsDataListUI(const AtomicString& type) const
{
- return type == InputTypeNames::text() || type == InputTypeNames::search() || type == InputTypeNames::url()
- || type == InputTypeNames::telephone() || type == InputTypeNames::email() || type == InputTypeNames::number()
- || type == InputTypeNames::color()
- || type == InputTypeNames::date()
- || type == InputTypeNames::datetime()
- || type == InputTypeNames::datetimelocal()
- || type == InputTypeNames::month()
- || type == InputTypeNames::week()
- || type == InputTypeNames::time()
- || type == InputTypeNames::range();
+ return type == InputTypeNames::text || type == InputTypeNames::search || type == InputTypeNames::url
+ || type == InputTypeNames::tel || type == InputTypeNames::email || type == InputTypeNames::number
+ || type == InputTypeNames::color
+ || type == InputTypeNames::date
+ || type == InputTypeNames::datetime
+ || type == InputTypeNames::datetime_local
+ || type == InputTypeNames::month
+ || type == InputTypeNames::week
+ || type == InputTypeNames::time
+ || type == InputTypeNames::range;
}
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
bool RenderTheme::supportsCalendarPicker(const AtomicString& type) const
{
- return type == InputTypeNames::date()
- || type == InputTypeNames::datetime()
- || type == InputTypeNames::datetimelocal()
- || type == InputTypeNames::month()
- || type == InputTypeNames::week();
+ return type == InputTypeNames::date
+ || type == InputTypeNames::datetime
+ || type == InputTypeNames::datetime_local
+ || type == InputTypeNames::month
+ || type == InputTypeNames::week;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698