OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 WebFloatSize(float width, float height) | 60 WebFloatSize(float width, float height) |
61 : width(width) | 61 : width(width) |
62 , height(height) | 62 , height(height) |
63 { | 63 { |
64 } | 64 } |
65 | 65 |
66 #if INSIDE_BLINK | 66 #if INSIDE_BLINK |
67 WebFloatSize(const WebCore::FloatSize& s) | 67 WebFloatSize(const blink::FloatSize& s) |
68 : width(s.width()) | 68 : width(s.width()) |
69 , height(s.height()) | 69 , height(s.height()) |
70 { | 70 { |
71 } | 71 } |
72 | 72 |
73 WebFloatSize& operator=(const WebCore::FloatSize& s) | 73 WebFloatSize& operator=(const blink::FloatSize& s) |
74 { | 74 { |
75 width = s.width(); | 75 width = s.width(); |
76 height = s.height(); | 76 height = s.height(); |
77 return *this; | 77 return *this; |
78 } | 78 } |
79 | 79 |
80 operator WebCore::FloatSize() const | 80 operator blink::FloatSize() const |
81 { | 81 { |
82 return WebCore::FloatSize(width, height); | 82 return blink::FloatSize(width, height); |
83 } | 83 } |
84 #else | 84 #else |
85 WebFloatSize(const gfx::SizeF& s) | 85 WebFloatSize(const gfx::SizeF& s) |
86 : width(s.width()) | 86 : width(s.width()) |
87 , height(s.height()) | 87 , height(s.height()) |
88 { | 88 { |
89 } | 89 } |
90 | 90 |
91 WebFloatSize(const gfx::Vector2dF& v) | 91 WebFloatSize(const gfx::Vector2dF& v) |
92 : width(v.x()) | 92 : width(v.x()) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 126 } |
127 | 127 |
128 inline bool operator!=(const WebFloatSize& a, const WebFloatSize& b) | 128 inline bool operator!=(const WebFloatSize& a, const WebFloatSize& b) |
129 { | 129 { |
130 return !(a == b); | 130 return !(a == b); |
131 } | 131 } |
132 | 132 |
133 } // namespace blink | 133 } // namespace blink |
134 | 134 |
135 #endif | 135 #endif |
OLD | NEW |