LibWeb: Set the initial value of stroke-dashoffset to 0px

Previously, an initial value of 0 was being used.
This commit is contained in:
Tim Ledbetter 2025-08-16 15:52:58 +01:00 committed by Jelle Raaijmakers
parent 1a52fcd6ad
commit 4906afb2ae
5 changed files with 88 additions and 4 deletions

View file

@ -3109,7 +3109,7 @@
"affects-layout": false,
"animation-type": "by-computed-value",
"inherited": true,
"initial": "0",
"initial": "0px",
"valid-types": [
"length [0,∞]",
"number [0,∞]",

View file

@ -643,8 +643,8 @@ All supported properties and their default values exposed from CSSStylePropertie
'stroke': 'none'
'strokeDasharray': 'none'
'stroke-dasharray': 'none'
'strokeDashoffset': '0'
'stroke-dashoffset': '0'
'strokeDashoffset': '0px'
'stroke-dashoffset': '0px'
'strokeLinecap': 'butt'
'stroke-linecap': 'butt'
'strokeLinejoin': 'miter'

View file

@ -44,7 +44,7 @@ quotes: auto
shape-rendering: auto
stroke: none
stroke-dasharray: none
stroke-dashoffset: 0
stroke-dashoffset: 0px
stroke-linecap: butt
stroke-linejoin: miter
stroke-miterlimit: 4

View file

@ -0,0 +1,44 @@
Harness status: OK
Found 38 tests
30 Pass
8 Fail
Pass Property fill has initial value rgb(0, 0, 0)
Pass Property fill inherits
Pass Property fill-rule has initial value nonzero
Pass Property fill-rule inherits
Pass Property fill-opacity has initial value 1
Pass Property fill-opacity inherits
Pass Property stroke has initial value none
Pass Property stroke inherits
Pass Property stroke-opacity has initial value 1
Pass Property stroke-opacity inherits
Pass Property stroke-width has initial value 1px
Pass Property stroke-width inherits
Pass Property stroke-linecap has initial value butt
Pass Property stroke-linecap inherits
Pass Property stroke-linejoin has initial value miter
Pass Property stroke-linejoin inherits
Pass Property stroke-miterlimit has initial value 4
Pass Property stroke-miterlimit inherits
Pass Property stroke-dasharray has initial value none
Pass Property stroke-dasharray inherits
Pass Property stroke-dashoffset has initial value 0px
Pass Property stroke-dashoffset inherits
Fail Property marker-start has initial value none
Fail Property marker-start inherits
Fail Property marker-mid has initial value none
Fail Property marker-mid inherits
Fail Property marker-end has initial value none
Fail Property marker-end inherits
Fail Property paint-order has initial value normal
Fail Property paint-order inherits
Pass Property color-interpolation has initial value srgb
Pass Property color-interpolation inherits
Pass Property shape-rendering has initial value auto
Pass Property shape-rendering inherits
Pass Property text-rendering has initial value auto
Pass Property text-rendering inherits
Pass Property image-rendering has initial value auto
Pass Property image-rendering inherits

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:h="http://www.w3.org/1999/xhtml"
width="800px" height="8000px">
<title>Inheritance of SVG painting properties</title>
<metadata>
<h:link rel="help" href="https://svgwg.org/svg2-draft/painting.html"/>
<h:meta name="assert" content="properties inherit according to the spec."/>
<h:meta name="assert" content="properties have expected initial values."/>
</metadata>
<g id="container">
<g id="target"></g>
</g>
<h:script src="../../resources/testharness.js"/>
<h:script src="../../resources/testharnessreport.js"/>
<h:script src="../../css/support/inheritance-testcommon.js"/>
<script><![CDATA[
assert_inherited('fill', 'rgb(0, 0, 0)', 'rgb(42, 53, 64)');
assert_inherited('fill-rule', 'nonzero', 'evenodd');
assert_inherited('fill-opacity', '1', '0.5');
assert_inherited('stroke', 'none', 'rgb(42, 53, 64)');
assert_inherited('stroke-opacity', '1', '0.5');
assert_inherited('stroke-width', '1px', '3px');
assert_inherited('stroke-linecap', 'butt', 'round');
assert_inherited('stroke-linejoin', 'miter', 'round');
assert_inherited('stroke-miterlimit', '4', '12');
assert_inherited('stroke-dasharray', 'none', '1px, 2px, 3px');
assert_inherited('stroke-dashoffset', '0px', '50%');
assert_inherited('marker-start', 'none', 'url("https://example/com/diagram.svg#marker")');
assert_inherited('marker-mid', 'none', 'url("https://example/com/diagram.svg#marker")');
assert_inherited('marker-end', 'none', 'url("https://example/com/diagram.svg#marker")');
assert_inherited('paint-order', 'normal', 'markers stroke');
assert_inherited('color-interpolation', 'srgb', 'linearrgb');
assert_inherited('shape-rendering', 'auto', 'optimizespeed');
assert_inherited('text-rendering', 'auto', 'optimizespeed');
assert_inherited('image-rendering', 'auto', 'optimizequality');
]]></script>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB