mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
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:
parent
8b366a7441
commit
c7b1d3054f
9 changed files with 48 additions and 72 deletions
|
@ -46,7 +46,6 @@ use std::collections::VecDeque;
|
|||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use style::attr::AttrValue;
|
||||
use task_source::TaskSource;
|
||||
use time::{self, Timespec, Duration};
|
||||
|
||||
|
@ -840,7 +839,7 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
|
|||
make_url_getter!(Src, "src");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-media-src
|
||||
make_url_setter!(SetSrc, "src");
|
||||
make_setter!(SetSrc, "src");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-media-srcobject
|
||||
fn GetSrcObject(&self) -> Option<DomRoot<Blob>> {
|
||||
|
@ -915,13 +914,6 @@ impl VirtualMethods for HTMLMediaElement {
|
|||
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
|
||||
}
|
||||
|
||||
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue {
|
||||
match name {
|
||||
&local_name!("src") => AttrValue::from_url(document_from_node(self).base_url(), value.into()),
|
||||
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
||||
}
|
||||
}
|
||||
|
||||
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
|
||||
self.super_type().unwrap().attribute_mutated(attr, mutation);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue