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

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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/renderer_date_time_picker.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 a9551a2caca6a8ecd2d8e94d408ef78f2b3f6499..22b63c366afd325e94beb1673a9a072c05fcf9e5 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1718,11 +1718,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 considered as a text input field in WebKit/Chromium.
+
WebKit::WebTextInputInfo new_info;
if (webwidget_)
new_info = webwidget_->textInputInfo();
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/renderer_date_time_picker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698