LibWeb: Port DocumentType from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-08-12 21:30:17 +12:00 committed by Andreas Kling
parent 9117bcfd61
commit ebdfe2e863
Notes: sideshowbarker 2024-07-16 16:23:32 +09:00
4 changed files with 18 additions and 17 deletions

View file

@ -497,9 +497,9 @@ void HTMLParser::handle_initial(HTMLToken& token)
if (token.is_doctype()) {
auto doctype = realm().heap().allocate<DOM::DocumentType>(realm(), document());
doctype->set_name(token.doctype_data().name);
doctype->set_public_id(token.doctype_data().public_identifier);
doctype->set_system_id(token.doctype_data().system_identifier);
doctype->set_name(String::from_deprecated_string(token.doctype_data().name).release_value());
doctype->set_public_id(String::from_deprecated_string(token.doctype_data().public_identifier).release_value());
doctype->set_system_id(String::from_deprecated_string(token.doctype_data().system_identifier).release_value());
MUST(document().append_child(*doctype));
document().set_quirks_mode(which_quirks_mode(token));
m_insertion_mode = InsertionMode::BeforeHTML;