mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01: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:
parent
105d990845
commit
51418fc348
5 changed files with 30 additions and 28 deletions
|
@ -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.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue