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

Side by Side Diff: ui/base/touch/selection_bound.cc

Issue 1302233006: aura: Stop converting Rect to RectF implicitly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-aura: . Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/aura/test/test_screen.cc ('k') | ui/gfx/geometry/dip_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "ui/base/touch/selection_bound.h" 8 #include "ui/base/touch/selection_bound.h"
9 #include "ui/gfx/geometry/point_conversions.h" 9 #include "ui/gfx/geometry/point_conversions.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/geometry/rect_f.h"
11 12
12 namespace ui { 13 namespace ui {
13 14
14 SelectionBound::SelectionBound() : type_(EMPTY), visible_(false) { 15 SelectionBound::SelectionBound() : type_(EMPTY), visible_(false) {
15 } 16 }
16 17
17 SelectionBound::SelectionBound(const SelectionBound& other) = default; 18 SelectionBound::SelectionBound(const SelectionBound& other) = default;
18 19
19 SelectionBound::~SelectionBound() { 20 SelectionBound::~SelectionBound() {
20 } 21 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 gfx::PointF bottom_right(b1.edge_top()); 76 gfx::PointF bottom_right(b1.edge_top());
76 bottom_right.SetToMax(b1.edge_bottom()); 77 bottom_right.SetToMax(b1.edge_bottom());
77 bottom_right.SetToMax(b2.edge_top()); 78 bottom_right.SetToMax(b2.edge_top());
78 bottom_right.SetToMax(b2.edge_bottom()); 79 bottom_right.SetToMax(b2.edge_bottom());
79 80
80 gfx::Vector2dF diff = bottom_right - top_left; 81 gfx::Vector2dF diff = bottom_right - top_left;
81 return gfx::RectF(top_left, gfx::SizeF(diff.x(), diff.y())); 82 return gfx::RectF(top_left, gfx::SizeF(diff.x(), diff.y()));
82 } 83 }
83 84
84 } // namespace ui 85 } // namespace ui
OLDNEW
« no previous file with comments | « ui/aura/test/test_screen.cc ('k') | ui/gfx/geometry/dip_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698