mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update to string-cache 0.3
This commit is contained in:
parent
9fcc9d9d3f
commit
53b638c0e2
170 changed files with 1309 additions and 1050 deletions
|
@ -3,10 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::Parser;
|
||||
use html5ever_atoms::LocalName;
|
||||
use parking_lot::RwLock;
|
||||
use selectors::parser::{LocalName, ParserContext, parse_selector_list};
|
||||
use selectors::parser::{LocalName as LocalNameSelector, ParserContext, parse_selector_list};
|
||||
use servo_atoms::Atom;
|
||||
use std::sync::Arc;
|
||||
use string_cache::Atom;
|
||||
use style::properties::{PropertyDeclarationBlock, PropertyDeclaration, DeclaredValue};
|
||||
use style::properties::{longhands, Importance};
|
||||
use style::selector_matching::{Rule, SelectorMap};
|
||||
|
@ -78,9 +79,9 @@ fn test_get_local_name() {
|
|||
let rules_list = get_mock_rules(&["img.foo", "#top", "IMG", "ImG"]);
|
||||
let check = |i: usize, names: Option<(&str, &str)>| {
|
||||
assert!(SelectorMap::get_local_name(&rules_list[i][0])
|
||||
== names.map(|(name, lower_name)| LocalName {
|
||||
name: Atom::from(name),
|
||||
lower_name: Atom::from(lower_name) }))
|
||||
== names.map(|(name, lower_name)| LocalNameSelector {
|
||||
name: LocalName::from(name),
|
||||
lower_name: LocalName::from(lower_name) }))
|
||||
};
|
||||
check(0, Some(("img", "img")));
|
||||
check(1, None);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue