Add support for keyframe-backed CSSRules, CSSKeyframesRule.cssRules and CSSKeyframeRule

This commit is contained in:
Manish Goregaokar 2016-11-16 16:22:42 -08:00
parent 2793d5f0a9
commit 52a3a71be3
8 changed files with 143 additions and 18 deletions

View file

@ -8,7 +8,7 @@ use dom::bindings::error::{ErrorResult, Fallible};
use dom::bindings::js::{JS, Root, MutNullableHeap};
use dom::bindings::reflector::{reflect_dom_object, Reflectable};
use dom::bindings::str::DOMString;
use dom::cssrulelist::CSSRuleList;
use dom::cssrulelist::{CSSRuleList, RulesSource};
use dom::stylesheet::StyleSheet;
use dom::window::Window;
use std::sync::Arc;
@ -45,7 +45,8 @@ impl CSSStyleSheet {
fn rulelist(&self) -> Root<CSSRuleList> {
self.rulelist.or_init(|| CSSRuleList::new(self.global().as_window(),
self,
self.style_stylesheet.rules.clone()))
RulesSource::Rules(self.style_stylesheet
.rules.clone())))
}
}