| Index: ash/frame/caption_buttons/frame_maximize_button.cc
|
| diff --git a/ash/frame/caption_buttons/frame_maximize_button.cc b/ash/frame/caption_buttons/frame_maximize_button.cc
|
| index dc28c7ab469c54ca1c23eff80b2870593adbc96c..83ef1708bfd69712ad7fdab38a84f6b6d0a29db7 100644
|
| --- a/ash/frame/caption_buttons/frame_maximize_button.cc
|
| +++ b/ash/frame/caption_buttons/frame_maximize_button.cc
|
| @@ -278,7 +278,7 @@ void FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
|
| // the current event.
|
| ProcessUpdateEvent(*event);
|
| if (event->type() == ui::ET_GESTURE_TAP) {
|
| - snap_type_ = SnapTypeForLocation(event->location());
|
| + snap_type_ = SnapTypeForLocation(gfx::ToFlooredPoint(event->location()));
|
| TouchUMA::GetInstance()->RecordGestureAction(
|
| TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP);
|
| }
|
| @@ -293,7 +293,7 @@ void FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
|
| // The position of the event may have changed from the previous event. So
|
| // it is necessary to update the snap-state for the current event.
|
| ProcessUpdateEvent(*event);
|
| - snap_type_ = SnapTypeForLocation(event->location());
|
| + snap_type_ = SnapTypeForLocation(gfx::ToFlooredPoint(event->location()));
|
| ProcessEndEvent(*event);
|
| event->SetHandled();
|
| return;
|
| @@ -328,7 +328,7 @@ void FrameMaximizeButton::ProcessStartEvent(const ui::LocatedEvent& event) {
|
| }
|
| InstallEventFilter();
|
| snap_type_ = SNAP_NONE;
|
| - press_location_ = event.location();
|
| + press_location_ = gfx::ToFlooredPoint(event.location());
|
| exceeded_drag_threshold_ = false;
|
| update_timer_.Start(
|
| FROM_HERE,
|
| @@ -341,10 +341,10 @@ void FrameMaximizeButton::ProcessUpdateEvent(const ui::LocatedEvent& event) {
|
| DCHECK(is_snap_enabled_);
|
| if (!exceeded_drag_threshold_) {
|
| exceeded_drag_threshold_ = views::View::ExceededDragThreshold(
|
| - event.location() - press_location_);
|
| + gfx::ToFlooredPoint(event.location()) - press_location_);
|
| }
|
| if (exceeded_drag_threshold_)
|
| - UpdateSnap(event.location());
|
| + UpdateSnap(gfx::ToFlooredPoint(event.location()));
|
| }
|
|
|
| bool FrameMaximizeButton::ProcessEndEvent(const ui::LocatedEvent& event) {
|
|
|