Chromium Code Reviews| Index: ui/events/event.cc |
| diff --git a/ui/events/event.cc b/ui/events/event.cc |
| index 8ce2ae6941c0fa6fe097d5ac418df2deedebd900..81c9abe66bc8efcd1355f624fecc8e39d3381afa 100644 |
| --- a/ui/events/event.cc |
| +++ b/ui/events/event.cc |
| @@ -522,6 +522,7 @@ MouseEvent::MouseEvent(EventType type, |
| flags), |
| changed_button_flags_(changed_button_flags), |
| pointer_details_(PointerDetails(EventPointerType::POINTER_TYPE_MOUSE)) { |
| + DCHECK(type != ET_MOUSEWHEEL); |
|
sadrul
2016/08/29 16:02:36
DCHECK_NE
riajiang
2016/08/29 16:17:54
Done.
|
| latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
| if (this->type() == ET_MOUSE_MOVED && IsAnyButton()) |
| SetType(ET_MOUSE_DRAGGED); |
| @@ -679,13 +680,15 @@ MouseWheelEvent::MouseWheelEvent(const gfx::Vector2d& offset, |
| base::TimeTicks time_stamp, |
| int flags, |
| int changed_button_flags) |
| - : MouseEvent(ui::ET_MOUSEWHEEL, |
| + : MouseEvent(ui::ET_UNKNOWN, |
| location, |
| root_location, |
| time_stamp, |
| flags, |
| changed_button_flags), |
| - offset_(offset) {} |
| + offset_(offset) { |
| + SetType(ui::ET_MOUSEWHEEL); |
|
sadrul
2016/08/29 16:02:36
Add a comment here why we are doing this.
riajiang
2016/08/29 16:17:54
Done.
|
| +} |
| #if defined(OS_WIN) |
| // This value matches windows WHEEL_DELTA. |