mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update to selectors 0.14
This commit is contained in:
parent
afa55dcf55
commit
465efd784c
12 changed files with 28 additions and 106 deletions
|
@ -15,9 +15,8 @@ doctest = false
|
|||
[features]
|
||||
gecko = ["nsstring_vendor"]
|
||||
servo = ["serde/unstable", "serde", "serde_derive", "heapsize_plugin",
|
||||
"style_traits/servo", "app_units/plugins",
|
||||
"style_traits/servo", "app_units/plugins", "string_cache",
|
||||
"cssparser/heap_size", "cssparser/serde-serialization",
|
||||
"selectors/unstable", "string_cache",
|
||||
"url/heap_size", "plugins", "parking_lot/nightly"]
|
||||
testing = []
|
||||
|
||||
|
@ -46,7 +45,7 @@ parking_lot = "0.3.3"
|
|||
quickersort = "2.0.0"
|
||||
rand = "0.3"
|
||||
rustc-serialize = "0.3"
|
||||
selectors = "0.13"
|
||||
selectors = "0.14"
|
||||
serde = {version = "0.8", optional = true}
|
||||
serde_derive = {version = "0.8", optional = true}
|
||||
smallvec = "0.1"
|
||||
|
|
|
@ -9,8 +9,6 @@ use gecko_bindings::bindings::Gecko_Atomize;
|
|||
use gecko_bindings::bindings::Gecko_ReleaseAtom;
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use heapsize::HeapSizeOf;
|
||||
use selectors::bloom::BloomHash;
|
||||
use selectors::parser::FromCowStr;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::{Cow, Borrow};
|
||||
use std::char::{self, DecodeUtf16};
|
||||
|
@ -180,20 +178,6 @@ impl Atom {
|
|||
}
|
||||
}
|
||||
|
||||
impl BloomHash for Atom {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.get_hash()
|
||||
}
|
||||
}
|
||||
|
||||
impl BloomHash for WeakAtom {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.get_hash()
|
||||
}
|
||||
}
|
||||
|
||||
impl Hash for Atom {
|
||||
fn hash<H>(&self, state: &mut H) where H: Hasher {
|
||||
state.write_u32(self.get_hash());
|
||||
|
@ -270,13 +254,6 @@ impl<'a> From<Cow<'a, str>> for Atom {
|
|||
}
|
||||
}
|
||||
|
||||
impl FromCowStr for Atom {
|
||||
#[inline]
|
||||
fn from_cow_str(string: Cow<str>) -> Atom {
|
||||
Atom::from(&*string)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for Atom {
|
||||
#[inline]
|
||||
fn from(string: String) -> Atom {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use selectors::bloom::BloomHash;
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
|
@ -16,6 +15,8 @@ macro_rules! ns {
|
|||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Default, Hash)]
|
||||
pub struct Namespace(pub Atom);
|
||||
|
||||
#[derive(Hash)]
|
||||
pub struct WeakNamespace(WeakAtom);
|
||||
|
||||
impl Deref for Namespace {
|
||||
|
@ -64,17 +65,3 @@ impl PartialEq for WeakNamespace {
|
|||
weak == other
|
||||
}
|
||||
}
|
||||
|
||||
impl BloomHash for Namespace {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.0.get_hash()
|
||||
}
|
||||
}
|
||||
|
||||
impl BloomHash for WeakNamespace {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.0.get_hash()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue