| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2005 Nokia. All rights reserved. | 3 * Copyright (C) 2005 Nokia. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "platform/geometry/FloatRect.h" | 27 #include "platform/geometry/FloatRect.h" |
| 28 | 28 |
| 29 #include "platform/geometry/IntRect.h" | 29 #include "platform/geometry/IntRect.h" |
| 30 #include "platform/geometry/LayoutRect.h" | 30 #include "platform/geometry/LayoutRect.h" |
| 31 #include "platform/wtf/MathExtras.h" |
| 32 #include "platform/wtf/text/WTFString.h" |
| 31 #include "third_party/skia/include/core/SkRect.h" | 33 #include "third_party/skia/include/core/SkRect.h" |
| 32 #include "ui/gfx/geometry/rect_f.h" | 34 #include "ui/gfx/geometry/rect_f.h" |
| 33 #include "wtf/MathExtras.h" | |
| 34 #include "wtf/text/WTFString.h" | |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 FloatRect::FloatRect(const IntRect& r) | 38 FloatRect::FloatRect(const IntRect& r) |
| 39 : m_location(r.location()), m_size(r.size()) {} | 39 : m_location(r.location()), m_size(r.size()) {} |
| 40 | 40 |
| 41 FloatRect::FloatRect(const LayoutRect& r) | 41 FloatRect::FloatRect(const LayoutRect& r) |
| 42 : m_location(r.location()), m_size(r.size()) {} | 42 : m_location(r.location()), m_size(r.size()) {} |
| 43 | 43 |
| 44 FloatRect::FloatRect(const SkRect& r) | 44 FloatRect::FloatRect(const SkRect& r) |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 destRect.y() + (r.y() - srcRect.y()) * heightScale, | 209 destRect.y() + (r.y() - srcRect.y()) * heightScale, |
| 210 r.width() * widthScale, r.height() * heightScale); | 210 r.width() * widthScale, r.height() * heightScale); |
| 211 } | 211 } |
| 212 | 212 |
| 213 String FloatRect::toString() const { | 213 String FloatRect::toString() const { |
| 214 return String::format("%s %s", location().toString().ascii().data(), | 214 return String::format("%s %s", location().toString().ascii().data(), |
| 215 size().toString().ascii().data()); | 215 size().toString().ascii().data()); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |