mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #8217 - wenderen:8211-remove-documentprogresstask, r=Manishearth
remove DocumentProgressTask enum for #8211 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8217) <!-- Reviewable:end -->
This commit is contained in:
commit
a6e2c138db
2 changed files with 7 additions and 18 deletions
|
@ -2039,21 +2039,14 @@ fn is_scheme_host_port_tuple(url: &Url) -> bool {
|
|||
url.host().is_some() && url.port_or_default().is_some()
|
||||
}
|
||||
|
||||
#[derive(HeapSizeOf)]
|
||||
pub enum DocumentProgressTask {
|
||||
Load,
|
||||
}
|
||||
|
||||
pub struct DocumentProgressHandler {
|
||||
addr: Trusted<Document>,
|
||||
task: DocumentProgressTask,
|
||||
addr: Trusted<Document>
|
||||
}
|
||||
|
||||
impl DocumentProgressHandler {
|
||||
pub fn new(addr: Trusted<Document>, task: DocumentProgressTask) -> DocumentProgressHandler {
|
||||
pub fn new(addr: Trusted<Document>) -> DocumentProgressHandler {
|
||||
DocumentProgressHandler {
|
||||
addr: addr,
|
||||
task: task,
|
||||
addr: addr
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2099,12 +2092,8 @@ impl Runnable for DocumentProgressHandler {
|
|||
let document = self.addr.root();
|
||||
let window = document.r().window();
|
||||
if window.is_alive() {
|
||||
match self.task {
|
||||
DocumentProgressTask::Load => {
|
||||
self.set_ready_state_complete();
|
||||
self.dispatch_load();
|
||||
}
|
||||
}
|
||||
self.set_ready_state_complete();
|
||||
self.dispatch_load();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue