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

Issue 411613002: [SVG] Reject hit-test queries when the element has a singular transform (Closed)

Created:
6 years, 5 months ago by fs
Modified:
6 years, 5 months ago
CC:
blink-reviews, blink-reviews-rendering, zoltan1, eae+blinkwatch, leviw+renderwatch, kouhei+svg_chromium.org, fs, ed+blinkwatch_opera.com, krit, f(malita), gyuyoung.kim_webkit.org, jchaffraix+rendering, pdr., rwlbuis, Stephen Chennney, rune+blink
Project:
blink
Visibility:
Public.

Description

[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

Patch Set 1 #

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

Messages

Total messages: 5 (0 generated)
fs
6 years, 5 months ago (2014-07-22 17:53:10 UTC) #1
Stephen Chennney
Nice. LGTM.
6 years, 5 months ago (2014-07-22 18:19:04 UTC) #2
fs
The CQ bit was checked by fs@opera.com
6 years, 5 months ago (2014-07-23 08:47:02 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/411613002/1
6 years, 5 months ago (2014-07-23 08:47:39 UTC) #4
commit-bot: I haz the power
6 years, 5 months ago (2014-07-23 08:52:02 UTC) #5
Message was sent while issue was closed.
Change committed as 178745

Powered by Google App Engine
This is Rietveld 408576698