Transitively deparent on removal

Chrome and Firefox do this already, probably a spec oversight
This commit is contained in:
Manish Goregaokar 2016-11-16 17:48:54 -08:00
parent 53c99662bc
commit cada5d7c03
4 changed files with 32 additions and 8 deletions

View file

@ -55,7 +55,8 @@ impl CSSKeyframesRule {
}
impl CSSKeyframesRuleMethods for CSSKeyframesRule {
fn CssRules(&self) -> Root<CSSRuleList> {
// https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-cssrules
fn CssRules(&self) -> Root<CSSRuleList> {
self.rulelist()
}
}
@ -69,4 +70,8 @@ impl SpecificCSSRule for CSSKeyframesRule {
fn get_css(&self) -> DOMString {
self.keyframesrule.read().to_css_string().into()
}
fn deparent_children(&self) {
self.rulelist.get().map(|list| list.deparent_all());
}
}