mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Remove some unused impls.
This commit is contained in:
parent
7444be686c
commit
8160490272
5 changed files with 8 additions and 19 deletions
|
@ -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]
|
||||
|
|
|
@ -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<KeyframePercentage>);
|
||||
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<RwLock<PropertyDeclarationBlock>>,
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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<T> {
|
||||
/// A known specified value from the stylesheet.
|
||||
Value(T),
|
||||
|
@ -574,8 +573,7 @@ pub enum DeclaredValue<T> {
|
|||
}
|
||||
|
||||
/// 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}
|
||||
|
|
|
@ -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<Namespace>,
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue