| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "platform/geometry/IntRect.h" | 27 #include "platform/geometry/IntRect.h" |
| 28 | 28 |
| 29 #include "platform/geometry/FloatRect.h" | 29 #include "platform/geometry/FloatRect.h" |
| 30 #include "platform/geometry/LayoutRect.h" | 30 #include "platform/geometry/LayoutRect.h" |
| 31 #include "third_party/skia/include/core/SkRect.h" | 31 #include "third_party/skia/include/core/SkRect.h" |
| 32 | 32 |
| 33 #include <algorithm> | 33 #include <algorithm> |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace blink { |
| 36 | 36 |
| 37 IntRect::IntRect(const FloatRect& r) | 37 IntRect::IntRect(const FloatRect& r) |
| 38 : m_location(clampToInteger(r.x()), clampToInteger(r.y())) | 38 : m_location(clampToInteger(r.x()), clampToInteger(r.y())) |
| 39 , m_size(clampToInteger(r.width()), clampToInteger(r.height())) | 39 , m_size(clampToInteger(r.width()), clampToInteger(r.height())) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 IntRect::IntRect(const LayoutRect& r) | 43 IntRect::IntRect(const LayoutRect& r) |
| 44 : m_location(r.x(), r.y()) | 44 : m_location(r.x(), r.y()) |
| 45 , m_size(r.width(), r.height()) | 45 , m_size(r.width(), r.height()) |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 } | 172 } |
| 173 | 173 |
| 174 #ifndef NDEBUG | 174 #ifndef NDEBUG |
| 175 // Prints the rect to the screen. | 175 // Prints the rect to the screen. |
| 176 void IntRect::show() const | 176 void IntRect::show() const |
| 177 { | 177 { |
| 178 LayoutRect(*this).show(); | 178 LayoutRect(*this).show(); |
| 179 } | 179 } |
| 180 #endif | 180 #endif |
| 181 | 181 |
| 182 } // namespace WebCore | 182 } // namespace blink |
| OLD | NEW |