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

Unified Diff: chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month 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/link_disambiguation/link_disambiguation_popup.cc
diff --git a/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc b/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc
index 7186ab3ec3d004cb29fbd236bfb4ab2b3a00f01e..41742d9a4fbbdf6e3f4addc17a0dc3c0257575a3 100644
--- a/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc
+++ b/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc
@@ -85,12 +85,14 @@ void LinkDisambiguationPopup::ZoomBubbleView::OnMouseEvent(
ui::MouseEvent* event) {
// Transform mouse event back to coordinate system of the web content window
// before providing to the callback.
+ ui::MouseEvent xform_event(event->type(), gfx::Point(), gfx::Point(),
+ ui::EventTimeForNow(), event->flags(),
+ event->changed_button_flags());
gfx::PointF xform_location(
(event->location().x() / scale_) + target_rect_.x(),
(event->location().y() / scale_) + target_rect_.y());
- ui::MouseEvent xform_event(event->type(), xform_location, xform_location,
- ui::EventTimeForNow(), event->flags(),
- event->changed_button_flags());
+ xform_event.set_location_f(xform_location);
+ xform_event.set_root_location_f(xform_location);
mouse_cb_.Run(&xform_event);
event->SetHandled();
« no previous file with comments | « chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc ('k') | components/html_viewer/input_events_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698