mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Make stylesheets block page load.
This commit is contained in:
parent
7f0706ed42
commit
32a89c9455
10 changed files with 106 additions and 30 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use document_loader::{DocumentLoader, NotifierData};
|
||||
use document_loader::{LoadType, DocumentLoader, NotifierData};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
|
||||
use dom::bindings::codegen::InheritTypes::{ElementCast, EventTargetCast, HTMLIFrameElementCast, NodeCast, EventCast};
|
||||
|
@ -731,6 +731,8 @@ impl ScriptTask {
|
|||
self.handle_webdriver_msg(pipeline_id, msg),
|
||||
ConstellationControlMsg::TickAllAnimations(pipeline_id) =>
|
||||
self.handle_tick_all_animations(pipeline_id),
|
||||
ConstellationControlMsg::StylesheetLoadComplete(id, url) =>
|
||||
self.handle_resource_loaded(id, LoadType::Stylesheet(url)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -839,6 +841,12 @@ impl ScriptTask {
|
|||
}
|
||||
|
||||
/// Handle a request to load a page in a new child frame of an existing page.
|
||||
fn handle_resource_loaded(&self, pipeline: PipelineId, load: LoadType) {
|
||||
let page = get_page(&self.root_page(), pipeline);
|
||||
let doc = page.document().root();
|
||||
doc.r().finish_load(load);
|
||||
}
|
||||
|
||||
fn handle_new_layout(&self, new_layout_info: NewLayoutInfo) {
|
||||
let NewLayoutInfo {
|
||||
containing_pipeline_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue