LibWeb: Fix boolean logic mistake in XMLSerializer for empty public ID

Fixes 5 subtests on http://wpt.live/domparsing/xml-serialization.xhtml
This commit is contained in:
Vincent Sgherzi 2024-10-07 01:36:42 -07:00 committed by Andreas Kling
parent d81f31c699
commit 9ce139a3f0
Notes: github-actions[bot] 2024-10-21 08:53:58 +00:00

View file

@ -839,7 +839,7 @@ static WebIDL::ExceptionOr<String> serialize_document_type(DOM::DocumentType con
} }
// 8. If the node's systemId is not the empty string and the node's publicId is set to the empty string, then append the following, in the order listed, to markup: // 8. If the node's systemId is not the empty string and the node's publicId is set to the empty string, then append the following, in the order listed, to markup:
if (!document_type.system_id().is_empty() && !document_type.public_id().is_empty()) { if (!document_type.system_id().is_empty() && document_type.public_id().is_empty()) {
// 1. " " (U+0020 SPACE); // 1. " " (U+0020 SPACE);
// 2. The string "SYSTEM". // 2. The string "SYSTEM".
markup.append(" SYSTEM"sv); markup.append(" SYSTEM"sv);