Bug 1879628 [wpt PR 44511] - Apply SVG paint-order to text-decorations, a=testonly

Automatic update from web-platform-tests
Apply SVG paint-order to text-decorations (#44511)

--

wpt-commits: 57308edfae0901589d855ef1ca7ee2b7cf1f4498
wpt-pr: 44511
This commit is contained in:
Ahmad Saleem 2024-02-15 16:46:22 +00:00 committed by moz-wptsync-bot
parent 27f6f09b19
commit 79bbdd1508
2 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,66 @@
<svg viewBox="-10 -10 280 220" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
text {
text-decoration: underline;
}
</style>
<defs>
<marker id="m" refX="5" refY="5" viewBox="0 0 10 10" overflow="visible">
<circle cx="5" cy="5" r="3" fill="black" stroke="black" fill-opacity="0.5"/>
</marker>
<svg id="poly" viewBox="-10 -10 420 420">
<text y="300" font-family="sans-serif" font-size="200" fill="blue" stroke="lime" stroke-width="10" stroke-opacity="0.5" style="marker: url(#m)">test</text>
</svg>
<svg id="poly-f-m-s" viewBox="-10 -10 420 420">
<text y="300" font-family="sans-serif" font-size="200" fill="blue" stroke-width="10" stroke-opacity="0.5" style="marker: url(#m); text-decoration: underline">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke="lime" stroke-width="10" stroke-opacity="0.5">test</text>
</svg>
<svg id="poly-m-f-s" viewBox="-10 -10 420 420">
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke-width="10" stroke-opacity="0.5" style="marker: url(#m)">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="blue" stroke-width="10" stroke-opacity="0.5">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke="lime" stroke-width="10" stroke-opacity="0.5">test</text>
</svg>
<svg id="poly-s-m-f" viewBox="-10 -10 420 420">
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke="lime" stroke-width="10" stroke-opacity="0.5">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke-width="10" stroke-opacity="0.5" style="marker: url(#m)">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="blue" stroke-width="10" stroke-opacity="0.5">test</text>
</svg>
<svg id="poly-s-f-m" viewBox="-10 -10 420 420">
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke="lime" stroke-width="10" stroke-opacity="0.5">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="blue" stroke-width="10" stroke-opacity="0.5">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke-width="10" stroke-opacity="0.5" style="marker: url(#m)">test</text>
</svg>
<svg id="poly-m-s-f" viewBox="-10 -10 420 420">
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke-width="10" stroke-opacity="0.5" style="marker: url(#m)">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="none" stroke="lime" stroke-width="10" stroke-opacity="0.5">test</text>
<text y="300" font-family="sans-serif" font-size="200" fill="blue" stroke-width="10" stroke-opacity="0.5">test</text>
</svg>
</defs>
<use xlink:href="#poly" width="50" height="50"/>
<use xlink:href="#poly" width="50" height="50" x="50"/>
<g transform="translate(0,50)">
<use xlink:href="#poly" width="50" height="50" x="0"/>
<use xlink:href="#poly" width="50" height="50" x="50"/>
<use xlink:href="#poly" width="50" height="50" x="100"/>
<use xlink:href="#poly-f-m-s" width="50" height="50" x="150"/>
<use xlink:href="#poly-f-m-s" width="50" height="50" x="200" />
</g>
<g transform="translate(0,100)">
<use xlink:href="#poly-s-f-m" width="50" height="50" x="0"/>
<use xlink:href="#poly-s-f-m" width="50" height="50" x="50"/>
<use xlink:href="#poly-s-f-m" width="50" height="50" x="100"/>
<use xlink:href="#poly-s-m-f" width="50" height="50" x="150"/>
<use xlink:href="#poly-s-m-f" width="50" height="50" x="200"/>
</g>
<g transform="translate(0,150)">
<use xlink:href="#poly-m-f-s" width="50" height="50" x="0"/>
<use xlink:href="#poly-m-s-f" width="50" height="50" x="50"/>
<use xlink:href="#poly-m-s-f" width="50" height="50" x="100"/>
<use xlink:href="#poly-m-f-s" width="50" height="50" x="150"/>
<use xlink:href="#poly-m-f-s" width="50" height="50" x="200"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,37 @@
<svg viewBox="-10 -10 280 220" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<marker id="m" refX="5" refY="5" viewBox="0 0 10 10" overflow="visible">
<circle cx="5" cy="5" r="3" fill="black" stroke="black" fill-opacity="0.5"/>
</marker>
<svg id="poly" viewBox="-10 -10 420 420">
<text y="300" font-family="sans-serif" font-size="200" fill="blue" stroke="lime" stroke-width="10" stroke-opacity="0.5" style="marker: url(#m); text-decoration: underline">test</text>
</svg>
</defs>
<use xlink:href="#poly" width="50" height="50"/>
<use xlink:href="#poly" style="paint-order: normal" width="50" height="50" x="50"/>
<g transform="translate(0,50)">
<use xlink:href="#poly" style="paint-order: fill" width="50" height="50" x="0"/>
<use xlink:href="#poly" style="paint-order: fill stroke" width="50" height="50" x="50"/>
<use xlink:href="#poly" style="paint-order: fill stroke markers" width="50" height="50" x="100"/>
<use xlink:href="#poly" style="paint-order: fill markers" width="50" height="50" x="150"/>
<use xlink:href="#poly" style="paint-order: fill markers stroke" width="50" height="50" x="200" />
</g>
<g transform="translate(0,100)">
<use xlink:href="#poly" style="paint-order: stroke" width="50" height="50" x="0"/>
<use xlink:href="#poly" style="paint-order: stroke fill" width="50" height="50" x="50"/>
<use xlink:href="#poly" style="paint-order: stroke fill markers" width="50" height="50" x="100"/>
<use xlink:href="#poly" style="paint-order: stroke markers" width="50" height="50" x="150"/>
<use xlink:href="#poly" style="paint-order: stroke markers fill" width="50" height="50" x="200"/>
</g>
<g transform="translate(0,150)">
<use xlink:href="#poly" style="paint-order: markers" width="50" height="50" x="0"/>
<use xlink:href="#poly" style="paint-order: markers stroke" width="50" height="50" x="50"/>
<use xlink:href="#poly" style="paint-order: markers stroke fill" width="50" height="50" x="100"/>
<use xlink:href="#poly" style="paint-order: markers fill" width="50" height="50" x="150"/>
<use xlink:href="#poly" style="paint-order: markers fill stroke" width="50" height="50" x="200"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB