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

Unified Diff: Source/core/rendering/svg/RenderSVGForeignObject.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/RenderSVGContainer.cpp ('k') | Source/core/rendering/svg/RenderSVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGForeignObject.cpp
diff --git a/Source/core/rendering/svg/RenderSVGForeignObject.cpp b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
index 7506b4626e33fb8ef57351126960f2ce051aca96..78a6caf1e5c0eb6dafd6d69a7370bedbf2c040f7 100644
--- a/Source/core/rendering/svg/RenderSVGForeignObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
@@ -168,7 +168,11 @@ bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
if (hitTestAction != HitTestForeground)
return false;
- FloatPoint localPoint = localTransform().inverse().mapPoint(pointInParent);
+ AffineTransform localTransform = this->localTransform();
+ if (!localTransform.isInvertible())
+ return false;
+
+ FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent);
// Early exit if local point is not contained in clipped viewport area
if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPoint))
« no previous file with comments | « Source/core/rendering/svg/RenderSVGContainer.cpp ('k') | Source/core/rendering/svg/RenderSVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698