Bug 28869

Summary: CSS serialization of string value should be quoted
Product: WebKit Reporter: Yuta Kitamura <yutak>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, macpherson, mathias, rniwa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Test case
none
Updated test case none

Yuta Kitamura
Reported 2009-09-01 03:30:48 PDT
According to the CSS2.1 spec, when a string CSS value is serialized, it should be quoted by single quotation mark (') or double quotation mark ("). http://www.w3.org/TR/2009/CR-CSS2-20090423/syndata.html#value-def-string Currently WebKit just returns a bare word, which is an invalid CSS value that the WebKit's CSS parser does not parse. See attached test case for clarification.
Attachments
Test case (750 bytes, text/html)
2009-09-01 03:31 PDT, Yuta Kitamura
no flags
Updated test case (245 bytes, text/html)
2012-05-27 10:08 PDT, Mathias Bynens
no flags
Yuta Kitamura
Comment 1 2009-09-01 03:31:26 PDT
Created attachment 38855 [details] Test case
Yuta Kitamura
Comment 2 2009-09-01 03:34:39 PDT
We could preferably use double quotation mark instead of single quotation mark, as the CSSOM draft suggests. http://dev.w3.org/csswg/cssom/#parsing
Luke Macpherson
Comment 3 2012-02-29 19:35:39 PST
The provided test case passes on firefox, and the request seems reasonable, so marking bug as new (confirmed).
Alexey Proskuryakov
Comment 4 2012-03-01 14:45:00 PST
See also: bug 79448.
Mathias Bynens
Comment 5 2012-05-27 10:08:44 PDT
Created attachment 144236 [details] Updated test case This obsoletes the previous test case. As per http://dev.w3.org/csswg/cssom/#serialize-a-string, only " may be used to wrap string values, not '.
Ahmad Saleem
Comment 6 2022-07-26 14:03:56 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS using "Updated Test Case" and it shows as "PASS" and Safari do pass "serialization" tests on WPT (but not all), I was not able to find this on WPT: https://wpt.fyi/results/css?label=master&label=experimental&aligned&q=serialization Please ignore my comment, if it is not fixed. Thanks!
Ryosuke Niwa
Comment 7 2022-07-26 21:48:19 PDT
*** This bug has been marked as a duplicate of bug 73152 ***
Note You need to log in before you can comment on or make changes to this bug.