LibWeb: Make the default XML namespace an empty Optional

Previously, when constructing an XML document, the default namespace
was the empty string. This led to XML documents having empty xmlns
attributes when serialized.
This commit is contained in:
Tim Ledbetter 2024-02-18 14:27:25 +00:00 committed by Andreas Kling
parent 1a249f9d85
commit ee6b0e144a
Notes: sideshowbarker 2024-07-17 16:42:19 +09:00

View File

@ -42,10 +42,10 @@ private:
XMLScriptingSupport m_scripting_support { XMLScriptingSupport::Enabled };
bool m_has_error { false };
StringBuilder text_builder;
FlyString m_namespace;
Optional<FlyString> m_namespace;
struct NamespaceStackEntry {
FlyString ns;
Optional<FlyString> ns;
size_t depth;
};
Vector<NamespaceStackEntry, 2> m_namespace_stack;