diff options
author | Stephen Li <stephen.li@D2L.com> | 2015-10-15 13:48:29 -0400 |
---|---|---|
committer | Stephen Li <stephen.li@D2L.com> | 2015-10-15 13:48:29 -0400 |
commit | e83d5a96691b222fccb6ca8b27f6ae0f65562513 (patch) | |
tree | 9974b5493d12c6a344fbbd9d9ac30897289bc1d8 /components/script/parse | |
parent | 5a0a91eba794af027723051c7f039cb22088aa65 (diff) | |
download | servo-e83d5a96691b222fccb6ca8b27f6ae0f65562513.tar.gz servo-e83d5a96691b222fccb6ca8b27f6ae0f65562513.zip |
Issue 8028: `parse_html` should take `Url` rather than `&Url`
Diffstat (limited to 'components/script/parse')
-rw-r--r-- | components/script/parse/html.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs index 239198a55d2..8ff0d23884a 100644 --- a/components/script/parse/html.rs +++ b/components/script/parse/html.rs @@ -262,13 +262,13 @@ pub enum ParseContext<'a> { pub fn parse_html(document: &Document, input: String, - url: &Url, + url: Url, context: ParseContext) { let parser = match context { ParseContext::Owner(owner) => - ServoHTMLParser::new(Some(url.clone()), document, owner), + ServoHTMLParser::new(Some(url), document, owner), ParseContext::Fragment(fc) => - ServoHTMLParser::new_for_fragment(Some(url.clone()), document, fc), + ServoHTMLParser::new_for_fragment(Some(url), document, fc), }; parser.r().parse_chunk(input.into()); } @@ -300,7 +300,7 @@ pub fn parse_html_fragment(context_node: &Node, context_elem: context_node, form_elem: form.r(), }; - parse_html(document.r(), input, &url, ParseContext::Fragment(fragment_context)); + parse_html(document.r(), input, url.clone(), ParseContext::Fragment(fragment_context)); // Step 14. let root_element = document.r().GetDocumentElement().expect("no document element"); |