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

Unified Diff: ui/views/controls/slider.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: ui/views/controls/slider.cc
diff --git a/ui/views/controls/slider.cc b/ui/views/controls/slider.cc
index 4becf5f2ca7b30c41b6c3bef84c53d42ace9fb85..b1c0aabaacded6b1828bd44760a0bbe0344161f9 100644
--- a/ui/views/controls/slider.cc
+++ b/ui/views/controls/slider.cc
@@ -269,13 +269,13 @@ bool Slider::OnMousePressed(const ui::MouseEvent& event) {
return false;
if (listener_)
listener_->SliderDragStarted(this);
- PrepareForMove(event.location());
- MoveButtonTo(event.location());
+ PrepareForMove(gfx::ToFlooredPoint(event.location()));
+ MoveButtonTo(gfx::ToFlooredPoint(event.location()));
return true;
}
bool Slider::OnMouseDragged(const ui::MouseEvent& event) {
- MoveButtonTo(event.location());
+ MoveButtonTo(gfx::ToFlooredPoint(event.location()));
return true;
}
@@ -318,12 +318,12 @@ void Slider::OnBlur() {
void Slider::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
event->type() == ui::ET_GESTURE_TAP_DOWN) {
- PrepareForMove(event->location());
- MoveButtonTo(event->location());
+ PrepareForMove(gfx::ToFlooredPoint(event->location()));
+ MoveButtonTo(gfx::ToFlooredPoint(event->location()));
event->SetHandled();
} else if (event->type() == ui::ET_GESTURE_SCROLL_UPDATE ||
event->type() == ui::ET_GESTURE_SCROLL_END) {
- MoveButtonTo(event->location());
+ MoveButtonTo(gfx::ToFlooredPoint(event->location()));
event->SetHandled();
}
}

Powered by Google App Engine
This is Rietveld 408576698