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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceClipper.cpp

Issue 411613002: [SVG] Reject hit-test queries when the element has a singular transform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/rendering/svg/RenderSVGImage.cpp ('k') | Source/core/rendering/svg/RenderSVGRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGResourceClipper.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
index a9cd40a173ff9fe4f2b0ca49ea609c1766e0b9af..c0a6d0bb178bf2757cf2a4db3fcf990c2ee799f8 100644
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
@@ -338,7 +338,11 @@ bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin
point = transform.inverse().mapPoint(point);
}
- point = clipPathElement->animatedLocalTransform().inverse().mapPoint(point);
+ AffineTransform animatedLocalTransform = clipPathElement->animatedLocalTransform();
+ if (!animatedLocalTransform.isInvertible())
+ return false;
+
+ point = animatedLocalTransform.inverse().mapPoint(point);
for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement)) {
RenderObject* renderer = childElement->renderer();
« no previous file with comments | « Source/core/rendering/svg/RenderSVGImage.cpp ('k') | Source/core/rendering/svg/RenderSVGRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698