mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +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
|
@ -62,7 +62,7 @@ void XMLDocumentBuilder::set_source(ByteString source)
|
|||
m_document->set_source(MUST(String::from_byte_string(source)));
|
||||
}
|
||||
|
||||
void XMLDocumentBuilder::doctype(XML::Doctype const& doctype)
|
||||
void XMLDocumentBuilder::set_doctype(XML::Doctype doctype)
|
||||
{
|
||||
if (m_document->doctype()) {
|
||||
return;
|
||||
|
@ -73,13 +73,13 @@ void XMLDocumentBuilder::doctype(XML::Doctype const& doctype)
|
|||
document_type->set_name(name);
|
||||
|
||||
if (doctype.external_id.has_value()) {
|
||||
auto const& external_id = *doctype.external_id;
|
||||
auto external_id = doctype.external_id.release_value();
|
||||
|
||||
auto system_id = MUST(AK::String::from_byte_string(external_id.system_id.system_literal));
|
||||
document_type->set_system_id(system_id);
|
||||
|
||||
if (external_id.public_id.has_value()) {
|
||||
auto public_id = MUST(AK::String::from_byte_string(external_id.public_id->public_literal));
|
||||
auto public_id = MUST(AK::String::from_byte_string(external_id.public_id.release_value().public_literal));
|
||||
document_type->set_public_id(public_id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue