Bug 77755

Summary: SVG parser does not interpret "form feed" as white space
Product: WebKit Reporter: Jacob Goldstein <jacobg>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, ap, cdumez, dglazkov, jacobg, rniwa, simon.fraser, webkit-bug-importer, WebkitBugTracker, webkit.review.bot, zalan, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch (test only)
webkit.review.bot: commit-queue-
Safari 15.5 differs from other browsers none

Jacob Goldstein
Reported 2012-02-03 11:19:15 PST
SVG parser does not interpret "form feed" (U+000C) as white space, CSS parser does.
Attachments
Patch (test only) (3.04 KB, patch)
2012-02-09 10:29 PST, Jacob Goldstein
webkit.review.bot: commit-queue-
Safari 15.5 differs from other browsers (403.77 KB, image/png)
2022-06-19 08:04 PDT, Ahmad Saleem
no flags
Jacob Goldstein
Comment 1 2012-02-03 11:19:50 PST
Placeholder issue for future work
Jacob Goldstein
Comment 2 2012-02-09 10:29:35 PST
Created attachment 126328 [details] Patch (test only) Patch with a test to verify if form feed is treated as whitespace when used in a transform translate function call. Not intended for review at this time
Alexey Proskuryakov
Comment 3 2012-02-09 10:54:29 PST
Comment on attachment 126328 [details] Patch (test only) Could you please post an explanation of why this should work? Different Web specifications have different whitespace definitions.
WebKit Review Bot
Comment 4 2012-02-09 11:04:19 PST
Comment on attachment 126328 [details] Patch (test only) Attachment 126328 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11487368 New failing tests: svg/transforms/svg-formFeed-as-whitespace.html
Jacob Goldstein
Comment 5 2012-02-09 11:54:22 PST
Failure expected, this is a placeholder for a potential future change
Jacob Goldstein
Comment 6 2012-02-09 12:10:13 PST
As of right now this does not work - I created this issue as a placeholder for future work such that a test could be attached. I apologize for not making this more explicit. The hope is that the SVG parser will be updated to interpret form feed as white space for consistency with CSS. (In reply to comment #3) > (From update of attachment 126328 [details]) > Could you please post an explanation of why this should work? Different Web specifications have different whitespace definitions.
Alexey Proskuryakov
Comment 7 2012-02-09 12:57:53 PST
Consistency with CSS is not a great goal in itself. The goals are: 1. security (incorrect whitespace handling is a frequent cause of security bugs); 2. correct rendering of existing web content; 3. compatibility with other browsers behavior; 4. correct implementation of relevant specs. #1 is roughly guaranteed by #3 and #4 when these agree.
Jacob Goldstein
Comment 8 2012-02-10 13:47:28 PST
In support of goal 4, the SVG WG has agreed to turn the SVG attributes into presentation attributes. As such, these attributes should support the CSS syntax for transformation functions (which would include treating form feed as whitespace). This change will be part of the CSS Transforms (merged version) and SVG 2.0. Please note, I do not plan to land this patch at this time. This was created as a placeholder for future work to capture an early test that can be used to support development. (In reply to comment #7) > Consistency with CSS is not a great goal in itself. The goals are: > 1. security (incorrect whitespace handling is a frequent cause of security bugs); > 2. correct rendering of existing web content; > 3. compatibility with other browsers behavior; > 4. correct implementation of relevant specs. > > #1 is roughly guaranteed by #3 and #4 when these agree.
Ahmad Saleem
Comment 9 2022-06-19 08:04:33 PDT
Created attachment 460336 [details] Safari 15.5 differs from other browsers I took the test case from the attached patch and changed into this JSFiddle: https://jsfiddle.net/v08r7qu1/show When I run it using Safari 15.5 on macOS 12.4, it differs from other browsers as seen in the screenshots. I think aligning with other browsers would be ideal here or web-specs. Thanks!
Radar WebKit Bug Importer
Comment 10 2022-06-19 08:05:06 PDT
Ahmad Saleem
Comment 11 2024-01-22 14:48:57 PST
*** Bug 267873 has been marked as a duplicate of this bug. ***
Ahmad Saleem
Comment 12 2024-01-22 14:52:05 PST
PR - https://github.com/WebKit/WebKit/pull/23059 Let's fix this now to align with other browsers.
EWS
Comment 13 2024-01-23 05:35:18 PST
Committed 273353@main (15c6cea827c0): <https://commits.webkit.org/273353@main> Reviewed commits have been landed. Closing PR #23059 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.