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

Side by Side Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 10389035: Do not consume an ET_KEY_RELEASED event in NativeTextfieldViews and NativeComboboxViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/combobox/native_combobox_views.cc ('k') | no next file » | 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 "ui/views/controls/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 487
488 bool NativeTextfieldViews::HandleKeyPressed(const KeyEvent& e) { 488 bool NativeTextfieldViews::HandleKeyPressed(const KeyEvent& e) {
489 TextfieldController* controller = textfield_->GetController(); 489 TextfieldController* controller = textfield_->GetController();
490 bool handled = false; 490 bool handled = false;
491 if (controller) 491 if (controller)
492 handled = controller->HandleKeyEvent(textfield_, e); 492 handled = controller->HandleKeyEvent(textfield_, e);
493 return handled || HandleKeyEvent(e); 493 return handled || HandleKeyEvent(e);
494 } 494 }
495 495
496 bool NativeTextfieldViews::HandleKeyReleased(const KeyEvent& e) { 496 bool NativeTextfieldViews::HandleKeyReleased(const KeyEvent& e) {
497 return true; 497 return false; // crbug.com/127520
oshima 2012/05/10 15:36:37 Are we sure we don't want to return true when KeyP
Yusuke Sato 2012/05/11 02:16:22 Unconditionally returning false would be better, I
oshima 2012/05/11 17:23:03 Does it distinguish it now? I'm probably OK with t
Yusuke Sato 2012/05/14 04:34:49 Yes. ui::AcceleratorManager (ui/base/accelerators/
498 } 498 }
499 499
500 void NativeTextfieldViews::HandleFocus() { 500 void NativeTextfieldViews::HandleFocus() {
501 GetRenderText()->set_focused(true); 501 GetRenderText()->set_focused(true);
502 is_cursor_visible_ = true; 502 is_cursor_visible_ = true;
503 SchedulePaint(); 503 SchedulePaint();
504 OnCaretBoundsChanged(); 504 OnCaretBoundsChanged();
505 // Start blinking cursor. 505 // Start blinking cursor.
506 MessageLoop::current()->PostDelayedTask( 506 MessageLoop::current()->PostDelayedTask(
507 FROM_HERE, 507 FROM_HERE,
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 1139
1140 #if defined(USE_AURA) 1140 #if defined(USE_AURA)
1141 // static 1141 // static
1142 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( 1142 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper(
1143 Textfield* field) { 1143 Textfield* field) {
1144 return new NativeTextfieldViews(field); 1144 return new NativeTextfieldViews(field);
1145 } 1145 }
1146 #endif 1146 #endif
1147 1147
1148 } // namespace views 1148 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/native_combobox_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698