Bug 28869 - CSS serialization of string value should be quoted
Summary: CSS serialization of string value should be quoted
Status: RESOLVED DUPLICATE of bug 73152
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-01 03:30 PDT by Yuta Kitamura
Modified: 2022-07-26 21:48 PDT (History)
7 users (show)

See Also:


Attachments
Test case (750 bytes, text/html)
2009-09-01 03:31 PDT, Yuta Kitamura
no flags Details
Updated test case (245 bytes, text/html)
2012-05-27 10:08 PDT, Mathias Bynens
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta Kitamura 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.
Comment 1 Yuta Kitamura 2009-09-01 03:31:26 PDT
Created attachment 38855 [details]
Test case
Comment 2 Yuta Kitamura 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
Comment 3 Luke Macpherson 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).
Comment 4 Alexey Proskuryakov 2012-03-01 14:45:00 PST
See also: bug 79448.
Comment 5 Mathias Bynens 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 '.
Comment 6 Ahmad Saleem 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!
Comment 7 Ryosuke Niwa 2022-07-26 21:48:19 PDT

*** This bug has been marked as a duplicate of bug 73152 ***