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 a2afb9ed6baf517cde36048cb217bce2c63df9b6..f9db4cf808fc28ae868126c5ae87fe8477c24efc 100644 |
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
@@ -2234,6 +2234,11 @@ void CanvasRenderingContext2D::addHitRegion(const HitRegionOptions& options, Exc |
return; |
} |
+ if (options.control() && !canvas()->isSupportedInteractiveCanvasFallback(*options.control())) { |
+ exceptionState.throwDOMException(NotSupportedError, "The control is neither null nor a supported interactive canvas fallback element."); |
+ return; |
+ } |
+ |
Path hitRegionPath = options.hasPath() ? options.path()->path() : m_path; |
SkCanvas* c = drawingCanvas(); |