Reviewed by Holger Freyther.
Check the bounding box before doing a full hit test
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::contains):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28860
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-19 Alp Toker <alp@atoker.com>
+
+ Reviewed by Holger Freyther.
+
+ Check the bounding box before doing a full hit test
+
+ * platform/graphics/cairo/PathCairo.cpp:
+ (WebCore::Path::contains):
+
2007-12-18 Sam Weinig <sam@webkit.org>
Reviewed by Geoff.
bool Path::contains(const FloatPoint& point, WindRule rule) const
{
+ if (!boundingRect().contains(point))
+ return false;
+
cairo_t* cr = platformPath()->m_cr;
cairo_fill_rule_t cur = cairo_get_fill_rule(cr);
cairo_set_fill_rule(cr, rule == RULE_EVENODD ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING);