mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
remove DocumentProgressTask enum
This commit is contained in:
parent
b8f196f858
commit
6b42a7366a
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