| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "webcore_convert.h" | 7 #include "webcore_convert.h" |
| 8 | 8 |
| 9 namespace WebKit { | 9 namespace WebKit { |
| 10 | 10 |
| 11 WebCore::FloatRect convert(const WebFloatRect& rect) | |
| 12 { | |
| 13 return WebCore::FloatRect(rect.x, rect.y, rect.width, rect.height); | |
| 14 } | |
| 15 | |
| 16 WebCore::FloatPoint convert(const WebFloatPoint& point) | 11 WebCore::FloatPoint convert(const WebFloatPoint& point) |
| 17 { | 12 { |
| 18 return WebCore::FloatPoint(point.x, point.y); | 13 return WebCore::FloatPoint(point.x, point.y); |
| 19 } | 14 } |
| 20 | 15 |
| 21 WebCore::IntRect convert(const WebRect& rect) | |
| 22 { | |
| 23 return WebCore::IntRect(rect.x, rect.y, rect.width, rect.height); | |
| 24 } | |
| 25 | |
| 26 WebCore::IntPoint convert(const WebPoint& point) | 16 WebCore::IntPoint convert(const WebPoint& point) |
| 27 { | 17 { |
| 28 return WebCore::IntPoint(point.x, point.y); | 18 return WebCore::IntPoint(point.x, point.y); |
| 29 } | 19 } |
| 30 | 20 |
| 31 WebCore::IntSize convert(const WebSize& size) | 21 WebCore::IntSize convert(const WebSize& size) |
| 32 { | 22 { |
| 33 return WebCore::IntSize(size.width, size.height); | 23 return WebCore::IntSize(size.width, size.height); |
| 34 } | 24 } |
| 35 | 25 |
| 36 WebRect convert(const WebCore::IntRect& rect) | |
| 37 { | |
| 38 return WebRect(rect.x(), rect.y(), rect.width(), rect.height()); | |
| 39 } | |
| 40 | |
| 41 WebSize convert(const WebCore::IntSize& size) | 26 WebSize convert(const WebCore::IntSize& size) |
| 42 { | 27 { |
| 43 return WebSize(size.width(), size.height()); | 28 return WebSize(size.width(), size.height()); |
| 44 } | 29 } |
| 45 | 30 |
| 46 WebFloatPoint convert(const WebCore::FloatPoint& point) | 31 WebFloatPoint convert(const WebCore::FloatPoint& point) |
| 47 { | 32 { |
| 48 return WebFloatPoint(point.x(), point.y()); | 33 return WebFloatPoint(point.x(), point.y()); |
| 49 } | 34 } |
| 50 | 35 |
| 51 } | 36 } |
| 52 | 37 |
| 53 | 38 |
| OLD | NEW |