haikuwebkit/LayoutTests/svg/gradients/spreadMethodDiagonal-expect...

23 lines
1.1 KiB
XML
Raw Permalink Normal View History

Add support for spreadMethod=reflect and repeat on SVG gradients (for CoreGraphics platforms) https://bugs.webkit.org/show_bug.cgi?id=5968 Source/WebCore: Add support for spreadMethod=repeat and reflect. Also, the opacity of a gradient is now the result of multiplying stop-opacity with the opacity of the color. Patch by Justin Michaud <justin_michaud@apple.com> on 2018-09-14 Reviewed by Simon Fraser. Tests: svg/gradients/spreadMethod-expected.svg svg/gradients/spreadMethod.svg svg/gradients/spreadMethodAlpha-expected.svg svg/gradients/spreadMethodAlpha.svg svg/gradients/spreadMethodClose0-expected-mismatch.svg svg/gradients/spreadMethodClose0.svg svg/gradients/spreadMethodClose1-expected-mismatch.svg svg/gradients/spreadMethodClose1.svg svg/gradients/spreadMethodClose2-expected.svg svg/gradients/spreadMethodClose2.svg svg/gradients/spreadMethodDiagonal-expected.svg svg/gradients/spreadMethodDiagonal.svg svg/gradients/spreadMethodDiagonal2-expected.svg svg/gradients/spreadMethodDiagonal2.svg svg/gradients/spreadMethodDuplicateStop-expected.svg svg/gradients/spreadMethodDuplicateStop.svg svg/gradients/spreadMethodReversed-expected.svg svg/gradients/spreadMethodReversed.svg svg/gradients/stopAlpha-expected.svg svg/gradients/stopAlpha.svg * platform/graphics/cg/GradientCG.cpp: (WebCore::Gradient::paint): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::stopColorIncludingOpacity const): LayoutTests: Add new svg tests for linear gradients with spreadMethod, and alpha values specified in both stop-opacity and color. Patch by Justin Michaud <justin_michaud@apple.com> on 2018-09-14 Reviewed by Simon Fraser. * platform/mac/svg/W3C-SVG-1.1/pservers-grad-10-b-expected.png: * svg/gradients/spreadMethod-expected.svg: Added. * svg/gradients/spreadMethod.svg: Added. * svg/gradients/spreadMethodAlpha-expected.svg: Added. * svg/gradients/spreadMethodAlpha.svg: Added. * svg/gradients/spreadMethodClose0-expected-mismatch.svg: Added. * svg/gradients/spreadMethodClose0.svg: Added. * svg/gradients/spreadMethodClose1-expected-mismatch.svg: Added. * svg/gradients/spreadMethodClose1.svg: Added. * svg/gradients/spreadMethodClose2-expected.svg: Added. * svg/gradients/spreadMethodClose2.svg: Added. * svg/gradients/spreadMethodDiagonal-expected.svg: Added. * svg/gradients/spreadMethodDiagonal.svg: Added. * svg/gradients/spreadMethodDiagonal2-expected.svg: Added. * svg/gradients/spreadMethodDiagonal2.svg: Added. * svg/gradients/spreadMethodDuplicateStop-expected.svg: Added. * svg/gradients/spreadMethodDuplicateStop.svg: Added. * svg/gradients/spreadMethodReversed-expected.svg: Added. * svg/gradients/spreadMethodReversed.svg: Added. * svg/gradients/stopAlpha-expected.svg: Added. * svg/gradients/stopAlpha.svg: Added. Canonical link: https://commits.webkit.org/204604@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-14 23:55:37 +00:00
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="10" y="35" width="460" height="13.75" fill="green"/>
<rect x="10" y="48.75" width="460" height="41.25" fill="blue"/>
<rect x="10" y="120" width="460" height="13.75" fill="green"/>
<rect x="10" y="133.75" width="460" height="27.5" fill="blue"/>
<rect x="10" y="161.25" width="460" height="13.75" fill="green"/>
<rect x="10" y="205" width="460" height="13.75" fill="green"/>
<rect x="10" y="218.75" width="460" height="13.75" fill="blue"/>
<rect x="10" y="232.5" width="460" height="13.75" fill="green"/>
<rect x="10" y="246.25" width="460" height="13.75" fill="blue"/>
<rect x="10" y="48" width="460" height="2" fill="grey"/>
<rect x="10" y="133" width="460" height="2" fill="grey"/>
<rect x="10" y="161" width="460" height="2" fill="grey"/>
<rect x="10" y="218" width="460" height="2" fill="grey"/>
<rect x="10" y="232" width="460" height="2" fill="grey"/>
<rect x="10" y="246" width="460" height="2" fill="grey"/>
</svg>