| 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 #ifndef CC_STUBS_FLOATRECT_H_ | 5 #ifndef CC_STUBS_FLOATRECT_H_ |
| 6 #define CC_STUBS_FLOATRECT_H_ | 6 #define CC_STUBS_FLOATRECT_H_ |
| 7 | 7 |
| 8 #include "FloatPoint.h" | 8 #include "FloatPoint.h" |
| 9 #include "FloatSize.h" | 9 #include "FloatSize.h" |
| 10 #include "IntRect.h" | 10 #include "IntRect.h" |
| 11 #if INSIDE_WEBKIT_BUILD | 11 #if INSIDE_WEBKIT_BUILD |
| 12 #include "Source/WebCore/platform/graphics/FloatRect.h" | 12 #include "Source/WebCore/platform/graphics/FloatRect.h" |
| 13 #else | 13 #else |
| 14 #include "third_party/WebKit/Source/WebCore/platform/graphics/FloatRect.h" | 14 #include "third_party/WebKit/Source/WebCore/platform/graphics/FloatRect.h" |
| 15 #endif | 15 #endif |
| 16 #include <public/WebRect.h> |
| 17 #include <public/WebFloatRect.h> |
| 16 | 18 |
| 17 namespace cc { | 19 namespace cc { |
| 18 | 20 |
| 19 class FloatRect : public WebCore::FloatRect { | 21 class FloatRect : public WebCore::FloatRect { |
| 20 public: | 22 public: |
| 21 FloatRect() { } | 23 FloatRect() { } |
| 22 | 24 |
| 23 FloatRect(const FloatPoint& location, const FloatSize& size) | 25 FloatRect(const FloatPoint& location, const FloatSize& size) |
| 24 : WebCore::FloatRect(location, size) | 26 : WebCore::FloatRect(location, size) |
| 25 { | 27 { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 42 | 44 |
| 43 FloatRect(const WebCore::IntRect& rect) | 45 FloatRect(const WebCore::IntRect& rect) |
| 44 : WebCore::FloatRect(rect) | 46 : WebCore::FloatRect(rect) |
| 45 { | 47 { |
| 46 } | 48 } |
| 47 | 49 |
| 48 FloatRect(const WebCore::FloatRect& rect) | 50 FloatRect(const WebCore::FloatRect& rect) |
| 49 :WebCore::FloatRect(rect) | 51 :WebCore::FloatRect(rect) |
| 50 { | 52 { |
| 51 } | 53 } |
| 54 |
| 55 FloatRect(WebKit::WebRect rect) |
| 56 : WebCore::FloatRect(rect.x, rect.y, rect.width, rect.height) |
| 57 { |
| 58 } |
| 59 |
| 60 FloatRect(WebKit::WebFloatRect rect) |
| 61 : WebCore::FloatRect(rect.x, rect.y, rect.width, rect.height) |
| 62 { |
| 63 } |
| 64 |
| 65 operator WebKit::WebFloatRect() const |
| 66 { |
| 67 return WebKit::WebFloatRect(x(), y(), width(), height()); |
| 68 } |
| 52 }; | 69 }; |
| 53 | 70 |
| 54 } | 71 } |
| 55 | 72 |
| 56 #endif | 73 #endif |
| OLD | NEW |