script: Also do so for element owners.

This commit is contained in:
Emilio Cobos Álvarez 2017-01-27 19:40:15 +01:00
parent 9b06932535
commit 684545b396
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -127,7 +127,7 @@ impl CSSStyleOwner {
fn base_url(&self) -> ServoUrl {
match *self {
CSSStyleOwner::Element(ref el) => window_from_node(&**el).get_url(),
CSSStyleOwner::Element(ref el) => window_from_node(&**el).Document().base_url(),
CSSStyleOwner::CSSRule(ref rule, _) => {
rule.parent_stylesheet().style_stylesheet().base_url.clone()
}