From 605c679fee29302321878a74b88aa7165519b516 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 10 Oct 2017 16:14:40 +0200 Subject: 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. --- components/script/dom/macros.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'components/script/dom/macros.rs') 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.set_attribute(&local_name!($htmlname), value); + element.set_url_attribute(&local_name!($htmlname), value); } ); ); -- cgit v1.2.3