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

Unified Diff: content/renderer/render_widget.cc

Issue 11418295: Use WebCore:DateTimeChooser for date/time form types instead of considering them text fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years 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: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index a643a4c947f6c9c933d52be9d0205cfbfe7f7dac..ae78869afdc204fe472a43c7b8ea8e63413f94db 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1723,11 +1723,24 @@ void RenderWidget::set_next_paint_is_repaint_ack() {
next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK;
}
+static bool IsDialogType(ui::TextInputType type) {
bulach 2012/12/03 20:23:03 is this going to hold for all platforms? I mean, "
Miguel Garcia 2012/12/04 10:40:43 I renamed it to IsDateTimeInput. We should really
+ return type == ui::TEXT_INPUT_TYPE_DATE
+ || type == ui::TEXT_INPUT_TYPE_DATE_TIME
+ || type == ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL
+ || type == ui::TEXT_INPUT_TYPE_MONTH
+ || type == ui::TEXT_INPUT_TYPE_TIME
+ || type == ui::TEXT_INPUT_TYPE_WEEK;
+}
+
+
void RenderWidget::UpdateTextInputState(ShowIme show_ime) {
bool show_ime_if_needed = (show_ime == SHOW_IME_IF_NEEDED);
if (!show_ime_if_needed && !input_method_is_active_)
return;
ui::TextInputType new_type = GetTextInputType();
+ if (IsDialogType(new_type))
+ return; // not handled as text anymore
bulach 2012/12/03 20:23:03 nit: remove the "anymore", won't make much sense i
Miguel Garcia 2012/12/04 10:40:43 Done.
+
WebKit::WebTextInputInfo new_info;
if (webwidget_)
new_info = webwidget_->textInputInfo();

Powered by Google App Engine
This is Rietveld 408576698