mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Remove servo feature from servo_url
This commit is contained in:
parent
e07cf0a8da
commit
817172ebc4
11 changed files with 25 additions and 37 deletions
|
@ -22,7 +22,7 @@ profile_traits = {path = "../profile_traits"}
|
||||||
script_traits = {path = "../script_traits"}
|
script_traits = {path = "../script_traits"}
|
||||||
servo_config = {path = "../config"}
|
servo_config = {path = "../config"}
|
||||||
servo_geometry = {path = "../geometry", features = ["servo"]}
|
servo_geometry = {path = "../geometry", features = ["servo"]}
|
||||||
servo_url = {path = "../url", features = ["servo"]}
|
servo_url = {path = "../url"}
|
||||||
style_traits = {path = "../style_traits"}
|
style_traits = {path = "../style_traits"}
|
||||||
time = "0.1.17"
|
time = "0.1.17"
|
||||||
webrender = {git = "https://github.com/servo/webrender"}
|
webrender = {git = "https://github.com/servo/webrender"}
|
||||||
|
|
|
@ -19,7 +19,7 @@ rustc-serialize = "0.3"
|
||||||
serde = {version = "0.9"}
|
serde = {version = "0.9"}
|
||||||
serde_derive = {version = "0.9"}
|
serde_derive = {version = "0.9"}
|
||||||
servo_geometry = {path = "../geometry"}
|
servo_geometry = {path = "../geometry"}
|
||||||
servo_url = {path = "../url", features = ["servo"]}
|
servo_url = {path = "../url"}
|
||||||
url = "1.2"
|
url = "1.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -36,7 +36,7 @@ style_traits = {path = "../style_traits"}
|
||||||
servo_config = {path = "../config"}
|
servo_config = {path = "../config"}
|
||||||
servo_rand = {path = "../rand"}
|
servo_rand = {path = "../rand"}
|
||||||
servo_remutex = {path = "../remutex"}
|
servo_remutex = {path = "../remutex"}
|
||||||
servo_url = {path = "../url", features = ["servo"]}
|
servo_url = {path = "../url"}
|
||||||
webvr_traits = {path = "../webvr_traits"}
|
webvr_traits = {path = "../webvr_traits"}
|
||||||
webrender_traits = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
webrender_traits = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ num-traits = "0.1.32"
|
||||||
serde = "0.9"
|
serde = "0.9"
|
||||||
serde_derive = "0.9"
|
serde_derive = "0.9"
|
||||||
servo_config = {path = "../config"}
|
servo_config = {path = "../config"}
|
||||||
servo_url = {path = "../url", features = ["servo"]}
|
servo_url = {path = "../url"}
|
||||||
url = {version = "1.2", features = ["heap_size"]}
|
url = {version = "1.2", features = ["heap_size"]}
|
||||||
uuid = {version = "0.4", features = ["v4", "serde"]}
|
uuid = {version = "0.4", features = ["v4", "serde"]}
|
||||||
webrender_traits = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
webrender_traits = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
||||||
|
|
|
@ -80,7 +80,7 @@ servo_atoms = {path = "../atoms"}
|
||||||
servo_config = {path = "../config"}
|
servo_config = {path = "../config"}
|
||||||
servo_geometry = {path = "../geometry" }
|
servo_geometry = {path = "../geometry" }
|
||||||
servo_rand = {path = "../rand"}
|
servo_rand = {path = "../rand"}
|
||||||
servo_url = {path = "../url", features = ["servo"]}
|
servo_url = {path = "../url"}
|
||||||
smallvec = "0.3"
|
smallvec = "0.3"
|
||||||
style = {path = "../style"}
|
style = {path = "../style"}
|
||||||
style_traits = {path = "../style_traits"}
|
style_traits = {path = "../style_traits"}
|
||||||
|
|
|
@ -30,7 +30,7 @@ profile_traits = {path = "../profile_traits"}
|
||||||
rustc-serialize = "0.3.4"
|
rustc-serialize = "0.3.4"
|
||||||
serde = "0.9"
|
serde = "0.9"
|
||||||
serde_derive = "0.9"
|
serde_derive = "0.9"
|
||||||
servo_url = {path = "../url", features = ["servo"]}
|
servo_url = {path = "../url"}
|
||||||
style_traits = {path = "../style_traits", features = ["servo"]}
|
style_traits = {path = "../style_traits", features = ["servo"]}
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
url = {version = "1.2", features = ["heap_size"]}
|
url = {version = "1.2", features = ["heap_size"]}
|
||||||
|
|
|
@ -18,7 +18,7 @@ use_bindgen = ["bindgen", "regex"]
|
||||||
servo = ["serde/unstable", "serde", "serde_derive", "heapsize", "heapsize_derive",
|
servo = ["serde/unstable", "serde", "serde_derive", "heapsize", "heapsize_derive",
|
||||||
"style_traits/servo", "servo_atoms", "servo_config", "html5ever-atoms",
|
"style_traits/servo", "servo_atoms", "servo_config", "html5ever-atoms",
|
||||||
"cssparser/heapsize", "cssparser/serde", "encoding",
|
"cssparser/heapsize", "cssparser/serde", "encoding",
|
||||||
"rayon/unstable", "servo_url", "servo_url/servo"]
|
"rayon/unstable", "servo_url"]
|
||||||
testing = []
|
testing = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -9,15 +9,12 @@ publish = false
|
||||||
name = "servo_url"
|
name = "servo_url"
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[features]
|
|
||||||
servo = ["heapsize", "heapsize_derive", "serde", "serde_derive", "uuid/serde", "url/heap_size", "url_serde"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
heapsize = {version = "0.3.0", optional = true}
|
heapsize = {version = "0.3.0"}
|
||||||
heapsize_derive = {version = "0.1", optional = true}
|
heapsize_derive = {version = "0.1"}
|
||||||
serde = {version = "0.9", optional = true}
|
serde = {version = "0.9"}
|
||||||
serde_derive = {version = "0.9", optional = true}
|
serde_derive = {version = "0.9"}
|
||||||
servo_rand = {path = "../rand"}
|
servo_rand = {path = "../rand"}
|
||||||
url = "1.2"
|
url = {version = "1.2", features = ["heap_size"]}
|
||||||
url_serde = {version = "0.1.3", optional = true}
|
url_serde = {version = "0.1.3"}
|
||||||
uuid = {version = "0.4.0", features = ["v4"]}
|
uuid = {version = "0.4.0", features = ["v4", "serde"]}
|
||||||
|
|
|
@ -7,14 +7,13 @@
|
||||||
#![crate_name = "servo_url"]
|
#![crate_name = "servo_url"]
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
#[cfg(feature = "servo")] #[macro_use] extern crate heapsize;
|
#[macro_use] extern crate heapsize;
|
||||||
#[cfg(feature = "servo")] #[macro_use] extern crate heapsize_derive;
|
#[macro_use] extern crate heapsize_derive;
|
||||||
#[cfg(feature = "servo")] extern crate serde;
|
extern crate serde;
|
||||||
#[cfg(feature = "servo")] #[macro_use] extern crate serde_derive;
|
#[macro_use] extern crate serde_derive;
|
||||||
#[cfg(feature = "servo")] extern crate url_serde;
|
|
||||||
|
|
||||||
extern crate servo_rand;
|
extern crate servo_rand;
|
||||||
extern crate url;
|
extern crate url;
|
||||||
|
extern crate url_serde;
|
||||||
extern crate uuid;
|
extern crate uuid;
|
||||||
|
|
||||||
pub mod origin;
|
pub mod origin;
|
||||||
|
@ -30,8 +29,7 @@ use url::{Url, Position};
|
||||||
|
|
||||||
pub use url::Host;
|
pub use url::Host;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HeapSizeOf)]
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub struct ServoUrl(Arc<Url>);
|
pub struct ServoUrl(Arc<Url>);
|
||||||
|
|
||||||
impl ServoUrl {
|
impl ServoUrl {
|
||||||
|
@ -203,7 +201,6 @@ impl From<Url> for ServoUrl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "servo")]
|
|
||||||
impl serde::Serialize for ServoUrl {
|
impl serde::Serialize for ServoUrl {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where S: serde::Serializer,
|
where S: serde::Serializer,
|
||||||
|
@ -212,7 +209,6 @@ impl serde::Serialize for ServoUrl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "servo")]
|
|
||||||
impl serde::Deserialize for ServoUrl {
|
impl serde::Deserialize for ServoUrl {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
where D: serde::Deserializer,
|
where D: serde::Deserializer,
|
||||||
|
|
|
@ -7,12 +7,11 @@ use servo_rand::Rng;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use url::{Host, Origin};
|
use url::{Host, Origin};
|
||||||
#[cfg(feature = "servo")] use url_serde;
|
use url_serde;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
/// The origin of an URL
|
/// The origin of an URL
|
||||||
#[derive(PartialEq, Eq, Clone, Debug)]
|
#[derive(PartialEq, Eq, Clone, Debug, HeapSizeOf, Deserialize, Serialize)]
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))]
|
|
||||||
pub enum ImmutableOrigin {
|
pub enum ImmutableOrigin {
|
||||||
/// A globally unique identifier
|
/// A globally unique identifier
|
||||||
Opaque(OpaqueOrigin),
|
Opaque(OpaqueOrigin),
|
||||||
|
@ -20,8 +19,7 @@ pub enum ImmutableOrigin {
|
||||||
/// Consists of the URL's scheme, host and port
|
/// Consists of the URL's scheme, host and port
|
||||||
Tuple(
|
Tuple(
|
||||||
String,
|
String,
|
||||||
#[cfg_attr(feature = "servo",
|
#[serde(deserialize_with = "url_serde::deserialize", serialize_with = "url_serde::serialize")]
|
||||||
serde(deserialize_with = "url_serde::deserialize", serialize_with = "url_serde::serialize"))]
|
|
||||||
Host,
|
Host,
|
||||||
u16,
|
u16,
|
||||||
)
|
)
|
||||||
|
@ -97,18 +95,15 @@ impl ImmutableOrigin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Opaque identifier for URLs that have file or other schemes
|
/// Opaque identifier for URLs that have file or other schemes
|
||||||
#[derive(Eq, PartialEq, Clone, Debug)]
|
#[derive(Eq, PartialEq, Clone, Debug, Deserialize, Serialize)]
|
||||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
|
||||||
pub struct OpaqueOrigin(Uuid);
|
pub struct OpaqueOrigin(Uuid);
|
||||||
|
|
||||||
#[cfg(feature = "servo")]
|
|
||||||
known_heap_size!(0, OpaqueOrigin);
|
known_heap_size!(0, OpaqueOrigin);
|
||||||
|
|
||||||
/// A representation of an [origin](https://html.spec.whatwg.org/multipage/#origin-2).
|
/// A representation of an [origin](https://html.spec.whatwg.org/multipage/#origin-2).
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct MutableOrigin(Rc<(ImmutableOrigin, RefCell<Option<Host>>)>);
|
pub struct MutableOrigin(Rc<(ImmutableOrigin, RefCell<Option<Host>>)>);
|
||||||
|
|
||||||
#[cfg(feature = "servo")]
|
|
||||||
known_heap_size!(0, MutableOrigin);
|
known_heap_size!(0, MutableOrigin);
|
||||||
|
|
||||||
impl MutableOrigin {
|
impl MutableOrigin {
|
||||||
|
|
|
@ -23,7 +23,7 @@ regex = "0.2"
|
||||||
rustc-serialize = "0.3.4"
|
rustc-serialize = "0.3.4"
|
||||||
script_traits = {path = "../script_traits"}
|
script_traits = {path = "../script_traits"}
|
||||||
servo_config = {path = "../config"}
|
servo_config = {path = "../config"}
|
||||||
servo_url = {path = "../url", features = ["servo"]}
|
servo_url = {path = "../url"}
|
||||||
url = {version = "1.2", features = ["heap_size"]}
|
url = {version = "1.2", features = ["heap_size"]}
|
||||||
uuid = {version = "0.4", features = ["v4"]}
|
uuid = {version = "0.4", features = ["v4"]}
|
||||||
webdriver = "0.22"
|
webdriver = "0.22"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue