RESOLVED WORKSFORME 118045
Stylesheet rule.cssText for content property omits quotes
https://bugs.webkit.org/show_bug.cgi?id=118045
Summary Stylesheet rule.cssText for content property omits quotes
Ryosuke Niwa
Reported 2013-06-26 00:06:48 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/bcb65eaf9ef87cea28c6eb9a62890065a047e62c PropertyContent's value should be quoted when the value is string. Since PropertyContent's value is CSSValueList, added forceQuoteString parameter to customCssText of CSSValueList and CSSPrimitiveValue.
Attachments
Joseph Pecoraro
Comment 1 2015-07-24 00:17:20 PDT
There are actually a number of recent Blink commits here that would improve our output of not just `content` but other properties that may output serialized strings: https://chromium.googlesource.com/chromium/blink/+/98b9b9fdbecd8d860b2ca9c039adfc0491501c57 - allow some thigns to not be quoted https://chromium.googlesource.com/chromium/blink/+/81caa9b01afbef1a41de355f9385a60da48ac556 - fix `content` processing from comma separated to space separated https://chromium.googlesource.com/chromium/blink/+/3f2e47af2471ae3c3683079ffb5eb4b6f2e22df2 - fix `counter` strings. https://chromium.googlesource.com/chromium/blink/+/c127d37233c824ba96d9fdba5bf4db8f1311fd0d - fix `content` strings. This would be useful for the Web Inspector which wants to show "content" strings in the Computed Section of the inspector. Without similar changes, unquoted content computed values showing up in the Computed Section of the inspector are actually incorrect. See bug 147255.
Karl Dubost
Comment 2 2022-09-26 20:05:23 PDT
*** Bug 198536 has been marked as a duplicate of this bug. ***
Karl Dubost
Comment 3 2022-09-26 20:28:01 PDT
WIth data:text/html,<!doctype%20html><html><style></style></html> document.querySelector('style').sheet.rules[0] // undefined document.querySelector('style').sheet.insertRule('.test { content: "moo"; }') document.querySelector('style').sheet.rules[0].cssText // ".test { content: \"moo\"; }" Same results in Firefox, Chrome and Safari.
Note You need to log in before you can comment on or make changes to this bug.