mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock. Removed references to string_cache_plugin. Import atom! and ns! from string_cache. Replaced ns!("") by ns!(). Replaced ns!(XML) and co by ns!(xml) and co. Replaced atom!(foo) by atom!("foo"). Replaced Atom::from_slice by Atom::from. Replaced atom.as_slice() by &*atom.
This commit is contained in:
parent
e7b1924948
commit
3dec6edd10
68 changed files with 328 additions and 434 deletions
|
@ -25,6 +25,5 @@ app_units = {version = "0.1", features = ["plugins"]}
|
|||
url = "0.2"
|
||||
cssparser = "0.4"
|
||||
selectors = "0.2"
|
||||
string_cache = "0.1"
|
||||
string_cache_plugin = "0.1"
|
||||
string_cache = "0.2"
|
||||
euclid = {version = "0.3", features = ["plugins"]}
|
||||
|
|
|
@ -4,14 +4,13 @@
|
|||
|
||||
#![feature(plugin)]
|
||||
#![cfg_attr(test, feature(core_intrinsics))]
|
||||
#![plugin(string_cache_plugin)]
|
||||
#![plugin(plugins)]
|
||||
|
||||
extern crate app_units;
|
||||
extern crate cssparser;
|
||||
extern crate euclid;
|
||||
extern crate selectors;
|
||||
extern crate string_cache;
|
||||
#[macro_use(atom, ns)] extern crate string_cache;
|
||||
extern crate style;
|
||||
extern crate style_traits;
|
||||
extern crate url;
|
||||
|
|
|
@ -26,21 +26,21 @@ fn test_parse_stylesheet() {
|
|||
origin: Origin::UserAgent,
|
||||
media: None,
|
||||
rules: vec![
|
||||
CSSRule::Namespace(None, ns!(HTML)),
|
||||
CSSRule::Namespace(None, ns!(html)),
|
||||
CSSRule::Style(StyleRule {
|
||||
selectors: vec![
|
||||
Selector {
|
||||
compound_selectors: Arc::new(CompoundSelector {
|
||||
simple_selectors: vec![
|
||||
SimpleSelector::Namespace(ns!(HTML)),
|
||||
SimpleSelector::Namespace(ns!(html)),
|
||||
SimpleSelector::LocalName(LocalName {
|
||||
name: atom!(input),
|
||||
lower_name: atom!(input),
|
||||
name: atom!("input"),
|
||||
lower_name: atom!("input"),
|
||||
}),
|
||||
SimpleSelector::AttrEqual(AttrSelector {
|
||||
name: atom!(type),
|
||||
lower_name: atom!(type),
|
||||
namespace: NamespaceConstraint::Specific(ns!("")),
|
||||
name: atom!("type"),
|
||||
lower_name: atom!("type"),
|
||||
namespace: NamespaceConstraint::Specific(ns!()),
|
||||
}, "hidden".to_owned(), CaseSensitivity::CaseInsensitive)
|
||||
],
|
||||
next: None,
|
||||
|
@ -62,10 +62,10 @@ fn test_parse_stylesheet() {
|
|||
Selector {
|
||||
compound_selectors: Arc::new(CompoundSelector {
|
||||
simple_selectors: vec![
|
||||
SimpleSelector::Namespace(ns!(HTML)),
|
||||
SimpleSelector::Namespace(ns!(html)),
|
||||
SimpleSelector::LocalName(LocalName {
|
||||
name: atom!(html),
|
||||
lower_name: atom!(html),
|
||||
name: atom!("html"),
|
||||
lower_name: atom!("html"),
|
||||
}),
|
||||
],
|
||||
next: None,
|
||||
|
@ -76,10 +76,10 @@ fn test_parse_stylesheet() {
|
|||
Selector {
|
||||
compound_selectors: Arc::new(CompoundSelector {
|
||||
simple_selectors: vec![
|
||||
SimpleSelector::Namespace(ns!(HTML)),
|
||||
SimpleSelector::Namespace(ns!(html)),
|
||||
SimpleSelector::LocalName(LocalName {
|
||||
name: atom!(body),
|
||||
lower_name: atom!(body),
|
||||
name: atom!("body"),
|
||||
lower_name: atom!("body"),
|
||||
}),
|
||||
],
|
||||
next: None,
|
||||
|
@ -101,11 +101,11 @@ fn test_parse_stylesheet() {
|
|||
Selector {
|
||||
compound_selectors: Arc::new(CompoundSelector {
|
||||
simple_selectors: vec![
|
||||
SimpleSelector::Class(Atom::from_slice("ok")),
|
||||
SimpleSelector::Class(Atom::from("ok")),
|
||||
],
|
||||
next: Some((Arc::new(CompoundSelector {
|
||||
simple_selectors: vec![
|
||||
SimpleSelector::ID(Atom::from_slice("d1")),
|
||||
SimpleSelector::ID(Atom::from("d1")),
|
||||
],
|
||||
next: None,
|
||||
}), Combinator::Child)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue