diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-06-28 12:12:14 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-07-02 15:49:40 +0200 |
commit | 12630757762b99c509661ddb524daff0d153c423 (patch) | |
tree | ee752c55df7a8918f158486759850926dd31f969 /components/script/dom/csskeyframesrule.rs | |
parent | fd65ac8924dd75b1f80e2cf048f64e11d3387976 (diff) | |
download | servo-12630757762b99c509661ddb524daff0d153c423.tar.gz servo-12630757762b99c509661ddb524daff0d153c423.zip |
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.
Diffstat (limited to 'components/script/dom/csskeyframesrule.rs')
-rw-r--r-- | components/script/dom/csskeyframesrule.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script/dom/csskeyframesrule.rs b/components/script/dom/csskeyframesrule.rs index 469f9b7d026..888f945caa7 100644 --- a/components/script/dom/csskeyframesrule.rs +++ b/components/script/dom/csskeyframesrule.rs @@ -82,7 +82,13 @@ impl CSSKeyframesRuleMethods for CSSKeyframesRule { // https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-appendrule fn AppendRule(&self, rule: DOMString) { - let rule = Keyframe::parse(&rule, self.cssrule.parent_stylesheet().style_stylesheet()); + let style_stylesheet = self.cssrule.parent_stylesheet().style_stylesheet(); + let rule = Keyframe::parse( + &rule, + &style_stylesheet.contents, + &style_stylesheet.shared_lock + ); + if let Ok(rule) = rule { let mut guard = self.cssrule.shared_lock().write(); self.keyframesrule.write_with(&mut guard).keyframes.push(rule); |