Index: Source/core/layout/HitTestLocation.cpp |
diff --git a/Source/core/layout/HitTestLocation.cpp b/Source/core/layout/HitTestLocation.cpp |
index fd37f2de430119602396189090ad599dcfc75ad1..65e66e13cc454d8723f4b37eb3e4a6f73b994fc1 100644 |
--- a/Source/core/layout/HitTestLocation.cpp |
+++ b/Source/core/layout/HitTestLocation.cpp |
@@ -122,7 +122,6 @@ bool HitTestLocation::intersectsRect(const RectType& rect, const RectType& bound |
{ |
// FIXME: When the hit test is not rect based we should use rect.contains(m_point). |
// That does change some corner case tests though. |
- |
// First check if rect even intersects our bounding box. |
if (!rect.intersects(boundingBox)) |
return false; |
@@ -141,11 +140,17 @@ bool HitTestLocation::intersectsRect(const RectType& rect, const RectType& bound |
bool HitTestLocation::intersects(const LayoutRect& rect) const |
{ |
+ if (!m_isRectBased) |
+ return rect.contains(m_point); |
+ |
return intersectsRect(rect, LayoutRect(m_boundingBox)); |
} |
bool HitTestLocation::intersects(const FloatRect& rect) const |
{ |
+ if (!m_isRectBased) |
+ return rect.contains(FloatPoint(m_point)); |
+ |
return intersectsRect(rect, FloatRect(m_boundingBox)); |
} |