skia2/experimental/svg/model
Tyler Denniston df1b014005 [svg] Reapply currentColor to fill/stroke
For the scenario in color-prop-05-t:
  <g fill="currentColor" color="lime">
    <rect x="120" y="60" width="150" height="150" color="red"/>
  </g>
(rectangle should be rendered red according to CSS spec)

The sequence of events is:
  <g>
    - fInherited.fColor = lime
    - fInherited.fFill = kCurrentColor
    - commit fFill to paint (paint.setColor(lime))
    <rect>
      - fInherited.fColor = red
      - BUG: fFill not re-committed to paint because it is 'inherit'

This CL fixes the bug by recommitting to the fill and stroke paint
if the fill/stroke attribute values are currentColor.

Change-Id: Icecd498eb0122513e0241740536e239eed335ef3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284377
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-20 16:39:31 +00:00
..
SkPEG.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGAttribute.cpp [SVG] Implement currentColor for fill and stroke 2020-04-09 18:48:16 +00:00
SkSVGAttribute.h [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00
SkSVGAttributeParser.cpp [svg] Fix multiple transforms specified 2020-04-16 13:39:30 +00:00
SkSVGAttributeParser.h [svg] Fix multiple transforms specified 2020-04-16 13:39:30 +00:00
SkSVGCircle.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGCircle.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGClipPath.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGClipPath.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGContainer.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGContainer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGDefs.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGDOM.cpp [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00
SkSVGDOM.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGEllipse.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGEllipse.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGG.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGGradient.cpp [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00
SkSVGGradient.h [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00
SkSVGHiddenContainer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGIDMapper.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGLine.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGLine.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGLinearGradient.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGLinearGradient.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGNode.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGNode.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGPath.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGPath.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGPattern.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGPattern.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGPoly.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGPoly.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGRadialGradient.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGRadialGradient.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGRect.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGRect.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGRenderContext.cpp [svg] Reapply currentColor to fill/stroke 2020-04-20 16:39:31 +00:00
SkSVGRenderContext.h [svg] Reapply currentColor to fill/stroke 2020-04-20 16:39:31 +00:00
SkSVGShape.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSVGShape.h Revert "Revert "switch to new filltype for SkPath"" 2019-11-26 17:43:14 +00:00
SkSVGStop.cpp [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00
SkSVGStop.h [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00
SkSVGSVG.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGSVG.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGText.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGText.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGTransformableNode.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGTransformableNode.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGTypes.h [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00
SkSVGUse.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGUse.h Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGValue.cpp Revert "[SVG] Replace custom attribute value wrappers with std::variant" 2020-04-10 14:14:22 +00:00
SkSVGValue.h [svg] Implement currentColor for gradient stops 2020-04-14 16:20:44 +00:00