diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 4b3f6934f90..0d4bc4f8a09 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -21,7 +21,7 @@ use values::specified::url::SpecifiedUrl; /// A source for a font-face rule. #[derive(Clone, Debug, PartialEq, Eq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))] +#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] pub enum Source { /// A `url()` source. Url(UrlSource), @@ -54,7 +54,7 @@ impl OneOrMoreCommaSeparated for Source {} /// /// https://drafts.csswg.org/css-fonts/#src-desc #[derive(Clone, Debug, PartialEq, Eq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))] +#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] pub struct UrlSource { /// The specified url. pub url: SpecifiedUrl, @@ -184,7 +184,6 @@ macro_rules! font_face_descriptors { /// /// https://drafts.csswg.org/css-fonts/#font-face-rule #[derive(Debug, PartialEq, Eq)] - #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct FontFaceRule { $( #[$m_doc] diff --git a/components/style/keyframes.rs b/components/style/keyframes.rs index 40d8ef60b09..048d9904043 100644 --- a/components/style/keyframes.rs +++ b/components/style/keyframes.rs @@ -70,8 +70,7 @@ impl KeyframePercentage { /// A keyframes selector is a list of percentages or from/to symbols, which are /// converted at parse time to percentages. -#[derive(Debug, Clone, PartialEq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] +#[derive(Debug, PartialEq)] pub struct KeyframeSelector(Vec); impl KeyframeSelector { /// Return the list of percentages this selector contains. @@ -93,8 +92,7 @@ impl KeyframeSelector { } /// A keyframe. -#[derive(Debug, Clone)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] +#[derive(Debug)] pub struct Keyframe { /// The selector this keyframe was specified from. pub selector: KeyframeSelector, @@ -103,7 +101,6 @@ pub struct Keyframe { /// /// Note that `!important` rules in keyframes don't apply, but we keep this /// `Arc` just for convenience. - #[cfg_attr(feature = "servo", ignore_heap_size_of = "Arc")] pub block: Arc>, } @@ -148,7 +145,7 @@ impl Keyframe { /// declarations to apply. /// /// TODO: Find a better name for this? -#[derive(Debug, Clone)] +#[derive(Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum KeyframesStepValue { /// A step formed by a declaration block specified by the CSS. @@ -163,7 +160,7 @@ pub enum KeyframesStepValue { } /// A single step from a keyframe animation. -#[derive(Debug, Clone)] +#[derive(Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct KeyframesStep { /// The percentage of the animation duration when this step starts. @@ -235,7 +232,7 @@ impl KeyframesStep { /// of keyframes, in order. /// /// It only takes into account animable properties. -#[derive(Debug, Clone)] +#[derive(Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct KeyframesAnimation { /// The difference steps of the animation. diff --git a/components/style/properties/declaration_block.rs b/components/style/properties/declaration_block.rs index b21fa79e3ec..243bc7cbc5c 100644 --- a/components/style/properties/declaration_block.rs +++ b/components/style/properties/declaration_block.rs @@ -49,12 +49,10 @@ impl Default for Importance { /// Overridden declarations are skipped. #[derive(Debug, PartialEq, Clone)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct PropertyDeclarationBlock { /// The group of declarations, along with their importance. /// /// Only deduplicated declarations appear here. - #[cfg_attr(feature = "servo", ignore_heap_size_of = "#7038")] pub declarations: Vec<(PropertyDeclaration, Importance)>, /// The number of entries in `self.declaration` with `Importance::Important` diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 642b56ff851..9b2c94798d5 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -563,7 +563,6 @@ impl ShorthandId { /// Servo's representation of a declared value for a given `T`, which is the /// declared value for that property. #[derive(Clone, PartialEq, Eq, Debug)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum DeclaredValue { /// A known specified value from the stylesheet. Value(T), @@ -574,8 +573,7 @@ pub enum DeclaredValue { } /// An unparsed property value that contains `var()` functions. -#[derive(Clone, PartialEq, Eq, Debug)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] +#[derive(PartialEq, Eq, Debug)] pub struct UnparsedValue { /// The css serialization for this value. css: String, @@ -854,7 +852,6 @@ impl ParsedDeclaration { /// Servo's representation for a property declaration. #[derive(PartialEq, Clone)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum PropertyDeclaration { % for property in data.longhands: /// ${property.name} diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 6ee7b6843a0..758d81125b2 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -52,7 +52,6 @@ pub enum Origin { /// A set of namespaces applying to a given stylesheet. #[derive(Default, Debug)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[allow(missing_docs)] pub struct Namespaces { pub default: Option, @@ -389,7 +388,6 @@ impl ToCss for CssRule { } #[derive(Debug, PartialEq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[allow(missing_docs)] pub struct NamespaceRule { /// `None` for the default Namespace