diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 2f6d3766ab9..cbaa62b7fc4 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -1481,7 +1481,7 @@ impl PropertyDeclaration { Ok(keyword) => DeclaredValueOwned::CSSWideKeyword(keyword), Err(_) => match ::custom_properties::SpecifiedValue::parse(context, input) { Ok(value) => DeclaredValueOwned::Value(value), - Err(_) => return Err(PropertyDeclarationParseError::InvalidValue(name.to_string())), + Err(_) => return Err(PropertyDeclarationParseError::InvalidValue(name.to_string().into())), } }; declarations.push(PropertyDeclaration::Custom(name, value)); diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs index 04e19f2c12d..b0b299ec64f 100644 --- a/components/style_traits/lib.rs +++ b/components/style_traits/lib.rs @@ -124,7 +124,7 @@ pub enum PropertyDeclarationParseError<'i> { /// The property declaration was for a disabled experimental property. ExperimentalProperty, /// The property declaration contained an invalid value. - InvalidValue(String), + InvalidValue(CompactCowStr<'i>), /// The declaration contained an animation property, and we were parsing /// this as a keyframe block (so that property should be ignored). /// diff --git a/ports/geckolib/error_reporter.rs b/ports/geckolib/error_reporter.rs index fcb2bbe1069..a8abdb0347f 100644 --- a/ports/geckolib/error_reporter.rs +++ b/ports/geckolib/error_reporter.rs @@ -224,7 +224,7 @@ impl<'a> ErrorHelpers<'a> for ContextualParseError<'a> { (_, CssParseError::Custom(SelectorParseError::Custom( StyleParseError::PropertyDeclaration( PropertyDeclarationParseError::InvalidValue(property))))) => - ErrorString::Snippet(property.into()), + ErrorString::Snippet(property), (_, CssParseError::Custom(SelectorParseError::UnexpectedIdent(ident))) => ErrorString::Ident(ident),