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

Issue 1461223002: Implement SVG's transform and effect paint property nodes (Closed)

Created:
5 years, 1 month ago by pdr.
Modified:
5 years, 1 month ago
Reviewers:
jbroman, trchen
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

Implement SVG's transform and effect paint property nodes This patch starts generating transform and effect paint property nodes for SVG. PaintPropertyTreeBuilder has been changed to walk both LayoutBoxModelObjects and SVG nodes. The effect node generation is straightforward, but SVG transform nodes need some svg-specific logic: 1) SVG does not use paint offset because everything is effectively absolutely positioned. The SVG root element now always creates a paint offset transform so all children do not need to. 2) SVG bakes the transform origin into all matrices. We may want to refactor this later to support compositor animations. 3) At the SVG->HTML boundary, out-of-flow and fixed positioning data is kept up to date by checking for both xforms and isSVGRoot. BUG=537409 Committed: https://crrev.com/1de8a82b564ec43cdbe64817b95732eb449e8f11 Cr-Commit-Position: refs/heads/master@{#361183}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address reviewer comments #

Total comments: 2

Patch Set 3 : Add two foreignObject transform tests #

Patch Set 4 : Fix fixed position bug discovered by TienRen #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -37 lines) Patch
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp View 1 2 3 9 chunks +52 lines, -32 lines 2 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp View 1 2 3 4 chunks +206 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (8 generated)
pdr.
5 years, 1 month ago (2015-11-20 04:31:03 UTC) #2
jbroman
lgtm, but please wait for trchen to have a look, too https://codereview.chromium.org/1461223002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): ...
5 years, 1 month ago (2015-11-20 19:09:21 UTC) #3
pdr.
https://codereview.chromium.org/1461223002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/1461223002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode122 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:122: shouldCreatePaintOffsetTranslationNode = toLayoutBoxModelObject(object).layer() && toLayoutBoxModelObject(object).layer()->paintsWithTransform(GlobalPaintNormalPhase); On 2015/11/20 at 19:09:20, ...
5 years, 1 month ago (2015-11-20 19:33:41 UTC) #4
jbroman
https://codereview.chromium.org/1461223002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/1461223002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode122 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:122: shouldCreatePaintOffsetTranslationNode = toLayoutBoxModelObject(object).layer() && toLayoutBoxModelObject(object).layer()->paintsWithTransform(GlobalPaintNormalPhase); On 2015/11/20 at 19:33:41, ...
5 years, 1 month ago (2015-11-20 19:53:40 UTC) #5
pdr.
On 2015/11/20 at 19:53:40, jbroman wrote: > https://codereview.chromium.org/1461223002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp > File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): > > https://codereview.chromium.org/1461223002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode122 ...
5 years, 1 month ago (2015-11-20 21:41:56 UTC) #6
trchen
Wow this is simpler than I expected. I know little about SVG specs so I'm ...
5 years, 1 month ago (2015-11-20 22:37:30 UTC) #7
pdr.
On 2015/11/20 at 22:37:30, trchen wrote: > Wow this is simpler than I expected. I ...
5 years, 1 month ago (2015-11-20 22:39:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1461223002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1461223002/20001
5 years, 1 month ago (2015-11-20 22:40:53 UTC) #11
trchen
Oops, are we not too late to add one more thing? https://codereview.chromium.org/1461223002/diff/20001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): ...
5 years, 1 month ago (2015-11-20 22:52:10 UTC) #12
pdr.
In the latest patch I went ahead and filled in the todo about adding foreignObject ...
5 years, 1 month ago (2015-11-21 00:09:47 UTC) #14
trchen
How about adding <g transform="translate(123)"> in between <svg> and <foreignObject>? By the way is SVG ...
5 years, 1 month ago (2015-11-21 00:31:53 UTC) #15
pdr.
The latest patch has some non-trivial changes in updateOutOfFlowContext. @jbroman and @trchen, can you both ...
5 years, 1 month ago (2015-11-21 06:15:57 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1461223002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1461223002/60001
5 years, 1 month ago (2015-11-23 06:33:15 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-23 07:45:16 UTC) #21
jbroman
still lgtm if trchen is happy https://codereview.chromium.org/1461223002/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/1461223002/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode233 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:233: if (object.styleRef().position() != ...
5 years, 1 month ago (2015-11-23 17:51:01 UTC) #22
trchen
lgtm too. Thanks! https://codereview.chromium.org/1461223002/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/1461223002/diff/60001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode233 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:233: if (object.styleRef().position() != StaticPosition || createdNewTransform ...
5 years, 1 month ago (2015-11-23 19:28:29 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1461223002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1461223002/60001
5 years, 1 month ago (2015-11-23 20:56:31 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-23 21:12:16 UTC) #26
commit-bot: I haz the power
5 years, 1 month ago (2015-11-23 21:12:53 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1de8a82b564ec43cdbe64817b95732eb449e8f11
Cr-Commit-Position: refs/heads/master@{#361183}

Powered by Google App Engine
This is Rietveld 408576698