aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/servoparser
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-11-17 15:34:47 -0600
committerGitHub <noreply@github.com>2016-11-17 15:34:47 -0600
commit22aebdf5d41a3509cd6515ccf5edcdf33715a76d (patch)
tree824af410d147404d0a6dc0908cec85cc71df5bfd /components/script/dom/servoparser
parentb3ad71353bf264770bf0b3a87b32d86928eb09d4 (diff)
parent913c874cb55fd0fdc9e8f3a4c34624cd015fac8a (diff)
downloadservo-22aebdf5d41a3509cd6515ccf5edcdf33715a76d.tar.gz
servo-22aebdf5d41a3509cd6515ccf5edcdf33715a76d.zip
Auto merge of #14246 - emilio:servo-url, r=SimonSapin
Urlmageddon <!-- Please describe your changes on the following line: --> Still needs a bunch of code in net to be converted in order to get more advantage of this for images and stuff, but meanwhile this should help quite a bit with #13778. Still wanted to get this in. r? @SimonSapin <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14246) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/servoparser')
-rw-r--r--components/script/dom/servoparser/html.rs4
-rw-r--r--components/script/dom/servoparser/mod.rs12
-rw-r--r--components/script/dom/servoparser/xml.rs4
3 files changed, 10 insertions, 10 deletions
diff --git a/components/script/dom/servoparser/html.rs b/components/script/dom/servoparser/html.rs
index a2d636da6f3..ab5af05a18d 100644
--- a/components/script/dom/servoparser/html.rs
+++ b/components/script/dom/servoparser/html.rs
@@ -31,10 +31,10 @@ use html5ever::tree_builder::{NodeOrText, QuirksMode};
use html5ever::tree_builder::{Tracer as HtmlTracer, TreeBuilder, TreeBuilderOpts, TreeSink};
use html5ever_atoms::QualName;
use js::jsapi::JSTracer;
+use servo_url::ServoUrl;
use std::borrow::Cow;
use std::io::{self, Write};
use super::{FragmentContext, Sink};
-use url::Url;
#[derive(HeapSizeOf, JSTraceable)]
#[must_root]
@@ -48,7 +48,7 @@ pub struct Tokenizer {
impl Tokenizer {
pub fn new(
document: &Document,
- url: Url,
+ url: ServoUrl,
fragment_context: Option<FragmentContext>)
-> Self {
let sink = Sink {
diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs
index 7b5c5c7f4ab..31ae5d4961a 100644
--- a/components/script/dom/servoparser/mod.rs
+++ b/components/script/dom/servoparser/mod.rs
@@ -29,9 +29,9 @@ use network_listener::PreInvoke;
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType};
use profile_traits::time::{TimerMetadataReflowType, ProfilerCategory, profile};
use script_thread::ScriptThread;
+use servo_url::ServoUrl;
use std::cell::Cell;
use std::collections::VecDeque;
-use url::Url;
use util::resource_files::read_resource_file;
mod html;
@@ -65,7 +65,7 @@ impl ServoParser {
pub fn parse_html_document(
document: &Document,
input: DOMString,
- url: Url,
+ url: ServoUrl,
owner: Option<PipelineId>) {
let parser = ServoParser::new(
document,
@@ -122,7 +122,7 @@ impl ServoParser {
pub fn parse_xml_document(
document: &Document,
input: DOMString,
- url: Url,
+ url: ServoUrl,
owner: Option<PipelineId>) {
let parser = ServoParser::new(
document,
@@ -287,7 +287,7 @@ enum Tokenizer {
#[derive(JSTraceable, HeapSizeOf)]
#[must_root]
struct Sink {
- pub base_url: Url,
+ pub base_url: ServoUrl,
pub document: JS<Document>,
}
@@ -338,11 +338,11 @@ pub struct ParserContext {
/// The pipeline associated with this document.
id: PipelineId,
/// The URL for this document.
- url: Url,
+ url: ServoUrl,
}
impl ParserContext {
- pub fn new(id: PipelineId, url: Url) -> ParserContext {
+ pub fn new(id: PipelineId, url: ServoUrl) -> ParserContext {
ParserContext {
parser: None,
is_synthesized_document: false,
diff --git a/components/script/dom/servoparser/xml.rs b/components/script/dom/servoparser/xml.rs
index 6f87d6a389c..3ce3fb69ca4 100644
--- a/components/script/dom/servoparser/xml.rs
+++ b/components/script/dom/servoparser/xml.rs
@@ -19,9 +19,9 @@ use dom::processinginstruction::ProcessingInstruction;
use dom::text::Text;
use html5ever_atoms::{Prefix, QualName};
use js::jsapi::JSTracer;
+use servo_url::ServoUrl;
use std::borrow::Cow;
use super::Sink;
-use url::Url;
use xml5ever::tendril::StrTendril;
use xml5ever::tokenizer::{Attribute, QName, XmlTokenizer};
use xml5ever::tree_builder::{NextParserState, NodeOrText};
@@ -35,7 +35,7 @@ pub struct Tokenizer {
}
impl Tokenizer {
- pub fn new(document: &Document, url: Url) -> Self {
+ pub fn new(document: &Document, url: ServoUrl) -> Self {
let sink = Sink {
base_url: url,
document: JS::from_ref(document),