style: Add derived ToShmem implementations.

Differential Revision: https://phabricator.services.mozilla.com/D17197
This commit is contained in:
Cameron McCormack 2019-03-30 00:16:25 +00:00 committed by Emilio Cobos Álvarez
parent 128c6ae94a
commit 40248ae5fd
93 changed files with 649 additions and 267 deletions

View file

@ -26,7 +26,7 @@ use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
/// An [`@supports`][supports] rule.
///
/// [supports]: https://drafts.csswg.org/css-conditional-3/#at-supports
#[derive(Debug)]
#[derive(Debug, ToShmem)]
pub struct SupportsRule {
/// The parsed condition
pub condition: SupportsCondition,
@ -76,7 +76,7 @@ impl DeepCloneWithLock for SupportsRule {
/// An @supports condition
///
/// <https://drafts.csswg.org/css-conditional-3/#at-supports>
#[derive(Clone, Debug)]
#[derive(Clone, Debug, ToShmem)]
pub enum SupportsCondition {
/// `not (condition)`
Not(Box<SupportsCondition>),
@ -305,7 +305,7 @@ impl ToCss for SupportsCondition {
}
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, ToShmem)]
/// A possibly-invalid CSS selector.
pub struct RawSelector(pub String);
@ -367,7 +367,7 @@ impl RawSelector {
}
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, ToShmem)]
/// A possibly-invalid property declaration
pub struct Declaration(pub String);