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

Unified Diff: ui/views/controls/menu/menu_controller.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 2 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/menu/menu_controller.cc
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 87eeca412ac7f76fe7d140fd056dcc9b6cd60084..796b45fabd7a4768b36c13a87ce303cacf754abf 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -450,10 +450,8 @@ void MenuController::OnMouseDragged(SubmenuView* source,
return;
if (possible_drag_) {
- if (View::ExceededDragThreshold(event.x() - press_pt_.x(),
- event.y() - press_pt_.y())) {
+ if (View::ExceededDragThreshold(event.location() - press_pt_))
StartDrag(source, press_pt_);
- }
return;
}
MenuItemView* mouse_menu = NULL;
@@ -859,7 +857,8 @@ void MenuController::StartDrag(SubmenuView* source,
OSExchangeData data;
item->GetDelegate()->WriteDragData(item, &data);
- drag_utils::SetDragImageOnDataObject(*canvas, item->size(), press_loc,
+ drag_utils::SetDragImageOnDataObject(*canvas, item->size(),
+ press_loc.OffsetFromOrigin(),
&data);
StopScrolling();
int drag_ops = item->GetDelegate()->GetDragOperations(item);

Powered by Google App Engine
This is Rietveld 408576698