| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |