|
[SVG] Reject hit-test queries when the element has a singular transform
When an SVG element was affected by a transform that was singular,
AffineTransform::inverse() would return the identity transform, and the
query point would not actually be transformed to the local user-space.
Make sure all calls to said method is guarded by a check to
AffineTransform::isInvertible(), and fail the hit-test if it returns false.
Add a new SVGRenderSupport-helper that does the point-transformation and
checks against the clipping area, since this is a recurring pattern in
various implementations of RenderSVG*::nodeAtFloatPoint.
RenderSVGRoot has the logic added, but still does not reject queries. This
is due to special-case handling of empty viewBoxes in
SVGFitToViewBox::viewBoxToViewTransform.
BUG= 395675
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178745
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+250 lines, -22 lines) |
Patch |
|
A |
LayoutTests/svg/hittest/singular-transform-1.html
|
View
|
|
1 chunk |
+24 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-1-expected.txt
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-2.html
|
View
|
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-2-expected.txt
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-3.html
|
View
|
|
1 chunk |
+24 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-3-expected.txt
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-4.html
|
View
|
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-4-expected.txt
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-5.html
|
View
|
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-5-expected.txt
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-6.html
|
View
|
|
1 chunk |
+17 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-6-expected.txt
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-7.html
|
View
|
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/svg/hittest/singular-transform-7-expected.txt
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/RenderSVGContainer.cpp
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/RenderSVGForeignObject.cpp
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/RenderSVGImage.cpp
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/RenderSVGResourceClipper.cpp
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/RenderSVGRoot.cpp
|
View
|
|
1 chunk |
+11 lines, -8 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/RenderSVGShape.cpp
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/RenderSVGText.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/SVGRenderSupport.h
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/SVGRenderSupport.cpp
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
Total messages: 5 (0 generated)
|