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

Unified Diff: ui/views/controls/tree/tree_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/tree/tree_view.cc
diff --git a/ui/views/controls/tree/tree_view.cc b/ui/views/controls/tree/tree_view.cc
index d5a3911026421d6414d90cade7a79cf1ec341330..c18f74d083cb0cf3cb1e60c4dde1b4d052c3d89c 100644
--- a/ui/views/controls/tree/tree_view.cc
+++ b/ui/views/controls/tree/tree_view.cc
@@ -642,7 +642,7 @@ bool TreeView::OnClickOrTap(const ui::LocatedEvent& event) {
InternalNode* node = GetNodeByRow(row, &depth);
if (node) {
gfx::Rect bounds(GetBoundsForNodeImpl(node, row, depth));
- if (bounds.Contains(event.location())) {
+ if (bounds.Contains(gfx::ToFlooredPoint(event.location()))) {
int relative_x = event.x() - bounds.x();
if (base::i18n::IsRTL())
relative_x = bounds.width() - relative_x;

Powered by Google App Engine
This is Rietveld 408576698