aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2015-12-02 02:45:52 -0500
committerJosh Matthews <josh@joshmatthews.net>2015-12-04 16:32:54 -0500
commit9d3b915cace62d1e6aaa22572a992316894edf76 (patch)
tree131e1df17cd0ebbd2306a93c9caf49fd45920441 /components/script/script_task.rs
parenta840a23990fbca4ce9572e729d9f390f3d991390 (diff)
downloadservo-9d3b915cace62d1e6aaa22572a992316894edf76.tar.gz
servo-9d3b915cace62d1e6aaa22572a992316894edf76.zip
Introduce abstraction over HTML and XML parsers for parser network listener.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 374b9ec70a9..c7078d0db75 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -27,7 +27,7 @@ use dom::bindings::conversions::{FromJSValConvertible, StringificationBehavior};
use dom::bindings::global::GlobalRef;
use dom::bindings::inheritance::Castable;
use dom::bindings::js::{JS, RootCollection, trace_roots};
-use dom::bindings::js::{Root, RootCollectionPtr, RootedReference};
+use dom::bindings::js::{RootCollectionPtr, RootedReference};
use dom::bindings::refcounted::{LiveDOMReferences, Trusted, TrustedReference, trace_refcounted_objects};
use dom::bindings::trace::{JSTraceable, RootedVec, trace_traceables};
use dom::bindings::utils::{DOM_CALLBACKS, WRAP_CALLBACKS};
@@ -36,7 +36,7 @@ use dom::element::Element;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::htmlanchorelement::HTMLAnchorElement;
use dom::node::{Node, NodeDamage, window_from_node};
-use dom::servohtmlparser::{ParserContext, ServoHTMLParser};
+use dom::servohtmlparser::{ParserContext, ParserRoot};
use dom::uievent::UIEvent;
use dom::window::{ReflowReason, ScriptHelpers, Window};
use dom::worker::TrustedWorkerAddress;
@@ -595,7 +595,7 @@ pub unsafe extern "C" fn shadow_check_callback(_cx: *mut JSContext,
impl ScriptTask {
pub fn page_fetch_complete(id: PipelineId, subpage: Option<SubpageId>, metadata: Metadata)
- -> Option<Root<ServoHTMLParser>> {
+ -> Option<ParserRoot> {
SCRIPT_TASK_ROOT.with(|root| {
let script_task = unsafe { &*root.borrow().unwrap() };
script_task.handle_page_fetch_complete(id, subpage, metadata)
@@ -1451,7 +1451,7 @@ impl ScriptTask {
/// We have received notification that the response associated with a load has completed.
/// Kick off the document and frame tree creation process using the result.
fn handle_page_fetch_complete(&self, id: PipelineId, subpage: Option<SubpageId>,
- metadata: Metadata) -> Option<Root<ServoHTMLParser>> {
+ metadata: Metadata) -> Option<ParserRoot> {
let idx = self.incomplete_loads.borrow().iter().position(|load| {
load.pipeline_id == id && load.parent_info.map(|info| info.1) == subpage
});
@@ -1547,7 +1547,7 @@ impl ScriptTask {
/// The entry point to document loading. Defines bindings, sets up the window and document
/// objects, parses HTML and CSS, and kicks off initial layout.
- fn load(&self, metadata: Metadata, incomplete: InProgressLoad) -> Root<ServoHTMLParser> {
+ fn load(&self, metadata: Metadata, incomplete: InProgressLoad) -> ParserRoot {
let final_url = metadata.final_url.clone();
debug!("ScriptTask: loading {} on page {:?}", incomplete.url.serialize(), incomplete.pipeline_id);