diff options
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 572498aad35..a0667b0b502 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -1660,7 +1660,10 @@ trait ObjectElement { impl<N> ObjectElement for N where N: ThreadSafeLayoutNode { fn has_object_data(&self) -> bool { let elem = self.as_element().unwrap(); - let type_and_data = (elem.get_attr(&ns!(), &atom!("type")), elem.get_attr(&ns!(), &atom!("data"))); + let type_and_data = ( + elem.get_attr(&ns!(), &local_name!("type")), + elem.get_attr(&ns!(), &local_name!("data")), + ); match type_and_data { (None, Some(uri)) => is_image_data(uri), _ => false @@ -1669,7 +1672,10 @@ impl<N> ObjectElement for N where N: ThreadSafeLayoutNode { fn object_data(&self) -> Option<Url> { let elem = self.as_element().unwrap(); - let type_and_data = (elem.get_attr(&ns!(), &atom!("type")), elem.get_attr(&ns!(), &atom!("data"))); + let type_and_data = ( + elem.get_attr(&ns!(), &local_name!("type")), + elem.get_attr(&ns!(), &local_name!("data")), + ); match type_and_data { (None, Some(uri)) if is_image_data(uri) => Url::parse(uri).ok(), _ => None |