Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1047)

Unified Diff: Source/core/html/canvas/HitRegion.cpp

Issue 346003007: Add fillRule option for hit regions on canvas2d. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/HitRegion.cpp
diff --git a/Source/core/html/canvas/HitRegion.cpp b/Source/core/html/canvas/HitRegion.cpp
index d436f45a87cab471ee616f1c80042b24274bbc9a..cb2e827a0ff4962320d01b07e6e329fe44b817a3 100644
--- a/Source/core/html/canvas/HitRegion.cpp
+++ b/Source/core/html/canvas/HitRegion.cpp
@@ -14,6 +14,7 @@ HitRegion::HitRegion(const HitRegionOptions& options)
: m_id(options.id)
, m_control(options.control)
, m_path(options.path)
+ , m_fillRule(options.fillRule)
{
}
@@ -44,7 +45,7 @@ bool HitRegion::contains(const LayoutPoint& point) const
if (!m_path.boundingRect().contains(point))
return false;
- return m_path.contains(point, RULE_NONZERO);
+ return m_path.contains(point, m_fillRule);
}
void HitRegion::removePixels(const Path& clearArea)

Powered by Google App Engine
This is Rietveld 408576698