OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 WebRect(int x, int y, int width, int height) | 62 WebRect(int x, int y, int width, int height) |
63 : x(x) | 63 : x(x) |
64 , y(y) | 64 , y(y) |
65 , width(width) | 65 , width(width) |
66 , height(height) | 66 , height(height) |
67 { | 67 { |
68 } | 68 } |
69 | 69 |
70 #if INSIDE_BLINK | 70 #if INSIDE_BLINK |
71 WebRect(const blink::IntRect& r) | 71 WebRect(const IntRect& r) |
72 : x(r.x()) | 72 : x(r.x()) |
73 , y(r.y()) | 73 , y(r.y()) |
74 , width(r.width()) | 74 , width(r.width()) |
75 , height(r.height()) | 75 , height(r.height()) |
76 { | 76 { |
77 } | 77 } |
78 | 78 |
79 WebRect& operator=(const blink::IntRect& r) | 79 WebRect& operator=(const IntRect& r) |
80 { | 80 { |
81 x = r.x(); | 81 x = r.x(); |
82 y = r.y(); | 82 y = r.y(); |
83 width = r.width(); | 83 width = r.width(); |
84 height = r.height(); | 84 height = r.height(); |
85 return *this; | 85 return *this; |
86 } | 86 } |
87 | 87 |
88 operator blink::IntRect() const | 88 operator IntRect() const |
89 { | 89 { |
90 return blink::IntRect(x, y, width, height); | 90 return IntRect(x, y, width, height); |
91 } | 91 } |
92 #else | 92 #else |
93 WebRect(const gfx::Rect& r) | 93 WebRect(const gfx::Rect& r) |
94 : x(r.x()) | 94 : x(r.x()) |
95 , y(r.y()) | 95 , y(r.y()) |
96 , width(r.width()) | 96 , width(r.width()) |
97 , height(r.height()) | 97 , height(r.height()) |
98 { | 98 { |
99 } | 99 } |
100 | 100 |
(...skipping 19 matching lines...) Expand all Loading... |
120 } | 120 } |
121 | 121 |
122 inline bool operator!=(const WebRect& a, const WebRect& b) | 122 inline bool operator!=(const WebRect& a, const WebRect& b) |
123 { | 123 { |
124 return !(a == b); | 124 return !(a == b); |
125 } | 125 } |
126 | 126 |
127 } // namespace blink | 127 } // namespace blink |
128 | 128 |
129 #endif | 129 #endif |
OLD | NEW |