diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-10-10 16:14:40 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-10-11 13:56:07 +0200 |
commit | 605c679fee29302321878a74b88aa7165519b516 (patch) | |
tree | c52ffde5e21c61b3a5cbdc5aa308247741bb708d /components/script/dom/macros.rs | |
parent | 826352ab4cae13f5154d13ab53885d80a8057337 (diff) | |
download | servo-605c679fee29302321878a74b88aa7165519b516.tar.gz servo-605c679fee29302321878a74b88aa7165519b516.zip |
Fix URL attributes
URL attributes should always use AttrValue::Url, and the input should be
resolved against the document's base URL at setting time always.
Diffstat (limited to 'components/script/dom/macros.rs')
-rw-r--r-- | components/script/dom/macros.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index 9029a2b694a..68aa8351bb9 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -194,11 +194,8 @@ macro_rules! make_url_setter( fn $attr(&self, value: DOMString) { use dom::bindings::inheritance::Castable; use dom::element::Element; - use dom::node::document_from_node; - let value = AttrValue::from_url(document_from_node(self).url(), - value.into()); let element = self.upcast::<Element>(); - element.set_attribute(&local_name!($htmlname), value); + element.set_url_attribute(&local_name!($htmlname), value); } ); ); |