Backed out changeset f4a2f296a2ea (bug 1854809) for causing build bustages. CLOSED TREE

This commit is contained in:
Butkovits Atila 2023-09-24 01:07:55 +03:00
parent ec54a400d5
commit 699a770452
4 changed files with 9 additions and 7 deletions

View File

@ -1 +0,0 @@
- `parser.rs` no longer wraps values in quotes (`"..."`) but expects their `to_css` impl to already wrap it ([Gecko Bug 1854809](https://bugzilla.mozilla.org/show_bug.cgi?id=1854809))

View File

@ -2291,7 +2291,9 @@ impl<Impl: SelectorImpl> ToCss for Component<Impl> {
dest.write_char('[')?;
local_name.to_css(dest)?;
operator.to_css(dest)?;
dest.write_char('"')?;
value.to_css(dest)?;
dest.write_char('"')?;
match case_sensitivity {
ParsedCaseSensitivity::CaseSensitive |
ParsedCaseSensitivity::AsciiCaseInsensitiveIfInHtmlElementInHtmlDocument => {},
@ -2395,7 +2397,9 @@ impl<Impl: SelectorImpl> ToCss for AttrSelectorWithOptionalNamespace<Impl> {
ref value,
} => {
operator.to_css(dest)?;
dest.write_char('"')?;
value.to_css(dest)?;
dest.write_char('"')?;
match case_sensitivity {
ParsedCaseSensitivity::CaseSensitive |
ParsedCaseSensitivity::AsciiCaseInsensitiveIfInHtmlElementInHtmlDocument => {},

View File

@ -177,18 +177,15 @@ impl cssparser::ToCss for AtomString {
where
W: Write,
{
// Wrap in quotes to form a string literal
dest.write_char('"')?;
#[cfg(feature = "servo")]
{
cssparser::CssStringWriter::new(dest).write_str(self.as_ref())?;
cssparser::CssStringWriter::new(dest).write_str(self.as_ref())
}
#[cfg(feature = "gecko")]
{
self.0
.with_str(|s| cssparser::CssStringWriter::new(dest).write_str(s))?;
.with_str(|s| cssparser::CssStringWriter::new(dest).write_str(s))
}
dest.write_char('"')
}
}

View File

@ -966,8 +966,10 @@ impl ToCss for Attr {
serialize_atom_identifier(&self.attribute, dest)?;
if !self.fallback.is_empty() {
dest.write_str(", ")?;
// Fallback will always be a string value for now, so always wrap in "..."
dest.write_str(", \"")?;
self.fallback.to_css(dest)?;
dest.write_char('"')?;
}
dest.write_char(')')