mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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:
parent
fd65ac8924
commit
1263075776
38 changed files with 3818 additions and 2931 deletions
|
@ -57,10 +57,14 @@ impl CSSStyleSheet {
|
|||
}
|
||||
|
||||
fn rulelist(&self) -> Root<CSSRuleList> {
|
||||
self.rulelist.or_init(|| CSSRuleList::new(self.global().as_window(),
|
||||
self,
|
||||
RulesSource::Rules(self.style_stylesheet
|
||||
.rules.clone())))
|
||||
self.rulelist.or_init(|| {
|
||||
let rules = self.style_stylesheet.contents.rules.clone();
|
||||
CSSRuleList::new(
|
||||
self.global().as_window(),
|
||||
self,
|
||||
RulesSource::Rules(rules)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn disabled(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue