mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Measure PropertyDeclaration more thoroughly.
This patch replaces the handwritten MallocSizeOf implementation for PropertyDeclaration with a derived one, which gives much more thorough measurement. This requires (a) deriving MallocSizeOf for a *lot* of additional types (most of which already have `derive(HeapSizeOf)` in Servo builds), and (b) implementing MallocSizeOf for a few more types in the `malloc_size_of` crate. These changes would significantly improve the reporting coverage for gmail if it weren't for the fact that SpecifiedUrl isn't measured due to a lack of clarity about its fields; that can be fixed as a follow-up once bug 1397971 has landed.
This commit is contained in:
parent
1aa8be392b
commit
c5aa2cb986
66 changed files with 302 additions and 59 deletions
|
@ -41,7 +41,7 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
|
|||
use values::generics::CounterStyleOrNone;
|
||||
|
||||
/// <counter-style> | <string> | none
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
pub enum T {
|
||||
CounterStyle(CounterStyleOrNone),
|
||||
String(String),
|
||||
|
@ -104,6 +104,7 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
|
|||
pub mod computed_value {
|
||||
use values::specified::UrlOrNone;
|
||||
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, PartialEq, ToCss)]
|
||||
pub struct T(pub UrlOrNone);
|
||||
|
@ -145,6 +146,7 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
|
|||
pub use self::computed_value::T as SpecifiedValue;
|
||||
|
||||
pub mod computed_value {
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, PartialEq, ToComputedValue)]
|
||||
pub struct T(pub Vec<(String, String)>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue