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

Unified Diff: ash/frame/caption_buttons/frame_caption_button.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 8 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: ash/frame/caption_buttons/frame_caption_button.cc
diff --git a/ash/frame/caption_buttons/frame_caption_button.cc b/ash/frame/caption_buttons/frame_caption_button.cc
index f7ecc2a1ccad98908662441ad88dc2b41b9a978b..0a72725575b20db7e009bdd78b24789007faf70b 100644
--- a/ash/frame/caption_buttons/frame_caption_button.cc
+++ b/ash/frame/caption_buttons/frame_caption_button.cc
@@ -142,7 +142,7 @@ void FrameCaptionButton::OnGestureEvent(ui::GestureEvent* event) {
// behavior is more consistent with AlternateFrameSizeButton.
if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
event->type() == ui::ET_GESTURE_SCROLL_UPDATE) {
- if (HitTestPoint(event->location())) {
+ if (HitTestPoint(gfx::ToFlooredPoint(event->location()))) {
SetState(STATE_PRESSED);
RequestFocus();
event->StopPropagation();
@@ -150,7 +150,7 @@ void FrameCaptionButton::OnGestureEvent(ui::GestureEvent* event) {
SetState(STATE_NORMAL);
}
} else if (event->type() == ui::ET_GESTURE_SCROLL_END) {
- if (HitTestPoint(event->location())) {
+ if (HitTestPoint(gfx::ToFlooredPoint(event->location()))) {
SetState(STATE_HOVERED);
NotifyClick(*event);
event->StopPropagation();

Powered by Google App Engine
This is Rietveld 408576698