mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibXML: Associate prefixed elements with the correct namespace
Previously, any xmlns attributes with an associated prefix were ignored.
This commit is contained in:
parent
88c4f71114
commit
96fc840b03
Notes:
github-actions[bot]
2025-02-25 14:03:41 +00:00
Author: https://github.com/tcl3
Commit: 96fc840b03
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3693
Reviewed-by: https://github.com/gmta ✅
2 changed files with 52 additions and 8 deletions
|
@ -38,15 +38,21 @@ private:
|
|||
virtual void comment(StringView data) override;
|
||||
virtual void document_end() override;
|
||||
|
||||
Optional<FlyString> namespace_for_element(XML::Name const& element_name);
|
||||
|
||||
GC::Ref<DOM::Document> m_document;
|
||||
GC::Ptr<DOM::Node> m_current_node;
|
||||
XMLScriptingSupport m_scripting_support { XMLScriptingSupport::Enabled };
|
||||
bool m_has_error { false };
|
||||
StringBuilder text_builder;
|
||||
Optional<FlyString> m_namespace;
|
||||
|
||||
struct NamespaceAndPrefix {
|
||||
FlyString ns;
|
||||
Optional<ByteString> prefix;
|
||||
};
|
||||
|
||||
struct NamespaceStackEntry {
|
||||
Optional<FlyString> ns;
|
||||
Vector<NamespaceAndPrefix, 2> namespaces;
|
||||
size_t depth;
|
||||
};
|
||||
Vector<NamespaceStackEntry, 2> m_namespace_stack;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue