aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmediaelement.rs
diff options
context:
space:
mode:
authorDan Robertson <dan@dlrobertson.com>2018-12-14 03:59:03 +0000
committerDan Robertson <dan@dlrobertson.com>2018-12-17 15:28:42 +0000
commitc46508e497e503c8fd42deb26aa536060334a9c9 (patch)
tree526fba0f92f508c9e54559cde967241dd118378f /components/script/dom/htmlmediaelement.rs
parent1e983d86c05d988779177775ee1ef9b835400960 (diff)
downloadservo-c46508e497e503c8fd42deb26aa536060334a9c9.tar.gz
servo-c46508e497e503c8fd42deb26aa536060334a9c9.zip
Update src/href attributes to be a USVString
The following IDLs have the src/href attributes typed as a DOMString while in the spec the attribute has been updated to be a USVString: - HTMLIFrameElement - HTMLImageElement - HTMLInputElement - HTMLLinkElement - HTMLMediaElement - HTMLScriptElement
Diffstat (limited to 'components/script/dom/htmlmediaelement.rs')
-rw-r--r--components/script/dom/htmlmediaelement.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 7246ea90c5b..ee43992a27f 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -21,7 +21,7 @@ use crate::dom::bindings::num::Finite;
use crate::dom::bindings::refcounted::Trusted;
use crate::dom::bindings::reflector::DomObject;
use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
-use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::str::{DOMString, USVString};
use crate::dom::blob::Blob;
use crate::dom::document::Document;
use crate::dom::element::{AttributeMutation, Element};
@@ -1279,7 +1279,7 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
make_url_getter!(Src, "src");
// https://html.spec.whatwg.org/multipage/#dom-media-src
- make_setter!(SetSrc, "src");
+ make_url_setter!(SetSrc, "src");
// https://html.spec.whatwg.org/multipage/#dom-media-srcobject
fn GetSrcObject(&self) -> Option<DomRoot<Blob>> {
@@ -1299,8 +1299,8 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
make_setter!(SetPreload, "preload");
// https://html.spec.whatwg.org/multipage/#dom-media-currentsrc
- fn CurrentSrc(&self) -> DOMString {
- DOMString::from(self.current_src.borrow().clone())
+ fn CurrentSrc(&self) -> USVString {
+ USVString(self.current_src.borrow().clone())
}
// https://html.spec.whatwg.org/multipage/#dom-media-load