| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 void shiftMaxYEdgeTo(float edge) | 125 void shiftMaxYEdgeTo(float edge) |
| 126 { | 126 { |
| 127 float delta = edge - maxY(); | 127 float delta = edge - maxY(); |
| 128 setHeight(std::max(0.0f, height() + delta)); | 128 setHeight(std::max(0.0f, height() + delta)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 FloatPoint minXMinYCorner() const { return m_location; } // typically topLef
t | 131 FloatPoint minXMinYCorner() const { return m_location; } // typically topLef
t |
| 132 FloatPoint maxXMinYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y()); } // typically topRight | 132 FloatPoint maxXMinYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y()); } // typically topRight |
| 133 FloatPoint minXMaxYCorner() const { return FloatPoint(m_location.x(), m_loca
tion.y() + m_size.height()); } // typically bottomLeft | 133 FloatPoint minXMaxYCorner() const { return FloatPoint(m_location.x(), m_loca
tion.y() + m_size.height()); } // typically bottomLeft |
| 134 FloatPoint maxXMaxYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y() + m_size.height()); } // typically bottomRight | 134 FloatPoint maxXMaxYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y() + m_size.height()); } // typically bottomRight |
| 135 FloatPoint leftEdgeMidPoint() const { return FloatPoint(m_location.x(), m_lo
cation.y() + m_size.height() / 2); } |
| 136 FloatPoint rightEdgeMidPoint() const { return FloatPoint(m_location.x() + m_
size.width(), m_location.y() + m_size.height() / 2); } |
| 135 | 137 |
| 136 bool intersects(const FloatRect&) const; | 138 bool intersects(const FloatRect&) const; |
| 137 bool contains(const FloatRect&) const; | 139 bool contains(const FloatRect&) const; |
| 138 bool contains(const FloatPoint&, ContainsMode = InsideOrOnStroke) const; | 140 bool contains(const FloatPoint&, ContainsMode = InsideOrOnStroke) const; |
| 139 | 141 |
| 140 void intersect(const FloatRect&); | 142 void intersect(const FloatRect&); |
| 141 void unite(const FloatRect&); | 143 void unite(const FloatRect&); |
| 142 void uniteEvenIfEmpty(const FloatRect&); | 144 void uniteEvenIfEmpty(const FloatRect&); |
| 143 void uniteIfNonZero(const FloatRect&); | 145 void uniteIfNonZero(const FloatRect&); |
| 144 void extend(const FloatPoint&); | 146 void extend(const FloatPoint&); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 PLATFORM_EXPORT IntRect enclosedIntRect(const FloatRect&); | 243 PLATFORM_EXPORT IntRect enclosedIntRect(const FloatRect&); |
| 242 | 244 |
| 243 PLATFORM_EXPORT IntRect roundedIntRect(const FloatRect&); | 245 PLATFORM_EXPORT IntRect roundedIntRect(const FloatRect&); |
| 244 | 246 |
| 245 // Map supplied rect from srcRect to an equivalent rect in destRect. | 247 // Map supplied rect from srcRect to an equivalent rect in destRect. |
| 246 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co
nst FloatRect& destRect); | 248 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co
nst FloatRect& destRect); |
| 247 | 249 |
| 248 } | 250 } |
| 249 | 251 |
| 250 #endif | 252 #endif |
| OLD | NEW |