[Webkit-unassigned] [Bug 261656] [SVG2] Allow leading and trailing whitespace in svg attributes using <integer>, <angle>, <number>, <length> and <percentage>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 20 02:30:28 PDT 2023


Karl Dubost <karlcow at apple.com> changed:

           What    |Removed                     |Added
                 CC|                            |karlcow at apple.com

--- Comment #1 from Karl Dubost <karlcow at apple.com> ---
The test:

data:text/html,<svg id="testcontainer"><defs><marker></marker><stop></stop><filter><feTurbulence></feTurbulence></filter></defs></svg>

document.getElementsByTagName('stop')[0].setAttribute('offset', '-47a')

Then they try to 

which returns '-47a' in all browsers.

Where it differs is when requesting:

it returns 

-47 in Safari 
0   in Firefox
0   in Chrome

It seems Safari is normalizing the value by ignoring the trailing garbage.
While the others are saying bad values let's reset it.

In fact
document.getElementsByTagName('stop')[0].offset returns on Safari.

{animVal: -47, baseVal: -47}

the initial value is indeed 0.
The values

A number usually ranging from 0 to 1.
A percentage usually ranging from 0% to 100%.

I don't remember where are the processing rules for the invalid values in CSS. 

But baseVal and animVal are defined in

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230920/3e1cf317/attachment.htm>

More information about the webkit-unassigned mailing list