| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 static IntRect rectForPoint(const LayoutPoint&, unsigned topPadding, unsigne
d rightPadding, unsigned bottomPadding, unsigned leftPadding); | 58 static IntRect rectForPoint(const LayoutPoint&, unsigned topPadding, unsigne
d rightPadding, unsigned bottomPadding, unsigned leftPadding); |
| 59 int topPadding() const { return roundedPoint().y() - m_boundingBox.y(); } | 59 int topPadding() const { return roundedPoint().y() - m_boundingBox.y(); } |
| 60 int rightPadding() const { return m_boundingBox.maxX() - roundedPoint().x()
- 1; } | 60 int rightPadding() const { return m_boundingBox.maxX() - roundedPoint().x()
- 1; } |
| 61 int bottomPadding() const { return m_boundingBox.maxY() - roundedPoint().y()
- 1; } | 61 int bottomPadding() const { return m_boundingBox.maxY() - roundedPoint().y()
- 1; } |
| 62 int leftPadding() const { return roundedPoint().x() - m_boundingBox.x(); } | 62 int leftPadding() const { return roundedPoint().x() - m_boundingBox.x(); } |
| 63 | 63 |
| 64 bool intersects(const LayoutRect&) const; | 64 bool intersects(const LayoutRect&) const; |
| 65 bool intersects(const FloatRect&) const; | 65 bool intersects(const FloatRect&) const; |
| 66 bool intersects(const RoundedRect&) const; | 66 bool intersects(const RoundedRect&) const; |
| 67 bool containsPoint(const FloatPoint&) const; |
| 67 | 68 |
| 68 const FloatPoint& transformedPoint() const { return m_transformedPoint; } | 69 const FloatPoint& transformedPoint() const { return m_transformedPoint; } |
| 69 const FloatQuad& transformedRect() const { return m_transformedRect; } | 70 const FloatQuad& transformedRect() const { return m_transformedRect; } |
| 70 | 71 |
| 71 private: | 72 private: |
| 72 template<typename RectType> | 73 template<typename RectType> |
| 73 bool intersectsRect(const RectType&) const; | 74 bool intersectsRect(const RectType&) const; |
| 74 void move(const LayoutSize& offset); | 75 void move(const LayoutSize& offset); |
| 75 | 76 |
| 76 // This is cached forms of the more accurate point and area below. | 77 // This is cached forms of the more accurate point and area below. |
| 77 LayoutPoint m_point; | 78 LayoutPoint m_point; |
| 78 IntRect m_boundingBox; | 79 IntRect m_boundingBox; |
| 79 | 80 |
| 80 FloatPoint m_transformedPoint; | 81 FloatPoint m_transformedPoint; |
| 81 FloatQuad m_transformedRect; | 82 FloatQuad m_transformedRect; |
| 82 | 83 |
| 83 bool m_isRectBased; | 84 bool m_isRectBased; |
| 84 bool m_isRectilinear; | 85 bool m_isRectilinear; |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace WebCore | 88 } // namespace WebCore |
| 88 | 89 |
| 89 #endif // HitTestLocation_h | 90 #endif // HitTestLocation_h |
| OLD | NEW |