| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2005 Nokia. All rights reserved. | 3 * Copyright (C) 2005 Nokia. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 bool intersects(const FloatRect&) const; | 152 bool intersects(const FloatRect&) const; |
| 153 bool contains(const FloatRect&) const; | 153 bool contains(const FloatRect&) const; |
| 154 bool contains(const FloatPoint&, ContainsMode = InsideOrOnStroke) const; | 154 bool contains(const FloatPoint&, ContainsMode = InsideOrOnStroke) const; |
| 155 | 155 |
| 156 void intersect(const FloatRect&); | 156 void intersect(const FloatRect&); |
| 157 void unite(const FloatRect&); | 157 void unite(const FloatRect&); |
| 158 void uniteEvenIfEmpty(const FloatRect&); | 158 void uniteEvenIfEmpty(const FloatRect&); |
| 159 void uniteIfNonZero(const FloatRect&); | 159 void uniteIfNonZero(const FloatRect&); |
| 160 void extend(const FloatPoint&); | 160 void extend(const FloatPoint&); |
| 161 | 161 |
| 162 // Note, this doesn't match what IntRect::contains(IntPoint&) does; the int ve
rsion | 162 // Note, this doesn't match what IntRect::contains(IntPoint&) does; the int |
| 163 // is really checking for containment of 1x1 rect, but that doesn't make sense
with floats. | 163 // version is really checking for containment of 1x1 rect, but that doesn't |
| 164 // make sense with floats. |
| 164 bool contains(float px, float py) const { | 165 bool contains(float px, float py) const { |
| 165 return px >= x() && px <= maxX() && py >= y() && py <= maxY(); | 166 return px >= x() && px <= maxX() && py >= y() && py <= maxY(); |
| 166 } | 167 } |
| 167 | 168 |
| 168 void inflateX(float dx) { | 169 void inflateX(float dx) { |
| 169 m_location.setX(m_location.x() - dx); | 170 m_location.setX(m_location.x() - dx); |
| 170 m_size.setWidth(m_size.width() + dx + dx); | 171 m_size.setWidth(m_size.width() + dx + dx); |
| 171 } | 172 } |
| 172 void inflateY(float dy) { | 173 void inflateY(float dy) { |
| 173 m_location.setY(m_location.y() - dy); | 174 m_location.setY(m_location.y() - dy); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 const FloatRect& srcRect, | 268 const FloatRect& srcRect, |
| 268 const FloatRect& destRect); | 269 const FloatRect& destRect); |
| 269 | 270 |
| 270 // Redeclared here to avoid ODR issues. | 271 // Redeclared here to avoid ODR issues. |
| 271 // See platform/testing/GeometryPrinters.h. | 272 // See platform/testing/GeometryPrinters.h. |
| 272 void PrintTo(const FloatRect&, std::ostream*); | 273 void PrintTo(const FloatRect&, std::ostream*); |
| 273 | 274 |
| 274 } // namespace blink | 275 } // namespace blink |
| 275 | 276 |
| 276 #endif | 277 #endif |
| OLD | NEW |