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

Unified Diff: ui/views/controls/single_split_view.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/single_split_view.cc
diff --git a/ui/views/controls/single_split_view.cc b/ui/views/controls/single_split_view.cc
index 5909ed1a5e182a5a2752dfc33cf2af6d89464ba9..9c000fe3abbf8da900208b19c714d5d95c5049f4 100644
--- a/ui/views/controls/single_split_view.cc
+++ b/ui/views/controls/single_split_view.cc
@@ -87,7 +87,7 @@ gfx::Size SingleSplitView::GetPreferredSize() {
}
gfx::NativeCursor SingleSplitView::GetCursor(const ui::MouseEvent& event) {
- if (!IsPointInDivider(event.location()))
+ if (!IsPointInDivider(gfx::ToFlooredPoint(event.location())))
return gfx::kNullCursor;
return is_horizontal_ ? GetNativeEastWestResizeCursor()
: GetNativeNorthSouthResizeCursor();
@@ -145,7 +145,7 @@ void SingleSplitView::SetAccessibleName(const base::string16& name) {
}
bool SingleSplitView::OnMousePressed(const ui::MouseEvent& event) {
- if (!IsPointInDivider(event.location()))
+ if (!IsPointInDivider(gfx::ToFlooredPoint(event.location())))
return false;
drag_info_.initial_mouse_offset = GetPrimaryAxisSize(event.x(), event.y());
drag_info_.initial_divider_offset =

Powered by Google App Engine
This is Rietveld 408576698