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
|
@ -22,7 +22,6 @@
|
|||
use devtools;
|
||||
use document_loader::{LoadType, DocumentLoader, NotifierData};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
||||
use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
|
||||
use dom::bindings::codegen::InheritTypes::{ElementCast, EventTargetCast, NodeCast, EventCast};
|
||||
use dom::bindings::conversions::FromJSValConvertible;
|
||||
|
@ -1798,7 +1797,7 @@ impl ScriptTask {
|
|||
let element = ElementCast::to_ref(target.r()).unwrap();
|
||||
let status = element.get_attribute(&ns!(""), &atom!("href"))
|
||||
.and_then(|href| {
|
||||
let value = href.r().Value();
|
||||
let value = href.value();
|
||||
let url = document.r().url();
|
||||
UrlParser::new().base_url(&url).parse(&value).map(|url| url.serialize()).ok()
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue