mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Use parse_html
in DOMParser.
This commit is contained in:
parent
fbf42c951b
commit
96f73d67d4
2 changed files with 12 additions and 10 deletions
|
@ -168,7 +168,10 @@ pub fn parse_html(document: JSRef<Document>,
|
|||
let parser = ServoHTMLParser::new(Some(url.clone()), document).root();
|
||||
let parser: JSRef<ServoHTMLParser> = *parser;
|
||||
|
||||
task_state::enter(IN_HTML_PARSER);
|
||||
let nested_parse = task_state::get().contains(task_state::IN_HTML_PARSER);
|
||||
if !nested_parse {
|
||||
task_state::enter(IN_HTML_PARSER);
|
||||
}
|
||||
|
||||
match input {
|
||||
HTMLInput::InputString(s) => {
|
||||
|
@ -201,7 +204,9 @@ pub fn parse_html(document: JSRef<Document>,
|
|||
|
||||
parser.finish();
|
||||
|
||||
task_state::exit(IN_HTML_PARSER);
|
||||
if !nested_parse {
|
||||
task_state::exit(IN_HTML_PARSER);
|
||||
}
|
||||
|
||||
debug!("finished parsing");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue