stylo: Fix StyleSheetInner/Stylesheet mapping

The key of this patch is the split between Stylesheet and StylesheetContents.

Gecko will use StylesheetContents, which maps to a ServoStyleSheetInner.
This commit is contained in:
Emilio Cobos Álvarez 2017-06-28 12:12:14 -07:00
parent fd65ac8924
commit 1263075776
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
38 changed files with 3818 additions and 2931 deletions

View file

@ -27,6 +27,13 @@ use stylesheets::{NestedRuleIterationCondition, Stylesheet};
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct MediaListKey(usize);
impl MediaListKey {
/// Create a MediaListKey from a raw usize.
pub fn from_raw(k: usize) -> Self {
MediaListKey(k)
}
}
/// A trait to get a given `MediaListKey` for a given item that can hold a
/// `MediaList`.
pub trait ToMediaListKey : Sized {