New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the SVG parser interpret form feed
as whitespace
#23059
Make the SVG parser interpret form feed
as whitespace
#23059
Conversation
EWS run on previous version of this PR (hash 1a812a2) |
As per GitHub issue - the tests are still missing but it is just preparatory patch and not do all changes, which were done in Blink patch, I think we can do other changes one by one to align with other browsers. It was just the quick one which I could carve-out. So I did it. |
It was also clarified in: https://lists.w3.org/Archives/Public/public-svg-wg/2014AprJun/0068.html |
1a812a2
to
70e0d27
Compare
EWS run on previous version of this PR (hash 70e0d27) |
form feed
as whitespace
70e0d27
to
f8a22d0
Compare
EWS run on previous version of this PR (hash f8a22d0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally there would be web platform tests coverage for this as well. And maybe include coverage that U+000B is not whitespace.
Overall though this seems like a good change and helps with cleaning up our whitespace handling: https://bugs.webkit.org/show_bug.cgi?id=255467.
Thanks!
I tried this - https://jsfiddle.net/74j5pftn/3/, all browsers are same in dealing with 'U+000B' and confirms that it is not whitespace. As for WPT test coverage, I think based on GitHub link posted above, it mentions that the tests are yet there. |
f8a22d0
to
384b9bf
Compare
EWS run on current version of this PR (hash 384b9bf) |
@annevk - I added another test. Is it good to go now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry, I should have been clearer. "Ideal" wasn't meant to be a merge blocker. Thanks for adding the additional coverage.
https://bugs.webkit.org/show_bug.cgi?id=77755 rdar://problem/95488677 Reviewed by Anne van Kesteren. This patch is to align WebKit with Chromium / Blink, Gecko / Firefox and Web Specification [1]: [1] https://lists.w3.org/Archives/Public/public-svg-wg/2014AprJun/0068.html This patch uses 'isASCIIWhite' across SVG Parser and code base to enable it to handle 'form feed'. It is inspired by following change in Blink, which enables 'leading' and 'trailing' whitespace in SVG Attributes [2]: [2] https://src.chromium.org/viewvc/blink?view=revision&revision=175785 Credits to Jacob Goldstein <jacobg@adobe.com> for 'test case'. * Source/WebCore/svg/SVGParserUtilities.cpp: (parseGlyphName): * Source/WebCore/svg/SVGParserUtilities.h: (isSVGSpace): Deleted (isSVGSpaceOrComma): Updated (skipOptionalSVGSpaces): (skipOptionalSVGSpacesOrDelimiter): Both templates * Source/WebCore/svg/SVGStringList.cpp: (SVGStringList::parse): * LayoutTests/svg/transforms/svg-formFeed-as-whitespace.html: Add Test Case * LayoutTests/svg/transforms/svg-formFeed-as-whitespace-expected.html: Add Test Case Expectation * LayoutTests/svg/transforms/svg-line-tabulation-as-not-whitespace.html: Add Test Case * LayoutTests/svg/transforms/svg-line-tabulation-as-not-whitespace-expected.html: Add Test Case Expectation Canonical link: https://commits.webkit.org/273353@main
384b9bf
to
15c6cea
Compare
Committed 273353@main (15c6cea): https://commits.webkit.org/273353@main Reviewed commits have been landed. Closing PR #23059 and removing active labels. |
15c6cea
384b9bf
π§ͺ wpe-wk2π§ͺ gtk-wk2