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

Issue 2045253005: Re-implement SVG transform paint property nodes [spv2] (Closed)

Created:
4 years, 6 months ago by pdr.
Modified:
4 years, 6 months ago
Reviewers:
chrishtr, trchen, jbroman, fs
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Re-implement SVG transform paint property nodes [spv2] This patch adds a new property node for LayoutSVGRoot which maps from the local SVG space to the HTML border box[1]. This patch also removes the local SVG transform and makes SVG objects create transform nodes in PaintPropertyTreeBuilder::updateTransform[2]. This approach will let us support the other paint property types in SVG fairly easily in a followup patch. [1] Why do we need two transform nodes for the SVG root? LayoutSVGRoot paints itself (e.g., borders, outlines) in the local HTML border box transform space. LayoutSVGRoot's SVG children cannot paint in this space because they need an additional transform (called the local svg to border box) which offsets children by the border and includes SVG's "viewbox". [2] Why was m_svgLocalTransform removed? svgLocalTransform was designed to support the local transform of both the SVG root and all SVG descendants. Unfortunately, LayoutSVGRoot required that svgLocalTransform get created after filters/clips in PaintPropertyTreeBuilder but that left filters/clips in the wrong transform space. To solve this without a parallel implementation of filters/clips/etc for SVG, SVG children now create regular transform property nodes in PaintPropertyTreeBuilder. BUG=600618 Committed: https://crrev.com/18f6c6a247ea3301c38e4d79a5785c7119f7cbca Cr-Commit-Position: refs/heads/master@{#399635}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address reviewer comments, cleanup test, save SVGShapePainter changes for a followup. #

Patch Set 3 : Add a test and a fix for nested viewBoxes #

Total comments: 2

Patch Set 4 : Adjust svgLocalToBorderBox description #

Total comments: 4

Patch Set 5 : Address reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -53 lines) Patch
M third_party/WebKit/Source/core/paint/ObjectPaintProperties.h View 1 2 3 4 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp View 1 2 3 4 6 chunks +35 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp View 1 2 4 chunks +66 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/SVGRootPainter.cpp View 1 2 3 4 1 chunk +6 lines, -14 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2045253005/1
4 years, 6 months ago (2016-06-09 06:14:30 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-09 07:54:29 UTC) #4
pdr.
4 years, 6 months ago (2016-06-09 16:55:41 UTC) #6
jbroman
https://codereview.chromium.org/2045253005/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2045253005/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode101 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:101: // FIXME(pdr): SVG text nodes inherit from HTML and ...
4 years, 6 months ago (2016-06-09 22:16:49 UTC) #7
jbroman
(will look again tomorrow, but I'm heading home soon)
4 years, 6 months ago (2016-06-09 22:17:08 UTC) #8
pdr.
PTAL +chrishtr and fs as reviewers too. https://codereview.chromium.org/2045253005/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2045253005/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode101 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:101: // FIXME(pdr): ...
4 years, 6 months ago (2016-06-09 23:39:04 UTC) #11
fs
Looks reasonable to me https://codereview.chromium.org/2045253005/diff/40001/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h File third_party/WebKit/Source/core/paint/ObjectPaintProperties.h (right): https://codereview.chromium.org/2045253005/diff/40001/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h#newcode41 third_party/WebKit/Source/core/paint/ObjectPaintProperties.h:41: // | +---[ svgLocalToBorderBoxTransform ] ...
4 years, 6 months ago (2016-06-10 08:21:16 UTC) #12
pdr.
https://codereview.chromium.org/2045253005/diff/40001/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h File third_party/WebKit/Source/core/paint/ObjectPaintProperties.h (right): https://codereview.chromium.org/2045253005/diff/40001/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h#newcode41 third_party/WebKit/Source/core/paint/ObjectPaintProperties.h:41: // | +---[ svgLocalToBorderBoxTransform ] Additional transform for children ...
4 years, 6 months ago (2016-06-10 17:50:43 UTC) #13
pdr.
Tien-Ren is out until Monday and I'd like to wait for his input, so this ...
4 years, 6 months ago (2016-06-10 18:11:05 UTC) #14
jbroman
lgtm https://codereview.chromium.org/2045253005/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2045253005/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode366 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:366: if (boxModelObject.isBox() && (boxModelObject.isSVGRoot() || !boxModelObject.isSVG())) { premature ...
4 years, 6 months ago (2016-06-10 18:33:53 UTC) #15
pdr.
https://codereview.chromium.org/2045253005/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2045253005/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode366 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:366: if (boxModelObject.isBox() && (boxModelObject.isSVGRoot() || !boxModelObject.isSVG())) { On 2016/06/10 ...
4 years, 6 months ago (2016-06-10 19:45:46 UTC) #16
trchen
lgtm too
4 years, 6 months ago (2016-06-13 22:44:27 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2045253005/80001
4 years, 6 months ago (2016-06-13 22:59:12 UTC) #20
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-14 01:35:56 UTC) #21
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-14 01:35:59 UTC) #22
commit-bot: I haz the power
4 years, 6 months ago (2016-06-14 01:37:42 UTC) #24
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/18f6c6a247ea3301c38e4d79a5785c7119f7cbca
Cr-Commit-Position: refs/heads/master@{#399635}

Powered by Google App Engine
This is Rietveld 408576698