mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Make XBL / Shadow DOM use something more light-weight than a Stylist.
It's just a struct aggregating stylesheets + CascadeData, with a quirks_mode parameter because XBL sucks so bad. Bug: 1436059 Reviewed-by: xidorn MozReview-Commit-ID: 7q99tSNXo0K
This commit is contained in:
parent
a6113af873
commit
5e64cb3516
9 changed files with 225 additions and 44 deletions
|
@ -1983,7 +1983,8 @@ pub struct CascadeData {
|
|||
}
|
||||
|
||||
impl CascadeData {
|
||||
fn new() -> Self {
|
||||
/// Creates an empty `CascadeData`.
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
normal_rules: ElementAndPseudoRules::default(),
|
||||
slotted_rules: None,
|
||||
|
@ -2005,7 +2006,7 @@ impl CascadeData {
|
|||
|
||||
/// Rebuild the cascade data from a given SheetCollection, incrementally if
|
||||
/// possible.
|
||||
fn rebuild<'a, S>(
|
||||
pub fn rebuild<'a, S>(
|
||||
&mut self,
|
||||
device: &Device,
|
||||
quirks_mode: QuirksMode,
|
||||
|
@ -2281,7 +2282,7 @@ impl CascadeData {
|
|||
|
||||
/// Returns whether all the media-feature affected values matched before and
|
||||
/// match now in the given stylesheet.
|
||||
fn media_feature_affected_matches<S>(
|
||||
pub fn media_feature_affected_matches<S>(
|
||||
&self,
|
||||
stylesheet: &S,
|
||||
guard: &SharedRwLockReadGuard,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue