OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2005 Nokia. All rights reserved. | 3 * Copyright (C) 2005 Nokia. All rights reserved. |
4 * 2008 Eric Seidel <eric@webkit.org> | 4 * 2008 Eric Seidel <eric@webkit.org> |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 13 matching lines...) Expand all Loading... |
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #ifndef FloatSize_h | 28 #ifndef FloatSize_h |
29 #define FloatSize_h | 29 #define FloatSize_h |
30 | 30 |
31 #include "platform/geometry/IntPoint.h" | 31 #include "platform/geometry/IntPoint.h" |
32 #include "third_party/skia/include/core/SkSize.h" | 32 #include "third_party/skia/include/core/SkSize.h" |
33 #include "wtf/MathExtras.h" | 33 #include "wtf/MathExtras.h" |
| 34 #include <iosfwd> |
34 | 35 |
35 #if OS(MACOSX) | 36 #if OS(MACOSX) |
36 typedef struct CGSize CGSize; | 37 typedef struct CGSize CGSize; |
37 | 38 |
38 #ifdef __OBJC__ | 39 #ifdef __OBJC__ |
39 #import <Foundation/Foundation.h> | 40 #import <Foundation/Foundation.h> |
40 #endif | 41 #endif |
41 #endif | 42 #endif |
42 | 43 |
43 namespace blink { | 44 namespace blink { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 inline IntSize expandedIntSize(const FloatSize& p) | 198 inline IntSize expandedIntSize(const FloatSize& p) |
198 { | 199 { |
199 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height()
))); | 200 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height()
))); |
200 } | 201 } |
201 | 202 |
202 inline IntPoint flooredIntPoint(const FloatSize& p) | 203 inline IntPoint flooredIntPoint(const FloatSize& p) |
203 { | 204 { |
204 return IntPoint(clampTo<int>(floorf(p.width())), clampTo<int>(floorf(p.heigh
t()))); | 205 return IntPoint(clampTo<int>(floorf(p.width())), clampTo<int>(floorf(p.heigh
t()))); |
205 } | 206 } |
206 | 207 |
| 208 // Redeclared here to avoid ODR issues. |
| 209 // See platform/testing/GeometryPrinters.h. |
| 210 void PrintTo(const FloatSize&, std::ostream*); |
| 211 |
207 } // namespace blink | 212 } // namespace blink |
208 | 213 |
209 #endif // FloatSize_h | 214 #endif // FloatSize_h |
OLD | NEW |