Skip to content

Commit

Permalink
Remove servo_url dependency for geckolib
Browse files Browse the repository at this point in the history
It seems mod attr is not used for geckolib at all, and that is the
only place where servo_url is still referenced for geckolib, so we
can just remove it.
  • Loading branch information
upsuper committed Apr 7, 2017
1 parent 1b6c3e0 commit 3150a92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/style/Cargo.toml
Expand Up @@ -18,7 +18,7 @@ use_bindgen = ["bindgen", "regex"]
servo = ["serde/unstable", "serde", "serde_derive", "heapsize", "heapsize_derive",
"style_traits/servo", "servo_atoms", "html5ever-atoms",
"cssparser/heapsize", "cssparser/serde", "encoding",
"rayon/unstable", "servo_url/servo"]
"rayon/unstable", "servo_url", "servo_url/servo"]
testing = []

[dependencies]
Expand Down Expand Up @@ -52,7 +52,7 @@ servo_atoms = {path = "../atoms", optional = true}
servo_config = {path = "../config"}
smallvec = "0.3"
style_traits = {path = "../style_traits"}
servo_url = {path = "../url"}
servo_url = {path = "../url", optional = true}
time = "0.1"
unicode-segmentation = "1.0"

Expand Down
4 changes: 1 addition & 3 deletions components/style/attr.rs
Expand Up @@ -19,7 +19,7 @@ use std::str::FromStr;
use std::sync::Arc;
use str::{HTML_SPACE_CHARACTERS, read_exponent, read_fraction};
use str::{read_numbers, split_commas, split_html_space_chars};
#[cfg(not(feature = "gecko"))] use str::str_join;
use str::str_join;
use values::specified::Length;

// Duplicated from script::dom::values.
Expand Down Expand Up @@ -166,7 +166,6 @@ impl AttrValue {
AttrValue::TokenList(tokens, atoms)
}

#[cfg(not(feature = "gecko"))] // Gecko can't borrow atoms as UTF-8.
pub fn from_atomic_tokens(atoms: Vec<Atom>) -> AttrValue {
// TODO(ajeffrey): effecient conversion of Vec<Atom> to String
let tokens = String::from(str_join(&atoms, "\x20"));
Expand Down Expand Up @@ -335,7 +334,6 @@ impl AttrValue {
}
}

#[cfg(not(feature = "gecko"))] // Gecko can't borrow atoms as UTF-8.
impl ::std::ops::Deref for AttrValue {
type Target = str;

Expand Down
4 changes: 2 additions & 2 deletions components/style/lib.rs
Expand Up @@ -71,7 +71,7 @@ extern crate selectors;
#[cfg(feature = "servo")] #[macro_use] extern crate serde_derive;
#[cfg(feature = "servo")] #[macro_use] extern crate servo_atoms;
extern crate servo_config;
extern crate servo_url;
#[cfg(feature = "servo")] extern crate servo_url;
extern crate smallvec;
#[macro_use]
extern crate style_traits;
Expand All @@ -81,7 +81,7 @@ extern crate unicode_segmentation;

pub mod animation;
#[allow(missing_docs)] // TODO.
pub mod attr;
#[cfg(feature = "servo")] pub mod attr;
pub mod bezier;
pub mod bloom;
pub mod cache;
Expand Down

0 comments on commit 3150a92

Please sign in to comment.