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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 } 1711 }
1712 1712
1713 void RenderWidget::set_next_paint_is_restore_ack() { 1713 void RenderWidget::set_next_paint_is_restore_ack() {
1714 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK; 1714 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK;
1715 } 1715 }
1716 1716
1717 void RenderWidget::set_next_paint_is_repaint_ack() { 1717 void RenderWidget::set_next_paint_is_repaint_ack() {
1718 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK; 1718 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK;
1719 } 1719 }
1720 1720
1721 static bool IsDateTimeInput(ui::TextInputType type) {
1722 return type == ui::TEXT_INPUT_TYPE_DATE ||
1723 type == ui::TEXT_INPUT_TYPE_DATE_TIME ||
1724 type == ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL ||
1725 type == ui::TEXT_INPUT_TYPE_MONTH ||
1726 type == ui::TEXT_INPUT_TYPE_TIME ||
1727 type == ui::TEXT_INPUT_TYPE_WEEK;
1728 }
1729
1730
1721 void RenderWidget::UpdateTextInputState(ShowIme show_ime) { 1731 void RenderWidget::UpdateTextInputState(ShowIme show_ime) {
1722 bool show_ime_if_needed = (show_ime == SHOW_IME_IF_NEEDED); 1732 bool show_ime_if_needed = (show_ime == SHOW_IME_IF_NEEDED);
1723 if (!show_ime_if_needed && !input_method_is_active_) 1733 if (!show_ime_if_needed && !input_method_is_active_)
1724 return; 1734 return;
1725 ui::TextInputType new_type = GetTextInputType(); 1735 ui::TextInputType new_type = GetTextInputType();
1736 if (IsDateTimeInput(new_type))
1737 return; // Not considered as a text input field in WebKit/Chromium.
1738
1726 WebKit::WebTextInputInfo new_info; 1739 WebKit::WebTextInputInfo new_info;
1727 if (webwidget_) 1740 if (webwidget_)
1728 new_info = webwidget_->textInputInfo(); 1741 new_info = webwidget_->textInputInfo();
1729 1742
1730 bool new_can_compose_inline = CanComposeInline(); 1743 bool new_can_compose_inline = CanComposeInline();
1731 1744
1732 // Only sends text input params if they are changed or if the ime should be 1745 // Only sends text input params if they are changed or if the ime should be
1733 // shown. 1746 // shown.
1734 if (show_ime_if_needed || (text_input_type_ != new_type 1747 if (show_ime_if_needed || (text_input_type_ != new_type
1735 || text_input_info_ != new_info 1748 || text_input_info_ != new_info
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 1982
1970 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1983 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1971 return false; 1984 return false;
1972 } 1985 }
1973 1986
1974 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 1987 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
1975 return true; 1988 return true;
1976 } 1989 }
1977 1990
1978 } // namespace content 1991 } // namespace content
OLDNEW
« 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