style: Move the StyleSheetSet into the Stylist.

This will allow tracking whether there have been only additions to the
stylesheet set, and in that case don't destroy and completely rebuild the
invalidation map.
This commit is contained in:
Emilio Cobos Álvarez 2017-08-21 15:13:06 +02:00
parent 02b203891f
commit cbf388a5fd
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 399 additions and 316 deletions

View file

@ -279,7 +279,11 @@ impl StylesheetInDocument for Stylesheet {
/// A simple wrapper over an `Arc<Stylesheet>`, with pointer comparison, and
/// suitable for its use in a `StylesheetSet`.
#[derive(Clone)]
pub struct DocumentStyleSheet(pub Arc<Stylesheet>);
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct DocumentStyleSheet(
#[cfg_attr(feature = "servo", ignore_heap_size_of = "Arc")]
pub Arc<Stylesheet>
);
impl PartialEq for DocumentStyleSheet {
fn eq(&self, other: &Self) -> bool {