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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2434463003: Add coalesced KeyDown handling for arrow key scrolling. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 return WebInputEventResult::NotHandled; 1172 return WebInputEventResult::NotHandled;
1173 1173
1174 switch (event.type) { 1174 switch (event.type) {
1175 case WebInputEvent::Char: 1175 case WebInputEvent::Char:
1176 if (event.windowsKeyCode == VKEY_SPACE) { 1176 if (event.windowsKeyCode == VKEY_SPACE) {
1177 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PRIOR 1177 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PRIOR
1178 : VKEY_NEXT); 1178 : VKEY_NEXT);
1179 return scrollViewWithKeyboard(keyCode, event.modifiers); 1179 return scrollViewWithKeyboard(keyCode, event.modifiers);
1180 } 1180 }
1181 break; 1181 break;
1182 case WebInputEvent::KeyDown:
1182 case WebInputEvent::RawKeyDown: 1183 case WebInputEvent::RawKeyDown:
1183 if (event.modifiers == WebInputEvent::ControlKey) { 1184 if (event.modifiers == WebInputEvent::ControlKey) {
1184 switch (event.windowsKeyCode) { 1185 switch (event.windowsKeyCode) {
1185 #if !OS(MACOSX) 1186 #if !OS(MACOSX)
1186 case 'A': 1187 case 'A':
1187 WebFrame::fromFrame(focusedCoreFrame()) 1188 WebFrame::fromFrame(focusedCoreFrame())
1188 ->toWebLocalFrame() 1189 ->toWebLocalFrame()
1189 ->executeCommand(WebString::fromUTF8("SelectAll")); 1190 ->executeCommand(WebString::fromUTF8("SelectAll"));
1190 return WebInputEventResult::HandledSystem; 1191 return WebInputEventResult::HandledSystem;
1191 case VKEY_INSERT: 1192 case VKEY_INSERT:
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 return flags; 1519 return flags;
1519 } 1520 }
1520 1521
1521 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1522 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1522 if (!m_imeAcceptEvents) 1523 if (!m_imeAcceptEvents)
1523 return nullptr; 1524 return nullptr;
1524 return focusedLocalFrameInWidget(); 1525 return focusedLocalFrameInWidget();
1525 } 1526 }
1526 1527
1527 } // namespace blink 1528 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698