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

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
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 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 } 1716 }
1717 1717
1718 void RenderWidget::set_next_paint_is_restore_ack() { 1718 void RenderWidget::set_next_paint_is_restore_ack() {
1719 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK; 1719 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK;
1720 } 1720 }
1721 1721
1722 void RenderWidget::set_next_paint_is_repaint_ack() { 1722 void RenderWidget::set_next_paint_is_repaint_ack() {
1723 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK; 1723 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK;
1724 } 1724 }
1725 1725
1726 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
1727 return type == ui::TEXT_INPUT_TYPE_DATE
1728 || type == ui::TEXT_INPUT_TYPE_DATE_TIME
1729 || type == ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL
1730 || type == ui::TEXT_INPUT_TYPE_MONTH
1731 || type == ui::TEXT_INPUT_TYPE_TIME
1732 || type == ui::TEXT_INPUT_TYPE_WEEK;
1733 }
1734
1735
1726 void RenderWidget::UpdateTextInputState(ShowIme show_ime) { 1736 void RenderWidget::UpdateTextInputState(ShowIme show_ime) {
1727 bool show_ime_if_needed = (show_ime == SHOW_IME_IF_NEEDED); 1737 bool show_ime_if_needed = (show_ime == SHOW_IME_IF_NEEDED);
1728 if (!show_ime_if_needed && !input_method_is_active_) 1738 if (!show_ime_if_needed && !input_method_is_active_)
1729 return; 1739 return;
1730 ui::TextInputType new_type = GetTextInputType(); 1740 ui::TextInputType new_type = GetTextInputType();
1741 if (IsDialogType(new_type))
1742 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.
1743
1731 WebKit::WebTextInputInfo new_info; 1744 WebKit::WebTextInputInfo new_info;
1732 if (webwidget_) 1745 if (webwidget_)
1733 new_info = webwidget_->textInputInfo(); 1746 new_info = webwidget_->textInputInfo();
1734 1747
1735 bool new_can_compose_inline = CanComposeInline(); 1748 bool new_can_compose_inline = CanComposeInline();
1736 1749
1737 // Only sends text input params if they are changed or if the ime should be 1750 // Only sends text input params if they are changed or if the ime should be
1738 // shown. 1751 // shown.
1739 if (show_ime_if_needed || (text_input_type_ != new_type 1752 if (show_ime_if_needed || (text_input_type_ != new_type
1740 || text_input_info_ != new_info 1753 || text_input_info_ != new_info
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 1987
1975 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1988 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1976 return false; 1989 return false;
1977 } 1990 }
1978 1991
1979 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 1992 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
1980 return true; 1993 return true;
1981 } 1994 }
1982 1995
1983 } // namespace content 1996 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698