| 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 21 matching lines...) Expand all Loading... |
| 32 #include "wtf/MathExtras.h" | 32 #include "wtf/MathExtras.h" |
| 33 | 33 |
| 34 #if OS(MACOSX) | 34 #if OS(MACOSX) |
| 35 typedef struct CGSize CGSize; | 35 typedef struct CGSize CGSize; |
| 36 | 36 |
| 37 #ifdef __OBJC__ | 37 #ifdef __OBJC__ |
| 38 #import <Foundation/Foundation.h> | 38 #import <Foundation/Foundation.h> |
| 39 #endif | 39 #endif |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace blink { |
| 43 | 43 |
| 44 class IntSize; | 44 class IntSize; |
| 45 class LayoutSize; | 45 class LayoutSize; |
| 46 | 46 |
| 47 class PLATFORM_EXPORT FloatSize { | 47 class PLATFORM_EXPORT FloatSize { |
| 48 public: | 48 public: |
| 49 FloatSize() : m_width(0), m_height(0) { } | 49 FloatSize() : m_width(0), m_height(0) { } |
| 50 FloatSize(float width, float height) : m_width(width), m_height(height) { } | 50 FloatSize(float width, float height) : m_width(width), m_height(height) { } |
| 51 FloatSize(const IntSize& size) : m_width(size.width()), m_height(size.height
()) { } | 51 FloatSize(const IntSize& size) : m_width(size.width()), m_height(size.height
()) { } |
| 52 FloatSize(const LayoutSize&); | 52 FloatSize(const LayoutSize&); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 inline IntSize expandedIntSize(const FloatSize& p) | 187 inline IntSize expandedIntSize(const FloatSize& p) |
| 188 { | 188 { |
| 189 return IntSize(clampToInteger(ceilf(p.width())), clampToInteger(ceilf(p.heig
ht()))); | 189 return IntSize(clampToInteger(ceilf(p.width())), clampToInteger(ceilf(p.heig
ht()))); |
| 190 } | 190 } |
| 191 | 191 |
| 192 inline IntPoint flooredIntPoint(const FloatSize& p) | 192 inline IntPoint flooredIntPoint(const FloatSize& p) |
| 193 { | 193 { |
| 194 return IntPoint(clampToInteger(floorf(p.width())), clampToInteger(floorf(p.h
eight()))); | 194 return IntPoint(clampToInteger(floorf(p.width())), clampToInteger(floorf(p.h
eight()))); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace WebCore | 197 } // namespace blink |
| 198 | 198 |
| 199 #endif // FloatSize_h | 199 #endif // FloatSize_h |
| OLD | NEW |