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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 1421713002: Explicitly convert Point to PointF for event code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip
Patch Set: pointfconvert-prod: . Created 5 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/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 039102b748e1a4916a8a98570d38894130802a2b..563ffc25eb5084f7651cae6f4310d7b1ed5bce4d 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1154,8 +1154,8 @@ void Textfield::GetSelectionEndPoints(ui::SelectionBound* anchor,
const gfx::SelectionModel& sel = render_text->selection_model();
gfx::SelectionModel start_sel =
render_text->GetSelectionModelForSelectionStart();
- gfx::Rect r1 = render_text->GetCursorBounds(start_sel, true);
- gfx::Rect r2 = render_text->GetCursorBounds(sel, true);
+ gfx::RectF r1(render_text->GetCursorBounds(start_sel, true));
danakj 2015/10/23 21:46:10 This one is about SelectionBounds, which are float
+ gfx::RectF r2(render_text->GetCursorBounds(sel, true));
anchor->SetEdge(r1.origin(), r1.bottom_left());
focus->SetEdge(r2.origin(), r2.bottom_left());

Powered by Google App Engine
This is Rietveld 408576698