mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Overhaul ComputedValues measurement, and add style structs measurement.
This commit is contained in:
parent
60c44b072c
commit
1a40101d2f
4 changed files with 77 additions and 44 deletions
|
@ -60,7 +60,6 @@ use selector_parser::PseudoElement;
|
|||
use servo_arc::{Arc, RawOffsetArc};
|
||||
use std::mem::{forget, uninitialized, transmute, zeroed};
|
||||
use std::{cmp, ops, ptr};
|
||||
use stylesheets::{MallocSizeOfWithRepeats, SizeOfState};
|
||||
use values::{self, Auto, CustomIdent, Either, KeyframesName};
|
||||
use values::computed::{NonNegativeAu, ToComputedValue, Percentage};
|
||||
use values::computed::effects::{BoxShadow, Filter, SimpleShadow};
|
||||
|
@ -369,18 +368,6 @@ impl ComputedValuesInner {
|
|||
}
|
||||
}
|
||||
|
||||
impl MallocSizeOfWithRepeats for ComputedValues {
|
||||
fn malloc_size_of_children(&self, state: &mut SizeOfState) -> usize {
|
||||
let mut n = 0;
|
||||
if let Some(ref raw_offset_arc) = *self.get_raw_visited_style() {
|
||||
n += raw_offset_arc.with_arc(|a: &Arc<ComputedValues>| {
|
||||
a.malloc_size_of_children(state)
|
||||
})
|
||||
}
|
||||
n
|
||||
}
|
||||
}
|
||||
|
||||
<%def name="declare_style_struct(style_struct)">
|
||||
pub use ::gecko_bindings::structs::mozilla::Gecko${style_struct.gecko_name} as ${style_struct.gecko_struct_name};
|
||||
impl ${style_struct.gecko_struct_name} {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue