haikuwebkit/LayoutTests/svg/custom/outline-stacking.svg

8 lines
404 B
XML
Raw Permalink Normal View History

SVG outline property is broken and inefficient https://bugs.webkit.org/show_bug.cgi?id=113666 Reviewed by Dean Jackson. Source/WebCore: "[SVG2] css 'outline' property should apply to svg elements The 'outline' property was only partially working in SVG before this patch, this makes it work on text and text content child elements too. This makes SVG render the outlines as part of the foreground paint phase. Partly based on Florin Malita's webkit patch https://bugs.webkit.org/show_bug.cgi?id=113666#c12." Tests: svg/custom/outline-stacking-expected.svg svg/custom/outline-stacking.svg svg/custom/rgba-color-outline.svg svg/text/text-outline-expected.svg svg/text/text-outline-rgba.html svg/text/text-outline.html svg/text/textpath-outline-expected.svg svg/text/textpath-outline.svg svg/text/tspan-multiple-outline.svg svg/text/tspan-outline-2-expected.svg svg/text/tspan-outline-2.svg svg/text/tspan-outline-expected.svg svg/text/tspan-outline.html * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): Draw outline in forground paint phase. * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): Draw outline in forground paint phase. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): Pass paint offset. * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::paint): Draw outline in forground paint phase. * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::paint): Draw outline in forground paint phase. * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::paint): Pass paint offset. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paint): Draw outline in forground paint phase. * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::paint): Pass paint offset. LayoutTests: Test stacking for outline properties. 'outline' should not draw above overlapping content anymore. Test outline drawing for text elements. * svg/custom/outline-stacking-expected.svg: Added. * svg/custom/outline-stacking.svg: Added. * svg/custom/rgba-color-outline-expected.html: Added. * svg/custom/rgba-color-outline.svg: Added. * svg/text/text-outline-expected.svg: Added. * svg/text/text-outline-rgba-expected.html: Added. * svg/text/text-outline-rgba.html: Added. * svg/text/text-outline.html: Added. * svg/text/textpath-outline-expected.svg: Added. * svg/text/textpath-outline.svg: Added. * svg/text/tspan-multiple-outline-expected.html: Added. * svg/text/tspan-multiple-outline.svg: Added. * svg/text/tspan-outline-2-expected.svg: Added. * svg/text/tspan-outline-2.svg: Added. * svg/text/tspan-outline-expected.svg: Added. * svg/text/tspan-outline.html: Added. Canonical link: https://commits.webkit.org/150881@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-12 21:18:24 +00:00
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!-- Test for https://bugs.webkit.org/show_bug.cgi?id=113666
The element foreground and outline should be drawn atomically. -->
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg">
<rect x="50" y="50" width="1" height="1" style="outline: 40px solid red;"/>
<rect x="0" y="0" width="100" height="100" fill="green"/>
</svg>