1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibWeb: Detect when an XML document belongs in the SVG namespace

We currently parse all XML documents as belonging in the HTML namespace.
Switch to the SVG namespace when parsing an SVG document.
This commit is contained in:
Timothy Flynn 2023-06-08 11:37:08 -04:00 committed by Andreas Kling
parent b6228507ac
commit c8d8640018
2 changed files with 14 additions and 4 deletions

View file

@ -11,6 +11,7 @@
#include <LibWeb/DOM/ElementFactory.h>
#include <LibWeb/DOM/Node.h>
#include <LibWeb/DOM/Text.h>
#include <LibWeb/Namespace.h>
#include <LibXML/Parser/Parser.h>
namespace Web {
@ -41,6 +42,7 @@ private:
XMLScriptingSupport m_scripting_support { XMLScriptingSupport::Enabled };
bool m_has_error { false };
StringBuilder text_builder;
DeprecatedFlyString m_namespace { Namespace::HTML };
};
}