mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
style: Remove unused import_rule::PendingSheet
Differential Revision: https://phabricator.services.mozilla.com/D128823
This commit is contained in:
parent
efb5a8cfe5
commit
00d2cec626
1 changed files with 5 additions and 17 deletions
|
@ -18,15 +18,6 @@ use std::fmt::{self, Write};
|
||||||
use style_traits::{CssWriter, ToCss};
|
use style_traits::{CssWriter, ToCss};
|
||||||
use to_shmem::{self, SharedMemoryBuilder, ToShmem};
|
use to_shmem::{self, SharedMemoryBuilder, ToShmem};
|
||||||
|
|
||||||
/// With asynchronous stylesheet parsing, we can't synchronously create a
|
|
||||||
/// GeckoStyleSheet. So we use this placeholder instead.
|
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub struct PendingSheet {
|
|
||||||
origin: Origin,
|
|
||||||
quirks_mode: QuirksMode,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A sheet that is held from an import rule.
|
/// A sheet that is held from an import rule.
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -35,7 +26,7 @@ pub enum ImportSheet {
|
||||||
Sheet(crate::gecko::data::GeckoStyleSheet),
|
Sheet(crate::gecko::data::GeckoStyleSheet),
|
||||||
/// An @import created while parsing off-main-thread, whose Gecko sheet has
|
/// An @import created while parsing off-main-thread, whose Gecko sheet has
|
||||||
/// yet to be created and attached.
|
/// yet to be created and attached.
|
||||||
Pending(PendingSheet),
|
Pending,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
@ -46,11 +37,8 @@ impl ImportSheet {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a pending ImportSheet for a load that has not started yet.
|
/// Creates a pending ImportSheet for a load that has not started yet.
|
||||||
pub fn new_pending(origin: Origin, quirks_mode: QuirksMode) -> Self {
|
pub fn new_pending() -> Self {
|
||||||
ImportSheet::Pending(PendingSheet {
|
ImportSheet::Pending
|
||||||
origin,
|
|
||||||
quirks_mode,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a reference to the GeckoStyleSheet in this ImportSheet, if it
|
/// Returns a reference to the GeckoStyleSheet in this ImportSheet, if it
|
||||||
|
@ -64,7 +52,7 @@ impl ImportSheet {
|
||||||
}
|
}
|
||||||
Some(s)
|
Some(s)
|
||||||
},
|
},
|
||||||
ImportSheet::Pending(_) => None,
|
ImportSheet::Pending => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +87,7 @@ impl DeepCloneWithLock for ImportSheet {
|
||||||
};
|
};
|
||||||
ImportSheet::Sheet(unsafe { GeckoStyleSheet::from_addrefed(clone) })
|
ImportSheet::Sheet(unsafe { GeckoStyleSheet::from_addrefed(clone) })
|
||||||
},
|
},
|
||||||
ImportSheet::Pending(ref p) => ImportSheet::Pending(p.clone()),
|
ImportSheet::Pending => ImportSheet::Pending,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue