OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, Google Inc. All rights reserved. | 2 * Copyright (c) 2012, 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 bool intersects(const LayoutRect&) const; | 138 bool intersects(const LayoutRect&) const; |
139 WEBCORE_EXPORT bool contains(const LayoutRect&) const; | 139 WEBCORE_EXPORT bool contains(const LayoutRect&) const; |
140 | 140 |
141 // This checks to see if the rect contains x,y in the traditional sense. | 141 // This checks to see if the rect contains x,y in the traditional sense. |
142 // Equivalent to checking if the rect contains a 1x1 rect below and to the r
ight of (px,py). | 142 // Equivalent to checking if the rect contains a 1x1 rect below and to the r
ight of (px,py). |
143 bool contains(LayoutUnit px, LayoutUnit py) const | 143 bool contains(LayoutUnit px, LayoutUnit py) const |
144 { return px >= x() && px < maxX() && py >= y() && py < maxY(); } | 144 { return px >= x() && px < maxX() && py >= y() && py < maxY(); } |
145 bool contains(const LayoutPoint& point) const { return contains(point.x(), p
oint.y()); } | 145 bool contains(const LayoutPoint& point) const { return contains(point.x(), p
oint.y()); } |
146 | 146 |
147 void intersect(const LayoutRect&); | 147 void intersect(const LayoutRect&); |
| 148 bool edgeInclusiveIntersect(const LayoutRect&); |
148 WEBCORE_EXPORT void unite(const LayoutRect&); | 149 WEBCORE_EXPORT void unite(const LayoutRect&); |
149 void uniteIfNonZero(const LayoutRect&); | 150 void uniteIfNonZero(const LayoutRect&); |
150 bool checkedUnite(const LayoutRect&); | 151 bool checkedUnite(const LayoutRect&); |
151 | 152 |
152 void inflateX(LayoutUnit dx) | 153 void inflateX(LayoutUnit dx) |
153 { | 154 { |
154 m_location.setX(m_location.x() - dx); | 155 m_location.setX(m_location.x() - dx); |
155 m_size.setWidth(m_size.width() + dx + dx); | 156 m_size.setWidth(m_size.width() + dx + dx); |
156 } | 157 } |
157 void inflateY(LayoutUnit dy) | 158 void inflateY(LayoutUnit dy) |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 247 } |
247 return snapRectToDevicePixels(rect, deviceScaleFactor); | 248 return snapRectToDevicePixels(rect, deviceScaleFactor); |
248 } | 249 } |
249 | 250 |
250 FloatRect encloseRectToDevicePixels(const LayoutRect&, float pixelSnappingFactor
); | 251 FloatRect encloseRectToDevicePixels(const LayoutRect&, float pixelSnappingFactor
); |
251 | 252 |
252 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const LayoutRect&); | 253 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const LayoutRect&); |
253 | 254 |
254 } // namespace WebCore | 255 } // namespace WebCore |
255 | 256 |
OLD | NEW |