style: Cherry-pick various servo changes

All formatting and not-part-of-the-gecko-build changes.

Differential Revision: https://phabricator.services.mozilla.com/D106634
This commit is contained in:
Oriol Brufau 2023-05-16 08:02:28 +02:00
parent c5d31c3ab6
commit efea71ff9b

View file

@ -17,7 +17,7 @@ use crate::values::specified::Attr;
use crate::values::specified::Integer;
use crate::values::CustomIdent;
use cssparser::{Parser, Token};
#[cfg(feature = "servo-layout-2013")]
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
use selectors::parser::SelectorParseErrorKind;
use style_traits::{ParseError, StyleParseErrorKind};
@ -171,6 +171,7 @@ impl Parse for Content {
Ok(generics::ContentItem::Attr(Attr::parse_function(context, input)?))
}),
_ => {
use style_traits::StyleParseErrorKind;
let name = name.clone();
return Err(input.new_custom_error(
StyleParseErrorKind::UnexpectedFunction(name),