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

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: rebase 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
« no previous file with comments | « Source/core/html/canvas/HitRegion.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/HitRegion.cpp
diff --git a/Source/core/html/canvas/HitRegion.cpp b/Source/core/html/canvas/HitRegion.cpp
index 60f70a015cf0a201cce85e4c90e58a89f74a66e4..f1466f1f64201953b236ca690a8537afa77f25d1 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)
{
}
@@ -41,7 +42,7 @@ void HitRegion::updateAccessibility(Element* canvas)
bool HitRegion::contains(const LayoutPoint& point) const
{
- return m_path.contains(point, RULE_NONZERO);
+ return m_path.contains(point, m_fillRule);
}
void HitRegion::removePixels(const Path& clearArea)
« no previous file with comments | « Source/core/html/canvas/HitRegion.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698