[Webkit-unassigned] [Bug 40197] Enhance the hit testing to take a rectangle instead of a point

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 11 11:10:10 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40197





--- Comment #18 from Antonio Gomes (tonikitoo) <tonikitoo at webkit.org>  2010-06-11 11:10:07 PST ---
(From update of attachment 57980)
> +bool HitTestResult::intersects(int x, int y, const IntRect& other) const
> +{
> +    IntRect pointRect(x - m_pointPadding.width(), y - m_pointPadding.height(), 2 * m_pointPadding.width() + 1, 2 * m_pointPadding.height() + 1);
> +    return other.intersects(pointRect);
> +}

Do you really need pass 'x' and 'y' for intersects? The are the same as the original hit test point it seems.

maybe:

bool HitTestResult::intersects(const IntRect& other) const
{
    IntRect pointRect(m_point.x() - m_pointPadding.width(), m_point.y() - m_pointPadding.height(), 2 * m_pointPadding.width() + 1, 2 * m_pointPadding.height() + 1);
    return other.intersects(pointRect);
}

with call sites changed to pass just the 'other' rect?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list