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

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: Use new webKit enum instead of string comparissons 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 8eb86982bd37bc62346773e22cccf1fff28da5e3..a75a53920fcc8f7b854614c7801b377592cbf7c9 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1724,11 +1724,24 @@ void RenderWidget::set_next_paint_is_repaint_ack() {
next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK;
}
+static bool IsDateTimeInput(ui::TextInputType type) {
+ 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 (IsDateTimeInput(new_type))
+ return; // not handled as text in WebKit
Peter Beverloo 2012/12/05 11:57:03 "not considered as a text input field in WebKit."?
Miguel Garcia 2012/12/05 16:23:16 This is called directly from WebKit (WebViewImpl.c
+
WebKit::WebTextInputInfo new_info;
if (webwidget_)
new_info = webwidget_->textInputInfo();

Powered by Google App Engine
This is Rietveld 408576698