script: Fix base url for style-rule-owned declarations.

This commit is contained in:
Emilio Cobos Álvarez 2017-01-27 19:39:00 +01:00
parent dd90366775
commit 9b06932535
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 24 additions and 11 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::{self, CSSKeyframeRuleMethods};
use dom::bindings::inheritance::Castable;
use dom::bindings::js::{JS, MutNullableJS, Root};
use dom::bindings::reflector::{DomObject, reflect_dom_object};
use dom::bindings::str::DOMString;
@ -47,8 +48,8 @@ impl CSSKeyframeRuleMethods for CSSKeyframeRule {
fn Style(&self) -> Root<CSSStyleDeclaration> {
self.style_decl.or_init(|| {
CSSStyleDeclaration::new(self.global().as_window(),
CSSStyleOwner::CSSRule(JS::from_ref(self.global().as_window()),
self.keyframerule.read().block.clone()),
CSSStyleOwner::CSSRule(JS::from_ref(self.upcast()),
self.keyframerule.read().block.clone()),
None,
CSSModificationAccess::ReadWrite)
})