mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Reverse the dependency between selectors and malloc_size_of
This commit is contained in:
parent
0929f72709
commit
5a82a1d455
6 changed files with 11 additions and 7 deletions
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -1693,6 +1693,7 @@ dependencies = [
|
||||||
"euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hashglobe 0.1.0",
|
"hashglobe 0.1.0",
|
||||||
"mozjs 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mozjs 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"selectors 0.19.0",
|
||||||
"servo_arc 0.0.1",
|
"servo_arc 0.0.1",
|
||||||
"smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2717,8 +2718,6 @@ dependencies = [
|
||||||
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"malloc_size_of 0.0.1",
|
|
||||||
"malloc_size_of_derive 0.0.1",
|
|
||||||
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -17,6 +17,7 @@ cssparser = "0.23.0"
|
||||||
euclid = "0.16"
|
euclid = "0.16"
|
||||||
hashglobe = { path = "../hashglobe" }
|
hashglobe = { path = "../hashglobe" }
|
||||||
mozjs = { version = "0.1.8", features = ["promises"], optional = true }
|
mozjs = { version = "0.1.8", features = ["promises"], optional = true }
|
||||||
|
selectors = { path = "../selectors" }
|
||||||
servo_arc = { path = "../servo_arc" }
|
servo_arc = { path = "../servo_arc" }
|
||||||
smallbitvec = "1.0.3"
|
smallbitvec = "1.0.3"
|
||||||
smallvec = "0.6"
|
smallvec = "0.6"
|
||||||
|
|
|
@ -49,6 +49,7 @@ extern crate euclid;
|
||||||
extern crate hashglobe;
|
extern crate hashglobe;
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
extern crate mozjs as js;
|
extern crate mozjs as js;
|
||||||
|
extern crate selectors;
|
||||||
extern crate servo_arc;
|
extern crate servo_arc;
|
||||||
extern crate smallbitvec;
|
extern crate smallbitvec;
|
||||||
extern crate smallvec;
|
extern crate smallvec;
|
||||||
|
@ -640,6 +641,13 @@ impl<T: MallocSizeOf, U> MallocSizeOf for euclid::TypedVector2D<T, U> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl MallocSizeOf for selectors::parser::AncestorHashes {
|
||||||
|
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
|
||||||
|
let selectors::parser::AncestorHashes { ref packed_hashes } = *self;
|
||||||
|
packed_hashes.size_of(ops)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
impl<Static: string_cache::StaticAtomSet> MallocSizeOf for string_cache::Atom<Static> {
|
impl<Static: string_cache::StaticAtomSet> MallocSizeOf for string_cache::Atom<Static> {
|
||||||
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
|
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
|
||||||
|
|
|
@ -26,8 +26,6 @@ matches = "0.1"
|
||||||
cssparser = "0.23.0"
|
cssparser = "0.23.0"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
malloc_size_of = { path = "../malloc_size_of" }
|
|
||||||
malloc_size_of_derive = { path = "../malloc_size_of_derive" }
|
|
||||||
phf = "0.7.18"
|
phf = "0.7.18"
|
||||||
precomputed-hash = "0.1"
|
precomputed-hash = "0.1"
|
||||||
servo_arc = { path = "../servo_arc" }
|
servo_arc = { path = "../servo_arc" }
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
#[macro_use] extern crate matches;
|
#[macro_use] extern crate matches;
|
||||||
extern crate fnv;
|
extern crate fnv;
|
||||||
extern crate malloc_size_of;
|
|
||||||
#[macro_use] extern crate malloc_size_of_derive;
|
|
||||||
extern crate phf;
|
extern crate phf;
|
||||||
extern crate precomputed_hash;
|
extern crate precomputed_hash;
|
||||||
#[cfg(test)] #[macro_use] extern crate size_of_test;
|
#[cfg(test)] #[macro_use] extern crate size_of_test;
|
||||||
|
|
|
@ -266,7 +266,7 @@ where
|
||||||
/// off the upper bits) at the expense of making the fourth somewhat more
|
/// off the upper bits) at the expense of making the fourth somewhat more
|
||||||
/// complicated to assemble, because we often bail out before checking all the
|
/// complicated to assemble, because we often bail out before checking all the
|
||||||
/// hashes.
|
/// hashes.
|
||||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
pub struct AncestorHashes {
|
pub struct AncestorHashes {
|
||||||
pub packed_hashes: [u32; 3],
|
pub packed_hashes: [u32; 3],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue