Remove Document::add_blocking_load.

This commit is contained in:
Ms2ger 2016-10-04 13:11:03 +02:00
parent e4c0007d04
commit aa48ec7628
2 changed files with 2 additions and 8 deletions

View file

@ -63,7 +63,7 @@ pub struct LoadBlocker {
impl LoadBlocker { impl LoadBlocker {
/// Mark the document's load event as blocked on this new load. /// Mark the document's load event as blocked on this new load.
pub fn new(doc: &Document, load: LoadType) -> LoadBlocker { pub fn new(doc: &Document, load: LoadType) -> LoadBlocker {
doc.add_blocking_load(load.clone()); doc.mut_loader().add_blocking_load(load.clone());
LoadBlocker { LoadBlocker {
doc: JS::from_ref(doc), doc: JS::from_ref(doc),
load: Some(load), load: Some(load),
@ -119,7 +119,7 @@ impl DocumentLoader {
} }
/// Add a load to the list of blocking loads. /// Add a load to the list of blocking loads.
pub fn add_blocking_load(&mut self, load: LoadType) { fn add_blocking_load(&mut self, load: LoadType) {
self.blocking_loads.push(load); self.blocking_loads.push(load);
} }

View file

@ -1423,12 +1423,6 @@ impl Document {
ReflowReason::RequestAnimationFrame); ReflowReason::RequestAnimationFrame);
} }
/// Add a load to the list of loads blocking this document's load.
pub fn add_blocking_load(&self, load: LoadType) {
let mut loader = self.loader.borrow_mut();
loader.add_blocking_load(load)
}
pub fn load_async(&self, load: LoadType, listener: AsyncResponseTarget, referrer_policy: Option<ReferrerPolicy>) { pub fn load_async(&self, load: LoadType, listener: AsyncResponseTarget, referrer_policy: Option<ReferrerPolicy>) {
let mut loader = self.loader.borrow_mut(); let mut loader = self.loader.borrow_mut();
loader.load_async(load, listener, self, referrer_policy); loader.load_async(load, listener, self, referrer_policy);