Chromium Code Reviews| Index: ui/events/event.cc |
| diff --git a/ui/events/event.cc b/ui/events/event.cc |
| index 246e39721f2f6a20ec8c75c339ea95721c1f3a6a..22e1625add8b3219ee53f93f21ec9fc9d6b6fc6e 100644 |
| --- a/ui/events/event.cc |
| +++ b/ui/events/event.cc |
| @@ -281,9 +281,10 @@ MouseEvent::MouseEvent(const base::NativeEvent& native_event) |
| MouseEvent::MouseEvent(EventType type, |
| const gfx::Point& location, |
| const gfx::Point& root_location, |
| - int flags) |
| + int flags, |
| + int changed_button_flags) |
|
sadrul
2013/12/17 04:23:49
Is this something we could auto-compute with some
sky
2013/12/17 15:28:44
This constructor is mostly used by tests, so they
|
| : LocatedEvent(type, location, root_location, EventTimeForNow(), flags), |
| - changed_button_flags_(0) { |
| + changed_button_flags_(changed_button_flags) { |
| if (this->type() == ET_MOUSE_MOVED && IsAnyButton()) |
| SetType(ET_MOUSE_DRAGGED); |
| } |
| @@ -664,7 +665,7 @@ ScrollEvent::ScrollEvent(EventType type, |
| float x_offset_ordinal, |
| float y_offset_ordinal, |
| int finger_count) |
| - : MouseEvent(type, location, location, flags), |
| + : MouseEvent(type, location, location, flags, 0), |
| x_offset_(x_offset), |
| y_offset_(y_offset), |
| x_offset_ordinal_(x_offset_ordinal), |