mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Replace many uses of Attr::Value() by Attr::value()
The later only borrows the attribute, without copying its value as a string.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLObjectElementDerived;
|
||||
@@ -67,8 +66,8 @@ impl<'a> ProcessDataURL for &'a HTMLObjectElement {
|
||||
let elem = ElementCast::from_ref(*self);
|
||||
|
||||
// TODO: support other values
|
||||
match (elem.get_attribute(&ns!(""), &atom!("type")).map(|x| x.r().Value()),
|
||||
elem.get_attribute(&ns!(""), &atom!("data")).map(|x| x.r().Value())) {
|
||||
match (elem.get_attribute(&ns!(""), &atom!("type")),
|
||||
elem.get_attribute(&ns!(""), &atom!("data"))) {
|
||||
(None, Some(_uri)) => {
|
||||
// TODO(gw): Prefetch the image here.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user