Chromium Code Reviews| Index: services/ui/ws/event_matcher.cc |
| diff --git a/services/ui/ws/event_matcher.cc b/services/ui/ws/event_matcher.cc |
| index 1cd91568adfa074c902c10146cb81be267ce0536..8739792bea78dbfd48b5e528f2a3a95d890e90de 100644 |
| --- a/services/ui/ws/event_matcher.cc |
| +++ b/services/ui/ws/event_matcher.cc |
| @@ -76,7 +76,8 @@ EventMatcher::~EventMatcher() {} |
| bool EventMatcher::MatchesEvent(const ui::Event& event) const { |
| if ((fields_to_match_ & TYPE) && event.type() != event_type_) |
| return false; |
| - int flags = event.flags() & ~ignore_event_flags_; |
| + constexpr int kIgnoreFlags = EF_IS_SYNTHESIZED | EF_IS_REPEAT; |
|
sky
2017/03/30 23:44:43
Please add a comment here. Also, I would name this
Peng
2017/03/31 14:09:22
Done.
|
| + int flags = event.flags() & ~(ignore_event_flags_ | kIgnoreFlags); |
| if ((fields_to_match_ & FLAGS) && flags != event_flags_) |
| return false; |
| if (fields_to_match_ & KEYBOARD_CODE) { |