mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Derive ToCss for DeclaredValueOwned rather than DeclaredValue
This commit is contained in:
parent
247bcbbbd6
commit
75b05c518d
1 changed files with 3 additions and 3 deletions
|
@ -1308,7 +1308,7 @@ impl ShorthandId {
|
||||||
|
|
||||||
/// Servo's representation of a declared value for a given `T`, which is the
|
/// Servo's representation of a declared value for a given `T`, which is the
|
||||||
/// declared value for that property.
|
/// declared value for that property.
|
||||||
#[derive(Clone, Debug, Eq, PartialEq, ToCss)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
pub enum DeclaredValue<'a, T: 'a> {
|
pub enum DeclaredValue<'a, T: 'a> {
|
||||||
/// A known specified value from the stylesheet.
|
/// A known specified value from the stylesheet.
|
||||||
Value(&'a T),
|
Value(&'a T),
|
||||||
|
@ -1323,7 +1323,7 @@ pub enum DeclaredValue<'a, T: 'a> {
|
||||||
/// extra discriminant word) and synthesize dependent DeclaredValues for
|
/// extra discriminant word) and synthesize dependent DeclaredValues for
|
||||||
/// PropertyDeclaration instances as needed.
|
/// PropertyDeclaration instances as needed.
|
||||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq, ToCss)]
|
||||||
pub enum DeclaredValueOwned<T> {
|
pub enum DeclaredValueOwned<T> {
|
||||||
/// A known specified value from the stylesheet.
|
/// A known specified value from the stylesheet.
|
||||||
Value(T),
|
Value(T),
|
||||||
|
@ -1756,7 +1756,7 @@ impl ToCss for CustomDeclaration {
|
||||||
where
|
where
|
||||||
W: fmt::Write,
|
W: fmt::Write,
|
||||||
{
|
{
|
||||||
self.value.borrow().to_css(dest)
|
self.value.to_css(dest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue