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

Unified Diff: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

Issue 2957923002: Don't count browser shortcut events as being user gestures. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
index 0c15738f439693e596f1bc2dec41a3a572ae27e3..6ce5ab71a9b1222a6ee9b6f724328d31017cbc45 100644
--- a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
@@ -191,12 +191,14 @@ WebInputEventResult KeyboardEventManager::KeyEvent(
// To be meaningful enough to indicate user intention, a keyboard event needs
// - not to be a modifier event
+ // - not to be a browser shortcut
// https://crbug.com/709765
bool is_modifier =
Platform::Current()->IsDomKeyForModifier(initial_key_event.dom_key);
+ bool is_browser_shortcut = initial_key_event.is_browser_shortcut;
std::unique_ptr<UserGestureIndicator> gesture_indicator;
- if (!is_modifier) {
+ if (!is_modifier && !is_browser_shortcut) {
gesture_indicator.reset(new UserGestureIndicator(
UserGestureToken::Create(frame_->GetDocument())));
}
« 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