mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Measure selectors.
This patch adds measurement of Selectors within StyleRule. This requires exposing the pointer within ThinArc. The patch also adds measurement of the several CssRule variants, in order to measure nested CssRules (and PropertyDeclarationBlocks) within them: DocumentRule, MediaRule, PageRule, SupportsRule.
This commit is contained in:
parent
812cac78f0
commit
61877b7316
8 changed files with 95 additions and 15 deletions
|
@ -423,7 +423,6 @@ impl<Impl: SelectorImpl> Selector<Impl> {
|
|||
))
|
||||
}
|
||||
|
||||
|
||||
/// Returns an iterator over this selector in matching order (right-to-left).
|
||||
/// When a combinator is reached, the iterator will return None, and
|
||||
/// next_sequence() may be called to continue to the next sequence.
|
||||
|
@ -494,6 +493,11 @@ impl<Impl: SelectorImpl> Selector<Impl> {
|
|||
pub fn len(&self) -> usize {
|
||||
self.0.slice.len()
|
||||
}
|
||||
|
||||
/// Returns the address on the heap of the ThinArc for memory reporting.
|
||||
pub fn thin_arc_heap_ptr(&self) -> *const ::std::os::raw::c_void {
|
||||
self.0.heap_ptr()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue