Use Url.join instead of UrlParser.base_url(...).parse (#9002)

This commit is contained in:
Mathieu Agopian 2015-12-18 17:02:41 +01:00
parent 6764cf0ee9
commit 11234f5370
41 changed files with 58 additions and 64 deletions

View file

@ -25,7 +25,6 @@ use dom::virtualmethods::VirtualMethods;
use num::ToPrimitive;
use std::default::Default;
use string_cache::Atom;
use url::UrlParser;
use util::str::DOMString;
#[dom_struct]
@ -187,7 +186,7 @@ fn follow_hyperlink(subject: &Element, hyperlink_suffix: Option<String>) {
// Step 4-5.
let document = document_from_node(subject);
let url = match UrlParser::new().base_url(&document.url()).parse(&href) {
let url = match document.url().join(&href) {
Ok(url) => url,
Err(_) => return,
};