mirror of
https://github.com/servo/servo.git
synced 2025-06-28 19:13:41 +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()));
|
||||
match context.extra_data {
|
||||
ParserContextExtraData {
|
||||
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(),
|
||||
};
|
||||
match UrlExtraData::make_from(context) {
|
||||
Some(extra_data) => {
|
||||
Ok(SpecifiedValue::Url(url, extra_data))
|
||||
},
|
||||
_ => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue