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

Issue 2478233002: Make 'transform' a presentation attribute on SVG elements (Closed)

Created:
4 years, 1 month ago by fs
Modified:
4 years ago
Reviewers:
pdr., Timothy Loh
CC:
fs, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-css, chromium-reviews, dglazkov+blink, krit, Eric Willigers, f(malita), gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make 'transform' a presentation attribute on SVG elements This makes 'transform', 'gradientTransform' and 'patternTransform' presentation attributes on SVGGraphicsElements, SVGGradientElements and SVGPatternElements respectively. Spec: http://www.w3.org/TR/css3-transforms/#svg-transform http://www.w3.org/TR/css3-transforms/#svg-syntax http://www.w3.org/TR/css3-transforms/#svg-gradient-transform-pattern-transform Salvaged from https://codereview.chromium.org/423093014, but takes a different approach to bridge the syntax gap and avoid crbug.com/577219. The strategy taken here is to use the SVGTransformList to generate a CSSValue for the presentation attribute style, and hence postponing both support for the full transform syntax and a way around the bug mentioned above. Essentially softening the blow. These two "features" are expected to be implemented eventually, so this is just a "first step". BUG=369942 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/f72170ee0164e5d4bcf14551603907ffafd969f1 Cr-Commit-Position: refs/heads/master@{#434934}

Patch Set 1 #

Patch Set 2 : PLATFORM_EXPORT #

Patch Set 3 : Move DCHECK #

Patch Set 4 : Fix RotateAround... comparison #

Patch Set 5 : Animation fixes #

Patch Set 6 : Rebase #

Patch Set 7 : Updated expectations #

Total comments: 8

Patch Set 8 : Get rid of {calculate,has}AnimatedLocalTransform #

Patch Set 9 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1178 lines, -632 lines) Patch
M third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-child-changes-expected.txt View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/image-with-clip-path-expected.txt View 1 2 3 4 5 6 2 chunks +33 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-container-expected.txt View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.txt View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.txt View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-clip-target-transform-expected.txt View 1 2 3 4 5 6 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-invalidation-expected.txt View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/modify-inserted-listitem-expected.txt View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/shape-transform-change-expected.txt View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.txt View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/tabgroup-expected.txt View 1 2 3 4 5 6 6 chunks +45 lines, -45 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-repaint-including-stroke-expected.txt View 1 2 3 4 5 6 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt View 1 2 3 4 5 6 2 chunks +110 lines, -98 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-setAttribute-crash-expected.txt View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/tabgroup-expected.txt View 1 2 3 4 5 6 6 chunks +45 lines, -45 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-repaint-including-stroke-expected.txt View 1 2 3 4 5 6 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-rescale-expected.txt View 1 2 3 4 5 6 2 chunks +110 lines, -98 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/tabgroup-expected.txt View 1 2 3 4 5 6 6 chunks +45 lines, -45 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-repaint-including-stroke-expected.txt View 1 2 3 4 5 6 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-rescale-expected.txt View 1 2 3 4 5 6 2 chunks +102 lines, -90 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/custom/gradient-transform-invalid.svg View 1 chunk +70 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/custom/gradient-transform-invalid-expected.svg View 1 chunk +70 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/gradient-transform-inline-style.svg View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/gradient-transform-inline-style-expected.svg View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/gradient-transform-no-override.svg View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/gradient-transform-no-override-2.svg View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/gradient-transform-no-override-2-expected.svg View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/gradient-transform-no-override-expected.svg View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/translate-without-units.svg View 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/transforms/translate-without-units-expected.svg View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp View 1 2 3 4 1 chunk +19 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGTransformableContainer.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/SVGClipPainter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.h View 1 2 3 4 2 chunks +10 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp View 1 2 3 4 1 chunk +13 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGElement.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGElement.cpp View 1 2 3 4 5 6 7 8 1 chunk +65 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGGradientElement.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGGradientElement.cpp View 1 2 3 4 3 chunks +22 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGGraphicsElement.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp View 1 2 3 4 5 6 7 4 chunks +22 lines, -72 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGLinearGradientElement.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPatternElement.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPatternElement.cpp View 1 2 3 4 5 6 7 5 chunks +26 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGTransformList.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGTransformList.cpp View 2 chunks +103 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGUseElement.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/animation/AnimationTranslationUtil.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h View 1 2 3 4 chunks +37 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/transforms/RotateTransformOperation.cpp View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/transforms/TransformOperation.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/transforms/TransformOperations.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 49 (39 generated)
fs
This is a sort of "step 1". The next step would be to support 3-argument ...
4 years, 1 month ago (2016-11-18 11:42:03 UTC) #27
pdr.
Sorry about the slow review. I think this is reasonable overall. @Timloh, could you review ...
4 years, 1 month ago (2016-11-22 04:02:49 UTC) #28
fs
https://codereview.chromium.org/2478233002/diff/120001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt File third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt (right): https://codereview.chromium.org/2478233002/diff/120001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt#newcode75 third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt:75: "object": "LayoutSVGForeignObject foreignObject", On 2016/11/22 at 04:02:48, pdr. wrote: ...
4 years, 1 month ago (2016-11-22 13:54:07 UTC) #29
fs
https://codereview.chromium.org/2478233002/diff/120001/third_party/WebKit/Source/core/svg/SVGElement.h File third_party/WebKit/Source/core/svg/SVGElement.h (right): https://codereview.chromium.org/2478233002/diff/120001/third_party/WebKit/Source/core/svg/SVGElement.h#newcode77 third_party/WebKit/Source/core/svg/SVGElement.h:77: bool hasTransform() const; On 2016/11/22 at 13:54:07, fs wrote: ...
4 years, 1 month ago (2016-11-22 14:01:24 UTC) #30
fs
https://codereview.chromium.org/2478233002/diff/120001/third_party/WebKit/Source/core/svg/SVGElement.h File third_party/WebKit/Source/core/svg/SVGElement.h (right): https://codereview.chromium.org/2478233002/diff/120001/third_party/WebKit/Source/core/svg/SVGElement.h#newcode77 third_party/WebKit/Source/core/svg/SVGElement.h:77: bool hasTransform() const; On 2016/11/22 at 14:01:24, fs wrote: ...
4 years, 1 month ago (2016-11-22 14:54:35 UTC) #36
pdr.
LGTM @timloh, I think the SVG side of this looks good. I also think the ...
4 years, 1 month ago (2016-11-22 21:19:28 UTC) #37
Timothy Loh
On 2016/11/22 21:19:28, pdr. wrote: > LGTM > > @timloh, I think the SVG side ...
4 years, 1 month ago (2016-11-23 00:17:25 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2478233002/160001
4 years ago (2016-11-29 09:15:18 UTC) #45
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-11-29 09:21:29 UTC) #47
commit-bot: I haz the power
4 years ago (2016-11-29 09:34:40 UTC) #49
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/f72170ee0164e5d4bcf14551603907ffafd969f1
Cr-Commit-Position: refs/heads/master@{#434934}

Powered by Google App Engine
This is Rietveld 408576698