Change AttrValue::Url to AttrValue::ResolvedUrl

There is actually only one attribute that can use that, the one for
<body background>.
This commit is contained in:
Anthony Ramine 2017-10-15 10:59:01 +02:00
parent 8b366a7441
commit c7b1d3054f
9 changed files with 48 additions and 72 deletions

View file

@ -208,7 +208,6 @@ impl VirtualMethods for HTMLLinkElement {
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue {
match name {
&local_name!("href") => AttrValue::from_url(document_from_node(self).base_url(), value.into()),
&local_name!("rel") => AttrValue::from_serialized_tokenlist(value.into()),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
@ -374,7 +373,7 @@ impl HTMLLinkElementMethods for HTMLLinkElement {
make_url_getter!(Href, "href");
// https://html.spec.whatwg.org/multipage/#dom-link-href
make_url_setter!(SetHref, "href");
make_setter!(SetHref, "href");
// https://html.spec.whatwg.org/multipage/#dom-link-rel
make_getter!(Rel, "rel");