mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +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
|
@ -71,6 +71,7 @@ ${helpers.single_keyword("image-rendering",
|
|||
const TWO_PI: f64 = 2.0 * PI;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub struct SpecifiedValue {
|
||||
pub angle: Option<Angle>,
|
||||
|
@ -102,6 +103,7 @@ ${helpers.single_keyword("image-rendering",
|
|||
use values::specified::Angle;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub enum Orientation {
|
||||
Angle0 = 0,
|
||||
|
@ -134,6 +136,7 @@ ${helpers.single_keyword("image-rendering",
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub enum T {
|
||||
FromImage,
|
||||
|
@ -257,6 +260,7 @@ ${helpers.single_keyword("image-rendering",
|
|||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, HeapSizeOf, Serialize))]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
pub struct SpecifiedValue(pub bool);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue