Bug 77753 - SVG parser allows white spaces between function name and opening brace
Summary: SVG parser allows white spaces between function name and opening brace
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jacob Goldstein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 10:50 PST by Jacob Goldstein
Modified: 2022-10-28 04:52 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.04 KB, patch)
2012-02-03 13:35 PST, Jacob Goldstein
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Goldstein 2012-02-03 10:50:18 PST
The SVG parser allows white spaces between function name and first opening brace, CSS doesn't.
Comment 1 Jacob Goldstein 2012-02-03 10:50:34 PST
SVG parser should change the behavior with the risk of losing a bit of its backward compatibility. WebKit had just one failing test after experimenting with this rule.
Comment 2 Jacob Goldstein 2012-02-03 10:51:28 PST
Adding this bug as a placeholder for future work and to attach tests
Comment 3 Jacob Goldstein 2012-02-03 13:35:38 PST
Created attachment 125401 [details]
Patch

Attaching patch that contains a test for this issue to be used in the future
Not currently intended for review and/or commit
Comment 4 Jacob Goldstein 2012-02-03 13:37:23 PST
NOTE:
- This test currently fails.  Will pass when change is made such that the SVG parser does NOT allow a space after function name

- May need to update location of test in WebKit directory structure
Comment 5 Ahmad Saleem 2022-10-28 04:51:31 PDT
I took the testcase from attached patch and changed it into JSFiddle:

Link - https://jsfiddle.net/6m4yc7n5/show

All browsers (Safari 16.1, Safari Technology Preview 156, Chrome Canary 109 and Firefox Nightly 108) show "red" rect only and does not show any "green" rect.

Do we need to do anything more or now all browsers agree with each other? Thanks!