Chromium Code Reviews
DescriptionRe-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 #
Messages
Total messages: 24 (8 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||