Remove unused code from script* crates

This commit is contained in:
est31 2019-06-02 07:10:40 +02:00
parent 8dc7a25893
commit 8b6ed3d182
13 changed files with 2 additions and 133 deletions

View file

@ -25,19 +25,6 @@ pub enum LoadType {
Media,
}
impl LoadType {
fn url(&self) -> Option<&ServoUrl> {
match *self {
LoadType::Image(ref url) |
LoadType::Script(ref url) |
LoadType::Subframe(ref url) |
LoadType::Stylesheet(ref url) |
LoadType::PageSource(ref url) => Some(url),
LoadType::Media => None,
}
}
}
/// Canary value ensuring that manually added blocking loads (ie. ones that weren't
/// created via DocumentLoader::fetch_async) are always removed by the time
/// that the owner is destroyed.
@ -67,11 +54,6 @@ impl LoadBlocker {
}
*blocker = None;
}
/// Return the url associated with this load.
pub fn url(&self) -> Option<&ServoUrl> {
self.load.as_ref().and_then(LoadType::url)
}
}
impl Drop for LoadBlocker {