diff options
Diffstat (limited to 'WebCore/rendering/InlineTextBox.cpp')
-rw-r--r-- | WebCore/rendering/InlineTextBox.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp index 9c28b42..0c5df41 100644 --- a/WebCore/rendering/InlineTextBox.cpp +++ b/WebCore/rendering/InlineTextBox.cpp @@ -266,8 +266,20 @@ bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, in return false; IntRect rect(tx + m_x, ty + m_y, m_width, height()); +#ifdef ANDROID_HITTEST_WITHSIZE + if (m_truncation != cFullTruncation && visibleToHitTesting() && result.intersects(x, y, rect)) { +#else if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.contains(x, y)) { +#endif renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty)); +#ifdef ANDROID_HITTEST_WITHSIZE + if (result.isRegionTest()) { + ASSERT(renderer()->node() || renderer()->isAnonymous()); + result.addRawNode(renderer()->node()); + if (!result.containedBy(x, y, rect)) + return false; + } +#endif return true; } return false; |