aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlinputelement.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-10-10 16:14:40 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-10-11 13:56:07 +0200
commit605c679fee29302321878a74b88aa7165519b516 (patch)
treec52ffde5e21c61b3a5cbdc5aa308247741bb708d /components/script/dom/htmlinputelement.rs
parent826352ab4cae13f5154d13ab53885d80a8057337 (diff)
downloadservo-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/htmlinputelement.rs')
-rwxr-xr-xcomponents/script/dom/htmlinputelement.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index ce76eb8ced5..3a16551d4c3 100755
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -1056,6 +1056,7 @@ impl VirtualMethods for HTMLInputElement {
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()),
&local_name!("accept") => AttrValue::from_comma_separated_tokenlist(value.into()),
&local_name!("name") => AttrValue::from_atomic(value.into()),
&local_name!("size") => AttrValue::from_limited_u32(value.into(), DEFAULT_INPUT_SIZE),