Skip to content

Commit

Permalink
Unify ServoHTMLParser and ServoXMLParser in ServoParser
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Oct 11, 2016
1 parent 609299e commit 1405be6
Show file tree
Hide file tree
Showing 12 changed files with 300 additions and 646 deletions.
8 changes: 4 additions & 4 deletions components/script/dom/document.rs
Expand Up @@ -76,6 +76,7 @@ use dom::popstateevent::PopStateEvent;
use dom::processinginstruction::ProcessingInstruction;
use dom::progressevent::ProgressEvent;
use dom::range::Range;
use dom::servoparser::ServoParser;
use dom::storageevent::StorageEvent;
use dom::stylesheetlist::StyleSheetList;
use dom::text::Text;
Expand Down Expand Up @@ -103,7 +104,6 @@ use net_traits::request::RequestInit;
use net_traits::response::HttpsState;
use num_traits::ToPrimitive;
use origin::Origin;
use parse::{MutNullableParserField, ParserRef, ParserRoot};
use script_layout_interface::message::{Msg, ReflowQueryType};
use script_thread::{MainThreadScriptMsg, Runnable};
use script_traits::{AnimationState, CompositorEvent, MouseButton, MouseEventType, MozBrowserEvent};
Expand Down Expand Up @@ -226,7 +226,7 @@ pub struct Document {
/// Tracks all outstanding loads related to this document.
loader: DOMRefCell<DocumentLoader>,
/// The current active HTML parser, to allow resuming after interruptions.
current_parser: MutNullableParserField,
current_parser: MutNullableHeap<JS<ServoParser>>,
/// When we should kick off a reflow. This happens during parsing.
reflow_timeout: Cell<Option<u64>>,
/// The cached first `base` element with an `href` attribute.
Expand Down Expand Up @@ -1627,11 +1627,11 @@ impl Document {
global_scope.constellation_chan().send(load_event).unwrap();
}

pub fn set_current_parser(&self, script: Option<ParserRef>) {
pub fn set_current_parser(&self, script: Option<&ServoParser>) {
self.current_parser.set(script);
}

pub fn get_current_parser(&self) -> Option<ParserRoot> {
pub fn get_current_parser(&self) -> Option<Root<ServoParser>> {
self.current_parser.get()
}

Expand Down
2 changes: 0 additions & 2 deletions components/script/dom/mod.rs
Expand Up @@ -386,9 +386,7 @@ pub mod serviceworker;
pub mod serviceworkercontainer;
pub mod serviceworkerglobalscope;
pub mod serviceworkerregistration;
pub mod servohtmlparser;
pub mod servoparser;
pub mod servoxmlparser;
pub mod storage;
pub mod storageevent;
pub mod stylesheet;
Expand Down
235 changes: 0 additions & 235 deletions components/script/dom/servohtmlparser.rs

This file was deleted.

0 comments on commit 1405be6

Please sign in to comment.