mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use Url.join instead of UrlParser.base_url(...).parse (#9002)
This commit is contained in:
parent
6764cf0ee9
commit
11234f5370
41 changed files with 58 additions and 64 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue