mirror of
https://github.com/servo/servo.git
synced 2025-06-29 19:43:39 +01:00
Use UrlExtraData::make_from to avoid manually cloning the ParserContextExtraData contents.
MozReview-Commit-ID: FoCmI6swp5Q
This commit is contained in:
parent
c1abd8797c
commit
333afb61f6
1 changed files with 2 additions and 11 deletions
|
@ -968,17 +968,8 @@ ${helpers.single_keyword("-moz-appearance",
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = context.parse_url(&*try!(input.expect_url()));
|
let url = context.parse_url(&*try!(input.expect_url()));
|
||||||
match context.extra_data {
|
match UrlExtraData::make_from(context) {
|
||||||
ParserContextExtraData {
|
Some(extra_data) => {
|
||||||
base: Some(ref base),
|
|
||||||
referrer: Some(ref referrer),
|
|
||||||
principal: Some(ref principal),
|
|
||||||
} => {
|
|
||||||
let extra_data = UrlExtraData {
|
|
||||||
base: base.clone(),
|
|
||||||
referrer: referrer.clone(),
|
|
||||||
principal: principal.clone(),
|
|
||||||
};
|
|
||||||
Ok(SpecifiedValue::Url(url, extra_data))
|
Ok(SpecifiedValue::Url(url, extra_data))
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue