We should do this.
Issue 610854 has been merged into this issue.
The Paint Team has this on their OKR, and I've a CL that's close to done. I'll look into this when my vacation is over.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/96f087c5d57531a7c92bd567b18de5e5c6bde505 commit 96f087c5d57531a7c92bd567b18de5e5c6bde505 Author: fs <fs@opera.com> Date: Mon Aug 22 19:09:20 2016 More const LayoutObject references in SVGLayoutSupport BUG= 633028 Review-Url: https://codereview.chromium.org/2265113002 Cr-Commit-Position: refs/heads/master@{#413501} [modify] https://crrev.com/96f087c5d57531a7c92bd567b18de5e5c6bde505/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp [modify] https://crrev.com/96f087c5d57531a7c92bd567b18de5e5c6bde505/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp [modify] https://crrev.com/96f087c5d57531a7c92bd567b18de5e5c6bde505/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp [modify] https://crrev.com/96f087c5d57531a7c92bd567b18de5e5c6bde505/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp [modify] https://crrev.com/96f087c5d57531a7c92bd567b18de5e5c6bde505/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp [modify] https://crrev.com/96f087c5d57531a7c92bd567b18de5e5c6bde505/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp [modify] https://crrev.com/96f087c5d57531a7c92bd567b18de5e5c6bde505/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/66574fefebe275a0d8346e741730dfbb638721c5 commit 66574fefebe275a0d8346e741730dfbb638721c5 Author: fs <fs@opera.com> Date: Mon Aug 22 20:04:02 2016 Refactor ClipPathHelper in PaintLayerPainter.cpp for reuse Separate out client concerns and move the helper class to a new file and rename it to ClipPathClipper. This will allow sharing this code between the PaintLayerPainter and SVGPaintContext code-paths. BUG= 633028 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2265123002 Cr-Commit-Position: refs/heads/master@{#413518} [modify] https://crrev.com/66574fefebe275a0d8346e741730dfbb638721c5/third_party/WebKit/Source/core/core.gypi [add] https://crrev.com/66574fefebe275a0d8346e741730dfbb638721c5/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp [add] https://crrev.com/66574fefebe275a0d8346e741730dfbb638721c5/third_party/WebKit/Source/core/paint/ClipPathClipper.h [modify] https://crrev.com/66574fefebe275a0d8346e741730dfbb638721c5/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/422862958695797596356c0bb1d6f0e964f9ee83 commit 422862958695797596356c0bb1d6f0e964f9ee83 Author: fs <fs@opera.com> Date: Thu Sep 01 21:54:27 2016 Use LayoutSVGResourceClipper::resourceBoundingBox() in ClipPathClipper Use the reference box to compute the clip-path bounds in ClipPathClipper, using the resourceBoundingBox() method from LayoutSVGResourceClipper. This should give reasonably tight-fitting bounds for the clip-as-mask code-path which uses these bounds. It also means one less item to pass around. This means that the clip-path code in PaintLayerPainter no longer needs the |rootRelativeBounds| and associated bool, so that code can be pushed down into FilterPainter with additional plumbing simplifications. Also straighten out the code-flow in ClipPathClipper for less indented, and hopefully easier to follow, code. BUG= 633028 , 626097 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2279823002 Cr-Commit-Position: refs/heads/master@{#416073} [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.h [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/paint/ClipPathClipper.h [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/paint/FilterPainter.cpp [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/paint/FilterPainter.h [modify] https://crrev.com/422862958695797596356c0bb1d6f0e964f9ee83/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f4431bff28115f98687623c8ff242d2fc4e989ff commit f4431bff28115f98687623c8ff242d2fc4e989ff Author: fs <fs@opera.com> Date: Tue Sep 13 22:05:44 2016 Add support for <basic-shape> to 'clip-path' on SVG elements Use ClipPathOperation as storage for the property in SVGComputedStyle, and add support for <basic-shape>s where needed. This also means that nesting a <clipPath> with a <basic-shape> is added. Since SVGPaintContext::applyClipIfNecessary can't fail in a useful way, just drop the returned bool (test added.) An invalid clip-path will just be ignored (per spec.) BUG= 633028 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2322343003 Cr-Commit-Position: refs/heads/master@{#418387} [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.png [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-clipped-evenodd-twice-expected.png [add] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-clipped-shape-expected.html [add] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-clipped-shape.html [add] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-invalid-expected.html [add] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-invalid.html [add] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/LayoutTests/svg/hittest/clip-path-shape.html [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/css/CSSProperties.in [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/paint/ClipPathClipper.h [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/paint/SVGClipPainter.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/paint/SVGClipPainter.h [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/paint/SVGPaintContext.h [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/style/SVGComputedStyle.h [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/style/SVGComputedStyleDefs.cpp [modify] https://crrev.com/f4431bff28115f98687623c8ff242d2fc4e989ff/third_party/WebKit/Source/core/style/SVGComputedStyleDefs.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9e619beca68cf73772ae4c9f35a21f9bb13d7e65 commit 9e619beca68cf73772ae4c9f35a21f9bb13d7e65 Author: fs <fs@opera.com> Date: Thu Sep 15 10:23:52 2016 Unprefix -webkit-clip-path This CL renames '-webkit-clip-path' to 'clip-path', and makes the former an alias of the latter. For LayoutSVGRoot, clip-path is now applied only by the PaintLayer and not by SVGPaintContext. Intent-to-ship: https://groups.google.com/a/chromium.org/d/topic/blink-dev/FBE05hzCmPo BUG= 633028 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2312713002 Cr-Commit-Position: refs/heads/master@{#418827} [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-href-changes-expected.txt [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/LayoutTests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/LayoutTests/webexposed/css-properties-as-js-properties-expected.txt [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/animation/BasicShapePropertyFunctions.h [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/css/CSSProperties.in [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/frame/UseCounter.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/paint/SVGClipPainter.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/style/ComputedStyle.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/style/SVGComputedStyle.h [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/style/SVGComputedStyleDefs.cpp [modify] https://crrev.com/9e619beca68cf73772ae4c9f35a21f9bb13d7e65/third_party/WebKit/Source/core/style/SVGComputedStyleDefs.h
Comment 1 by meade@chromium.org
, Aug 1 2016