mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Use stylesheet’s base URL and ns prefixes in CSSOM insert/appendRule.
This commit is contained in:
parent
f1d49d3773
commit
70b250fe2a
5 changed files with 24 additions and 20 deletions
|
@ -19,7 +19,7 @@ use parking_lot::RwLock;
|
|||
use std::sync::Arc;
|
||||
use style::keyframes::{Keyframe, KeyframeSelector};
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::stylesheets::{KeyframesRule, Origin};
|
||||
use style::stylesheets::KeyframesRule;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -83,8 +83,7 @@ impl CSSKeyframesRuleMethods for CSSKeyframesRule {
|
|||
fn AppendRule(&self, rule: DOMString) {
|
||||
let global = self.global();
|
||||
let window = global.as_window();
|
||||
let doc = window.Document();
|
||||
let rule = Keyframe::parse(&rule, Origin::Author, doc.url().clone(),
|
||||
let rule = Keyframe::parse(&rule, self.cssrule.parent_stylesheet().style_stylesheet(),
|
||||
ParserContextExtraData::default());
|
||||
if let Ok(rule) = rule {
|
||||
self.keyframesrule.write().keyframes.push(rule);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue