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

Unified Diff: ui/views/controls/textfield/native_textfield_views.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: more vector use fixes 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/textfield/native_textfield_views.cc
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
index 02e4c49cd59d3fb38c1387f70b322845694e5082..aa99882e0a582f4e4342ed90f8387dacb1ffa4a2 100644
--- a/ui/views/controls/textfield/native_textfield_views.cc
+++ b/ui/views/controls/textfield/native_textfield_views.cc
@@ -112,7 +112,7 @@ bool NativeTextfieldViews::OnMousePressed(const ui::MouseEvent& event) {
bool NativeTextfieldViews::ExceededDragThresholdFromLastClickLocation(
const ui::MouseEvent& event) {
- gfx::Point location_delta = event.location().Subtract(last_click_location_);
+ gfx::Vector2d location_delta = event.location() - last_click_location_;
return ExceededDragThreshold(location_delta.x(), location_delta.y());
Peter Kasting 2012/10/30 01:14:14 This may be another function that makes sense to c
danakj 2012/10/30 19:21:21 Ya for sure. Changed the method. This was a really
}

Powered by Google App Engine
This is Rietveld 408576698