mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Simplify the implementation of make_url_or_base_getter.
This commit is contained in:
parent
a3adf6ab75
commit
e282b71596
1 changed files with 5 additions and 6 deletions
|
@ -85,12 +85,11 @@ macro_rules! make_url_or_base_getter(
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
let element: JSRef<Element> = ElementCast::from_ref(self);
|
let element: JSRef<Element> = ElementCast::from_ref(self);
|
||||||
let url = element.get_url_attribute(&Atom::from_slice($htmlname));
|
let url = element.get_url_attribute(&Atom::from_slice($htmlname));
|
||||||
match &*url {
|
if url.is_empty() {
|
||||||
"" => {
|
let window = window_from_node(self).root();
|
||||||
let window = window_from_node(self).root();
|
window.r().get_url().serialize()
|
||||||
window.r().get_url().serialize()
|
} else {
|
||||||
},
|
url
|
||||||
_ => url
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue