style: Share custom property declarations if they don't contain variable references.

This commit is contained in:
Emilio Cobos Álvarez 2017-10-08 23:31:46 +02:00
parent 7e143372bd
commit a6eaa0812a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 180 additions and 135 deletions

View file

@ -9,6 +9,7 @@
use Atom;
use cssparser::serialize_identifier;
use custom_properties;
use servo_arc::Arc;
use std::fmt;
use style_traits::ToCss;
@ -153,7 +154,8 @@ pub struct PaintWorklet {
pub name: Atom,
/// The arguments for the worklet.
/// TODO: store a parsed representation of the arguments.
pub arguments: Vec<custom_properties::SpecifiedValue>,
#[cfg_attr(feature = "servo", ignore_heap_size_of = "Arc")]
pub arguments: Vec<Arc<custom_properties::SpecifiedValue>>,
}
trivial_to_computed_value!(PaintWorklet);