| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |