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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_decoration_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: chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc b/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc
index f82a4ca020e3f548a57f84cb871d9f08ac5c8b68..2981a9516b2f61bed9424add8f8d77b70e5d5011 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_decoration_view.cc
@@ -14,7 +14,8 @@ LocationBarDecorationView::LocationBarDecorationView()
LocationBarDecorationView::~LocationBarDecorationView() {}
bool LocationBarDecorationView::OnMousePressed(const ui::MouseEvent& event) {
- if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) {
+ if (event.IsOnlyLeftMouseButton() &&
+ HitTestPoint(gfx::ToFlooredPoint(event.location()))) {
// Do nothing until mouse is released.
could_handle_click_ = CanHandleClick();
return true;
@@ -24,7 +25,8 @@ bool LocationBarDecorationView::OnMousePressed(const ui::MouseEvent& event) {
}
void LocationBarDecorationView::OnMouseReleased(const ui::MouseEvent& event) {
- if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location()) &&
+ if (event.IsOnlyLeftMouseButton() &&
+ HitTestPoint(gfx::ToFlooredPoint(event.location())) &&
could_handle_click_ && CanHandleClick()) {
OnClick();
}

Powered by Google App Engine
This is Rietveld 408576698