mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-21 01:31:55 +00:00
Revert "LibWeb: Set doctype node immediately while parsing XML document"
This reverts commit cd446e5e9c
.
This broke about 20k WPT subtests, all related to XML parsing. See:
https://wpt.fyi/results/html/the-xhtml-syntax/parsing-xhtml-documents?diff=&filter=ADC&run_id=5154815472828416&run_id=5090731742199808
This commit is contained in:
parent
f57ff63432
commit
488034477a
Notes:
github-actions[bot]
2024-11-21 00:12:46 +00:00
Author: https://github.com/trflynn89
Commit: 488034477a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2470
6 changed files with 9 additions and 66 deletions
|
@ -182,6 +182,9 @@ ErrorOr<void, ParseError> Parser::parse_with_listener(Listener& listener)
|
|||
if (result.is_error())
|
||||
m_listener->error(result.error());
|
||||
m_listener->document_end();
|
||||
if (m_doctype.has_value()) {
|
||||
m_listener->set_doctype(m_doctype.release_value());
|
||||
}
|
||||
m_root_node.clear();
|
||||
return result;
|
||||
}
|
||||
|
@ -618,8 +621,7 @@ ErrorOr<void, ParseError> Parser::parse_doctype_decl()
|
|||
TRY(expect(">"sv));
|
||||
|
||||
rollback.disarm();
|
||||
if (m_listener)
|
||||
m_listener->doctype(doctype);
|
||||
m_doctype = move(doctype);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue