OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/rect_base.h" | 5 #include "ui/gfx/rect_base.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 | 9 |
10 // This file provides the implementation for RectBaese template and | 10 // This file provides the implementation for RectBaese template and |
11 // used to instantiate the base class for Rect and RectF classes. | 11 // used to instantiate the base class for Rect and RectF classes. |
12 #if !defined(UI_IMPLEMENTATION) | 12 #if !defined(UI_IMPLEMENTATION) |
13 #error "This file is intended for UI implementation only" | 13 #error "This file is intended for UI implementation only" |
14 #endif | 14 #endif |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 template<typename Type> | 18 template<typename Type> |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 typename Type> | 308 typename Type> |
309 bool RectBase<Class, PointClass, SizeClass, InsetsClass, VectorClass, Type>:: | 309 bool RectBase<Class, PointClass, SizeClass, InsetsClass, VectorClass, Type>:: |
310 SharesEdgeWith(const Class& rect) const { | 310 SharesEdgeWith(const Class& rect) const { |
311 return (y() == rect.y() && height() == rect.height() && | 311 return (y() == rect.y() && height() == rect.height() && |
312 (x() == rect.right() || right() == rect.x())) || | 312 (x() == rect.right() || right() == rect.x())) || |
313 (x() == rect.x() && width() == rect.width() && | 313 (x() == rect.x() && width() == rect.width() && |
314 (y() == rect.bottom() || bottom() == rect.y())); | 314 (y() == rect.bottom() || bottom() == rect.y())); |
315 } | 315 } |
316 | 316 |
317 } // namespace gfx | 317 } // namespace gfx |
OLD | NEW |