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

Unified Diff: content/browser/renderer_host/input/web_input_event_util.cc

Issue 1559163002: Clean up event flags a bit: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 4 years, 11 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
Index: content/browser/renderer_host/input/web_input_event_util.cc
diff --git a/content/browser/renderer_host/input/web_input_event_util.cc b/content/browser/renderer_host/input/web_input_event_util.cc
index db509449d7b078d1f800fa02d6c9670b493ede89..a9bfd10cc4dc4cc586a22c21612224cead3df9b9 100644
--- a/content/browser/renderer_host/input/web_input_event_util.cc
+++ b/content/browser/renderer_host/input/web_input_event_util.cc
@@ -37,19 +37,18 @@ int WebEventModifiersToEventFlags(int modifiers) {
flags |= ui::EF_ALT_DOWN;
if (modifiers & blink::WebInputEvent::MetaKey)
flags |= ui::EF_COMMAND_DOWN;
-
+ if (modifiers & blink::WebInputEvent::CapsLockOn)
+ flags |= ui::EF_CAPS_LOCK_ON;
+ if (modifiers & blink::WebInputEvent::NumLockOn)
+ flags |= ui::EF_NUM_LOCK_ON;
+ if (modifiers & blink::WebInputEvent::ScrollLockOn)
+ flags |= ui::EF_SCROLL_LOCK_ON;
if (modifiers & blink::WebInputEvent::LeftButtonDown)
flags |= ui::EF_LEFT_MOUSE_BUTTON;
if (modifiers & blink::WebInputEvent::MiddleButtonDown)
flags |= ui::EF_MIDDLE_MOUSE_BUTTON;
if (modifiers & blink::WebInputEvent::RightButtonDown)
flags |= ui::EF_RIGHT_MOUSE_BUTTON;
- if (modifiers & blink::WebInputEvent::CapsLockOn)
- flags |= ui::EF_CAPS_LOCK_DOWN;
- if (modifiers & blink::WebInputEvent::NumLockOn)
- flags |= ui::EF_NUM_LOCK_DOWN;
- if (modifiers & blink::WebInputEvent::ScrollLockOn)
- flags |= ui::EF_SCROLL_LOCK_DOWN;
if (modifiers & blink::WebInputEvent::IsAutoRepeat)
flags |= ui::EF_IS_REPEAT;
« no previous file with comments | « components/mus/ws/event_dispatcher_unittest.cc ('k') | mojo/converters/blink/blink_input_events_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698