| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/geometry/DoubleRect.h" | 5 #include "platform/geometry/DoubleRect.h" |
| 6 | 6 |
| 7 #include "platform/geometry/FloatRect.h" | 7 #include "platform/geometry/FloatRect.h" |
| 8 #include "platform/geometry/IntRect.h" | 8 #include "platform/geometry/IntRect.h" |
| 9 #include "platform/geometry/LayoutRect.h" | 9 #include "platform/geometry/LayoutRect.h" |
| 10 #include "wtf/text/WTFString.h" | 10 #include "platform/wtf/text/WTFString.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 DoubleRect::DoubleRect(const IntRect& r) | 14 DoubleRect::DoubleRect(const IntRect& r) |
| 15 : m_location(r.location()), m_size(r.size()) {} | 15 : m_location(r.location()), m_size(r.size()) {} |
| 16 | 16 |
| 17 DoubleRect::DoubleRect(const FloatRect& r) | 17 DoubleRect::DoubleRect(const FloatRect& r) |
| 18 : m_location(r.location()), m_size(r.size()) {} | 18 : m_location(r.location()), m_size(r.size()) {} |
| 19 | 19 |
| 20 DoubleRect::DoubleRect(const LayoutRect& r) | 20 DoubleRect::DoubleRect(const LayoutRect& r) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 46 m_size.setWidth(width() * sx); | 46 m_size.setWidth(width() * sx); |
| 47 m_size.setHeight(height() * sy); | 47 m_size.setHeight(height() * sy); |
| 48 } | 48 } |
| 49 | 49 |
| 50 String DoubleRect::toString() const { | 50 String DoubleRect::toString() const { |
| 51 return String::format("%s %s", location().toString().ascii().data(), | 51 return String::format("%s %s", location().toString().ascii().data(), |
| 52 size().toString().ascii().data()); | 52 size().toString().ascii().data()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace blink | 55 } // namespace blink |
| OLD | NEW |