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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.cc

Issue 115891: Treat alt-(arrows/pgup/pgdn) like alt was not pressed. There's no reason to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « no previous file | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/autocomplete/autocomplete_edit_view_win.h" 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h"
6 6
7 #include <locale> 7 #include <locale>
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 model_->AcceptInput((flags & KF_ALTDOWN) ? 1658 model_->AcceptInput((flags & KF_ALTDOWN) ?
1659 NEW_FOREGROUND_TAB : CURRENT_TAB, false); 1659 NEW_FOREGROUND_TAB : CURRENT_TAB, false);
1660 return true; 1660 return true;
1661 1661
1662 case VK_PRIOR: 1662 case VK_PRIOR:
1663 case VK_NEXT: 1663 case VK_NEXT:
1664 count = model_->result().size(); 1664 count = model_->result().size();
1665 // FALL THROUGH 1665 // FALL THROUGH
1666 case VK_UP: 1666 case VK_UP:
1667 case VK_DOWN: 1667 case VK_DOWN:
1668 if (flags & KF_ALTDOWN) 1668 // Ignore alt + numpad, but treat alt + (non-numpad) like (non-numpad).
1669 if ((flags & KF_ALTDOWN) && !(flags & KF_EXTENDED))
1669 return false; 1670 return false;
1670 1671
1671 model_->OnUpOrDownKeyPressed(((key == VK_PRIOR) || (key == VK_UP)) ? 1672 model_->OnUpOrDownKeyPressed(((key == VK_PRIOR) || (key == VK_UP)) ?
1672 -count : count); 1673 -count : count);
1673 return true; 1674 return true;
1674 1675
1675 // Hijacking Editing Commands 1676 // Hijacking Editing Commands
1676 // 1677 //
1677 // We hijack the keyboard short-cuts for Cut, Copy, and Paste here so that 1678 // We hijack the keyboard short-cuts for Cut, Copy, and Paste here so that
1678 // they go through our clipboard routines. This allows us to be smarter 1679 // they go through our clipboard routines. This allows us to be smarter
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 } 2263 }
2263 2264
2264 void AutocompleteEditViewWin::RepaintDropHighlight(int position) { 2265 void AutocompleteEditViewWin::RepaintDropHighlight(int position) {
2265 if ((position != -1) && (position <= GetTextLength())) { 2266 if ((position != -1) && (position <= GetTextLength())) {
2266 const POINT min_loc(PosFromChar(position)); 2267 const POINT min_loc(PosFromChar(position));
2267 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_, 2268 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_,
2268 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_}; 2269 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_};
2269 InvalidateRect(&highlight_bounds, false); 2270 InvalidateRect(&highlight_bounds, false);
2270 } 2271 }
2271 } 2272 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698