WebKit incorrectly accepts percentage for number values due to the use of value.toFloat()
https://bugs.webkit.org/show_bug.cgi?id=94352
Summary WebKit incorrectly accepts percentage for number values due to the use of val...
Dirk Schulze
Reported 2012-08-17 09:43:04 PDT
Created attachment 159143 [details] feOffset, where dx/dy have 50% as value For parsing <number> values in SVG, we use toFloat(). Sadly this function is not very restrictive. E.g. "50%" gets parsed as 50. Which shouldn't be the case.
Attachments
feOffset, where dx/dy have 50% as value (402 bytes, image/svg+xml)
2012-08-17 09:43 PDT, Dirk Schulze
no flags
Safari 15.5 differs from other browsers (558.85 KB, image/png)
2022-07-18 10:28 PDT, Ahmad Saleem
no flags
Ahmad Saleem
Comment 1 2022-07-18 10:28:36 PDT
Created attachment 460981 [details] Safari 15.5 differs from other browsers I am able to reproduce this bug in Safari 15.5 on macOS 12.4 based on attached test case. As can be seen in the attached screenshot, Safari does not show full green square but has 'Red' in it while all other browsers show just "Green". If I am testing incorrectly and Safari behavior is correct then ignore my comment or test accordingly. Thanks!
Radar WebKit Bug Importer
Comment 2 2022-07-18 11:52:26 PDT
Note You need to log in before you can comment on or make changes to this bug.