mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
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 -->
This commit is contained in:
commit
22aebdf5d4
161 changed files with 1044 additions and 718 deletions
41
ports/cef/Cargo.lock
generated
41
ports/cef/Cargo.lock
generated
|
@ -17,8 +17,8 @@ dependencies = [
|
|||
"objc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plugins 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"x11 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -332,9 +332,9 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
|
@ -367,8 +367,8 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
@ -532,8 +532,8 @@ dependencies = [
|
|||
"msg 0.0.1",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -791,13 +791,13 @@ dependencies = [
|
|||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"simd 0.1.1 (git+https://github.com/huonw/simd)",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
"xi-unicode 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -867,8 +867,8 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-glutin 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1163,12 +1163,12 @@ dependencies = [
|
|||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
@ -1201,8 +1201,9 @@ dependencies = [
|
|||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style_traits 0.0.1",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
@ -1217,7 +1218,7 @@ dependencies = [
|
|||
"net_traits 0.0.1",
|
||||
"profile_traits 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
||||
|
@ -1302,6 +1303,7 @@ dependencies = [
|
|||
"script 0.0.1",
|
||||
"script_layout_interface 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1488,6 +1490,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
|
||||
|
@ -1529,6 +1532,7 @@ dependencies = [
|
|||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2018,6 +2022,7 @@ dependencies = [
|
|||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
|
@ -2055,8 +2060,8 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2084,6 +2089,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2244,6 +2250,17 @@ dependencies = [
|
|||
"string_cache_codegen 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "servo_url"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.2.0"
|
||||
|
@ -2361,11 +2378,11 @@ dependencies = [
|
|||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"walkdir 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2652,6 +2669,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2760,6 +2778,7 @@ dependencies = [
|
|||
"regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"script_traits 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -25,14 +25,14 @@ gfx_traits = {path = "../../components/gfx_traits"}
|
|||
gleam = "0.2.8"
|
||||
glutin_app = {path = "../glutin"}
|
||||
libc = "0.2"
|
||||
libservo = {path = "../../components/servo"}
|
||||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
msg = {path = "../../components/msg"}
|
||||
net_traits = {path = "../../components/net_traits"}
|
||||
plugins = {path = "../../components/plugins"}
|
||||
script_traits = {path = "../../components/script_traits"}
|
||||
libservo = {path = "../../components/servo"}
|
||||
servo_url = {path = "../../components/url"}
|
||||
style_traits = {path = "../../components/style_traits"}
|
||||
url = "1.2"
|
||||
util = {path = "../../components/util"}
|
||||
|
||||
[target.'cfg(target_os="macos")'.dependencies]
|
||||
|
|
|
@ -24,14 +24,14 @@ extern crate gleam;
|
|||
extern crate glutin_app;
|
||||
extern crate rustc_unicode;
|
||||
extern crate script_traits;
|
||||
extern crate servo_url;
|
||||
extern crate style_traits;
|
||||
|
||||
extern crate net_traits;
|
||||
extern crate msg;
|
||||
extern crate util;
|
||||
extern crate style_traits;
|
||||
|
||||
extern crate libc;
|
||||
extern crate url as std_url;
|
||||
|
||||
#[cfg(target_os="macos")]
|
||||
#[link_args="-Xlinker -undefined -Xlinker dynamic_lookup"]
|
||||
|
|
|
@ -33,7 +33,7 @@ use std::os::raw::{c_char, c_void};
|
|||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use std_url::Url;
|
||||
use servo_url::ServoUrl;
|
||||
use style_traits::cursor::Cursor;
|
||||
use util::geometry::ScreenPx;
|
||||
#[cfg(target_os="linux")]
|
||||
|
@ -312,13 +312,13 @@ impl WindowMethods for Window {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_favicon(&self, url: Url) {
|
||||
fn set_favicon(&self, url: ServoUrl) {
|
||||
let browser = self.cef_browser.borrow();
|
||||
let browser = match *browser {
|
||||
None => return,
|
||||
Some(ref browser) => browser,
|
||||
};
|
||||
browser.downcast().favicons.borrow_mut().push(url.to_string().clone());
|
||||
browser.downcast().favicons.borrow_mut().push(url.into_string());
|
||||
}
|
||||
|
||||
fn status(&self, info: Option<String>) {
|
||||
|
@ -444,7 +444,7 @@ impl WindowMethods for Window {
|
|||
};
|
||||
}
|
||||
|
||||
fn set_page_url(&self, url: Url) {
|
||||
fn set_page_url(&self, url: ServoUrl) {
|
||||
// it seems to be the case that load start is always called
|
||||
// IMMEDIATELY before address change, so just stick it here
|
||||
on_load_start(self);
|
||||
|
@ -457,7 +457,7 @@ impl WindowMethods for Window {
|
|||
let servoframe = frame.downcast();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let mut frame_url = servoframe.url.borrow_mut();
|
||||
*frame_url = url.to_string();
|
||||
*frame_url = url.into_string();
|
||||
let utf16_chars: Vec<u16> = Utf16Encoder::new((*frame_url).chars()).collect();
|
||||
if check_ptr_exist!(browser.get_host().get_client(), get_display_handler) &&
|
||||
check_ptr_exist!(browser.get_host().get_client().get_display_handler(), on_address_change) {
|
||||
|
|
14
ports/geckolib/Cargo.lock
generated
14
ports/geckolib/Cargo.lock
generated
|
@ -12,10 +12,10 @@ dependencies = [
|
|||
"num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"stylo_tests 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -333,6 +333,13 @@ name = "serde"
|
|||
version = "0.8.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "servo_url"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "0.1.8"
|
||||
|
@ -366,11 +373,11 @@ dependencies = [
|
|||
"rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"walkdir 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -400,9 +407,9 @@ dependencies = [
|
|||
"num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -485,6 +492,7 @@ dependencies = [
|
|||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
|
@ -20,9 +20,9 @@ log = {version = "0.3.5", features = ["release_max_level_info"]}
|
|||
num_cpus = "1.1.0"
|
||||
parking_lot = "0.3"
|
||||
selectors = "0.14"
|
||||
servo_url = {path = "../../components/url"}
|
||||
style = {path = "../../components/style", features = ["gecko"]}
|
||||
style_traits = {path = "../../components/style_traits"}
|
||||
url = "1.2"
|
||||
|
||||
[dev-dependencies]
|
||||
stylo_tests = {path = "../../tests/unit/stylo"}
|
||||
|
|
|
@ -7,6 +7,7 @@ use cssparser::Parser;
|
|||
use env_logger;
|
||||
use euclid::Size2D;
|
||||
use parking_lot::RwLock;
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt::Write;
|
||||
use std::mem::transmute;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -47,7 +48,6 @@ use style::string_cache::Atom;
|
|||
use style::stylesheets::{Origin, Stylesheet};
|
||||
use style::timer::Timer;
|
||||
use style_traits::ToCss;
|
||||
use url::Url;
|
||||
|
||||
/*
|
||||
* For Gecko->Servo function calls, we need to redeclare the same signature that was declared in
|
||||
|
@ -167,7 +167,7 @@ pub extern "C" fn Servo_Node_ClearNodeData(node: RawGeckoNodeBorrowed) -> () {
|
|||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_StyleSheet_Empty(mode: SheetParsingMode) -> RawServoStyleSheetStrong {
|
||||
let url = Url::parse("about:blank").unwrap();
|
||||
let url = ServoUrl::parse("about:blank").unwrap();
|
||||
let extra_data = ParserContextExtraData::default();
|
||||
let origin = match mode {
|
||||
SheetParsingMode::eAuthorSheetFeatures => Origin::Author,
|
||||
|
@ -198,7 +198,7 @@ pub extern "C" fn Servo_StyleSheet_FromUTF8Bytes(data: *const nsACString,
|
|||
};
|
||||
|
||||
let base_str = unsafe { base_url.as_ref().unwrap().as_str_unchecked() };
|
||||
let url = Url::parse(base_str).unwrap();
|
||||
let url = ServoUrl::parse(base_str).unwrap();
|
||||
let extra_data = unsafe { ParserContextExtraData {
|
||||
base: Some(GeckoArcURI::new(base)),
|
||||
referrer: Some(GeckoArcURI::new(referrer)),
|
||||
|
@ -408,7 +408,7 @@ pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const
|
|||
let name = unsafe { property.as_ref().unwrap().as_str_unchecked() };
|
||||
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
||||
let base_str = unsafe { base_url.as_ref().unwrap().as_str_unchecked() };
|
||||
let base_url = Url::parse(base_str).unwrap();
|
||||
let base_url = ServoUrl::parse(base_str).unwrap();
|
||||
let extra_data = unsafe { ParserContextExtraData {
|
||||
base: Some(GeckoArcURI::new(base)),
|
||||
referrer: Some(GeckoArcURI::new(referrer)),
|
||||
|
|
|
@ -12,8 +12,8 @@ extern crate euclid;
|
|||
extern crate libc;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate parking_lot;
|
||||
extern crate servo_url;
|
||||
extern crate style_traits;
|
||||
extern crate url;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub mod glue;
|
||||
|
|
|
@ -19,8 +19,8 @@ msg = {path = "../../components/msg"}
|
|||
net_traits = {path = "../../components/net_traits"}
|
||||
script_traits = {path = "../../components/script_traits"}
|
||||
servo-glutin = "0.6"
|
||||
servo_url = {path = "../../components/url"}
|
||||
style_traits = {path = "../../components/style_traits"}
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
util = {path = "../../components/util"}
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
|
||||
|
|
|
@ -19,8 +19,8 @@ extern crate msg;
|
|||
extern crate net_traits;
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))] extern crate osmesa_sys;
|
||||
extern crate script_traits;
|
||||
extern crate servo_url;
|
||||
extern crate style_traits;
|
||||
extern crate url;
|
||||
extern crate util;
|
||||
#[cfg(target_os = "windows")] extern crate winapi;
|
||||
#[cfg(target_os = "windows")] extern crate user32;
|
||||
|
|
|
@ -26,6 +26,7 @@ use net_traits::net_error_list::NetError;
|
|||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
use osmesa_sys;
|
||||
use script_traits::{TouchEventType, TouchpadPressurePhase};
|
||||
use servo_url::ServoUrl;
|
||||
use std::cell::{Cell, RefCell};
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
use std::ffi::CString;
|
||||
|
@ -36,7 +37,6 @@ use std::ptr;
|
|||
use std::rc::Rc;
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use style_traits::cursor::Cursor;
|
||||
use url::Url;
|
||||
#[cfg(target_os = "windows")]
|
||||
use user32;
|
||||
use util::geometry::ScreenPx;
|
||||
|
@ -183,7 +183,7 @@ pub struct Window {
|
|||
|
||||
mouse_pos: Cell<Point2D<i32>>,
|
||||
key_modifiers: Cell<KeyModifiers>,
|
||||
current_url: RefCell<Option<Url>>,
|
||||
current_url: RefCell<Option<ServoUrl>>,
|
||||
|
||||
/// The contents of the last ReceivedCharacter event for use in a subsequent KeyEvent.
|
||||
pending_key_event_char: Cell<Option<char>>,
|
||||
|
@ -904,7 +904,7 @@ impl WindowMethods for Window {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_page_url(&self, url: Url) {
|
||||
fn set_page_url(&self, url: ServoUrl) {
|
||||
*self.current_url.borrow_mut() = Some(url);
|
||||
}
|
||||
|
||||
|
@ -980,7 +980,7 @@ impl WindowMethods for Window {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_favicon(&self, _: Url) {
|
||||
fn set_favicon(&self, _: ServoUrl) {
|
||||
}
|
||||
|
||||
fn prepare_for_composite(&self, _width: usize, _height: usize) -> bool {
|
||||
|
|
44
ports/servo/Cargo.lock
generated
44
ports/servo/Cargo.lock
generated
|
@ -361,9 +361,9 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
|
@ -396,8 +396,8 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
@ -561,8 +561,8 @@ dependencies = [
|
|||
"msg 0.0.1",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -861,13 +861,13 @@ dependencies = [
|
|||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"simd 0.1.1 (git+https://github.com/huonw/simd)",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
"xi-unicode 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -946,8 +946,8 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-glutin 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1242,12 +1242,12 @@ dependencies = [
|
|||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
@ -1287,8 +1287,9 @@ dependencies = [
|
|||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style_traits 0.0.1",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
@ -1303,7 +1304,7 @@ dependencies = [
|
|||
"net_traits 0.0.1",
|
||||
"profile_traits 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"webrender_traits 0.9.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
||||
|
@ -1389,6 +1390,7 @@ dependencies = [
|
|||
"script 0.0.1",
|
||||
"script_layout_interface 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1575,6 +1577,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
|
||||
|
@ -1614,6 +1617,7 @@ dependencies = [
|
|||
"net_traits 0.0.1",
|
||||
"plugins 0.0.1",
|
||||
"profile_traits 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1638,6 +1642,7 @@ dependencies = [
|
|||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2167,6 +2172,7 @@ dependencies = [
|
|||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
|
@ -2204,8 +2210,8 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2215,7 +2221,7 @@ dependencies = [
|
|||
"msg 0.0.1",
|
||||
"plugins 0.0.1",
|
||||
"script 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2243,6 +2249,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2411,6 +2418,17 @@ dependencies = [
|
|||
"string_cache_codegen 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "servo_url"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.2.0"
|
||||
|
@ -2527,11 +2545,11 @@ dependencies = [
|
|||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"walkdir 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2549,9 +2567,9 @@ dependencies = [
|
|||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -2845,6 +2863,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2960,6 +2979,7 @@ dependencies = [
|
|||
"regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"script_traits 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue