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

Unified Diff: content/renderer/render_widget.cc

Issue 10534037: Add text input types newly introduced in WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove TEXT_INPUT_TYPE_MAX_PLUS_1 for switch/case with clang friendly Created 8 years, 6 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 | « no previous file | ui/base/ime/text_input_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index bc319e5fc3eb3f18647a702553f43e66adcb12fb..779f3b6eab8c7b4c9839fb3d6aa06f1b21a1bcde 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1658,12 +1658,24 @@ COMPILE_ASSERT(int(WebKit::WebTextInputTypeTelephone) == \
int(ui::TEXT_INPUT_TYPE_TELEPHONE), mismatching_enums);
COMPILE_ASSERT(int(WebKit::WebTextInputTypeURL) == \
int(ui::TEXT_INPUT_TYPE_URL), mismatching_enums);
+COMPILE_ASSERT(int(WebKit::WebTextInputTypeDate) == \
+ int(ui::TEXT_INPUT_TYPE_DATE), mismatching_enum);
+COMPILE_ASSERT(int(WebKit::WebTextInputTypeDateTime) == \
+ int(ui::TEXT_INPUT_TYPE_DATE_TIME), mismatching_enum);
+COMPILE_ASSERT(int(WebKit::WebTextInputTypeDateTimeLocal) == \
+ int(ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL), mismatching_enum);
+COMPILE_ASSERT(int(WebKit::WebTextInputTypeMonth) == \
+ int(ui::TEXT_INPUT_TYPE_MONTH), mismatching_enum);
+COMPILE_ASSERT(int(WebKit::WebTextInputTypeTime) == \
+ int(ui::TEXT_INPUT_TYPE_TIME), mismatching_enum);
+COMPILE_ASSERT(int(WebKit::WebTextInputTypeWeek) == \
+ int(ui::TEXT_INPUT_TYPE_WEEK), mismatching_enum);
ui::TextInputType RenderWidget::GetTextInputType() {
if (webwidget_) {
int type = webwidget_->textInputType();
// Check the type is in the range representable by ui::TextInputType.
- DCHECK(type <= ui::TEXT_INPUT_TYPE_URL) <<
+ DCHECK_LE(type, ui::TEXT_INPUT_TYPE_WEEK) <<
"WebKit::WebTextInputType and ui::TextInputType not synchronized";
return static_cast<ui::TextInputType>(type);
}
« no previous file with comments | « no previous file | ui/base/ime/text_input_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698