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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 1627403002: clip Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index c2b01b6ffa46942b5425a244b164e8e34c580923..b6773e35255308cacf640f24bef7112a57549f1a 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -2217,13 +2217,8 @@ void CanvasRenderingContext2D::addHitRegion(const HitRegionOptions& options, Exc
hitRegionPath.transform(state().transform());
- if (state().hasClip()) {
- // FIXME: The hit regions should take clipping region into account.
- // However, we have no way to get the region from canvas state stack by now.
- // See http://crbug.com/387057
- exceptionState.throwDOMException(NotSupportedError, "The specified path has no pixels.");
- return;
- }
+ if (state().hasClip())
+ hitRegionPath = state().totalClipPath(hitRegionPath.skPath());
if (!m_hitRegionManager)
m_hitRegionManager = HitRegionManager::create();
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698