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

Issue 230443003: Fix application of OBB paint-servers when device scale != 1 (Closed)

Created:
6 years, 8 months ago by fs
Modified:
6 years, 8 months ago
CC:
blink-reviews, krit, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, kouhei+svg_chromium.org, fs, ed+blinkwatch_opera.com, gyuyoung.kim_webkit.org, jchaffraix+rendering, pdr., rwlbuis, Stephen Chennney, rune+blink
Visibility:
Public.

Description

Fix application of OBB paint-servers when device scale != 1 The additional text transform would be applied after the "regular" userspace transform, which in the object bounding box case meant that any possible translation would not be applied correctly (wouldn't be subject to the additional scaling.) The code was also sensitive to whether or not any text-decorations needed to be painted with the paint-server, since that could end up clobbering the userspace transform. Fix by applying the additional text transform in the correct order, and always re-compute the "resource space" transform in the relevant applyResource(...) methods. Give the additional transform for the non-scaling stroke case the same treatment, since it could end up clobbering the userspace transform when the same paint-server was used for both the stroke and the fill of an object. The code used for computing the "resource space" transform is split out of RenderSVGResource{Gradient,Pattern} and moved to the super-class (RenderSVGResourceContainer.) BUG=360571 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171287

Patch Set 1 #

Patch Set 2 : Fix SVG fonts case; TestExpectations. #

Total comments: 5

Patch Set 3 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -30 lines) Patch
M LayoutTests/TestExpectations View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/svg/stroke/non-scaling-stroke-paintserver-same-as-fill.html View 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/svg/stroke/non-scaling-stroke-paintserver-same-as-fill-expected.html View 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/svg/text/obb-paintserver.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/svg/text/obb-paintserver-expected.html View 1 chunk +23 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceContainer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceContainer.cpp View 1 chunk +20 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceGradient.cpp View 2 chunks +7 lines, -16 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourcePattern.cpp View 2 chunks +6 lines, -13 lines 0 comments Download
M Source/core/rendering/svg/SVGTextRunRenderingContext.cpp View 1 2 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
fs
6 years, 8 months ago (2014-04-09 14:31:42 UTC) #1
Stephen Chennney
I think it's good, but pdr should look too.
6 years, 8 months ago (2014-04-09 15:19:20 UTC) #2
f(malita)
https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp File Source/core/rendering/svg/RenderSVGResourceGradient.cpp (right): https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp#newcode110 Source/core/rendering/svg/RenderSVGResourceGradient.cpp:110: AffineTransform computedGradientSpaceTransform = computeResourceSpaceTransform(object, gradientData->userspaceTransform, svgStyle, resourceMode); Isn't (resourceMode ...
6 years, 8 months ago (2014-04-09 16:26:15 UTC) #3
f(malita)
On 2014/04/09 16:26:15, Florin Malita wrote: > transform in the cached based transform *cached base ...
6 years, 8 months ago (2014-04-09 16:26:59 UTC) #4
fs
https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp File Source/core/rendering/svg/RenderSVGResourceGradient.cpp (right): https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp#newcode110 Source/core/rendering/svg/RenderSVGResourceGradient.cpp:110: AffineTransform computedGradientSpaceTransform = computeResourceSpaceTransform(object, gradientData->userspaceTransform, svgStyle, resourceMode); On 2014/04/09 ...
6 years, 8 months ago (2014-04-09 16:59:13 UTC) #5
f(malita)
https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp File Source/core/rendering/svg/RenderSVGResourceGradient.cpp (right): https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp#newcode110 Source/core/rendering/svg/RenderSVGResourceGradient.cpp:110: AffineTransform computedGradientSpaceTransform = computeResourceSpaceTransform(object, gradientData->userspaceTransform, svgStyle, resourceMode); On 2014/04/09 ...
6 years, 8 months ago (2014-04-09 17:46:50 UTC) #6
fs
https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp File Source/core/rendering/svg/RenderSVGResourceGradient.cpp (right): https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp#newcode110 Source/core/rendering/svg/RenderSVGResourceGradient.cpp:110: AffineTransform computedGradientSpaceTransform = computeResourceSpaceTransform(object, gradientData->userspaceTransform, svgStyle, resourceMode); On 2014/04/09 ...
6 years, 8 months ago (2014-04-10 08:16:40 UTC) #7
f(malita)
lgtm https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp File Source/core/rendering/svg/RenderSVGResourceGradient.cpp (right): https://codereview.chromium.org/230443003/diff/20001/Source/core/rendering/svg/RenderSVGResourceGradient.cpp#newcode110 Source/core/rendering/svg/RenderSVGResourceGradient.cpp:110: AffineTransform computedGradientSpaceTransform = computeResourceSpaceTransform(object, gradientData->userspaceTransform, svgStyle, resourceMode); On ...
6 years, 8 months ago (2014-04-10 12:57:47 UTC) #8
fs
The CQ bit was checked by fs@opera.com
6 years, 8 months ago (2014-04-10 14:18:08 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/230443003/20001
6 years, 8 months ago (2014-04-10 14:18:15 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-10 14:18:30 UTC) #11
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-10 14:18:30 UTC) #12
fs
The CQ bit was checked by fs@opera.com
6 years, 8 months ago (2014-04-10 15:52:07 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/230443003/40001
6 years, 8 months ago (2014-04-10 15:52:08 UTC) #14
commit-bot: I haz the power
6 years, 8 months ago (2014-04-10 16:51:27 UTC) #15
Message was sent while issue was closed.
Change committed as 171287

Powered by Google App Engine
This is Rietveld 408576698