mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Derive HeapSizeOf on more Stylesheet-related types
In preparation of storing `Stylesheet`s on nodes.
This commit is contained in:
parent
f1b6c7cc99
commit
068e6a8e9f
5 changed files with 25 additions and 21 deletions
|
@ -9,20 +9,21 @@ use properties::longhands::font_family::parse_one_family;
|
|||
use std::ascii::AsciiExt;
|
||||
use string_cache::Atom;
|
||||
use url::{Url, UrlParser};
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
#[derive(Clone, Debug, HeapSizeOf, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub enum Source {
|
||||
Url(UrlSource),
|
||||
Local(Atom),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
#[derive(Clone, Debug, HeapSizeOf, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub struct UrlSource {
|
||||
pub url: Url,
|
||||
pub format_hints: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
#[derive(Debug, HeapSizeOf, PartialEq, Eq)]
|
||||
pub struct FontFaceRule {
|
||||
pub family: Atom,
|
||||
pub sources: Vec<Source>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue