mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb: Implement fragment parsing and use it for Element.innerHTML
This patch implements most of the HTML fragment parsing algorithm and ports Element::set_inner_html() to it. This was the last remaining user of the old HTML parser. :^)
This commit is contained in:
@@ -91,8 +91,8 @@ public:
|
||||
|
||||
virtual String text_content() const;
|
||||
|
||||
Document& document() { return m_document; }
|
||||
const Document& document() const { return m_document; }
|
||||
Document& document() { return *m_document; }
|
||||
const Document& document() const { return *m_document; }
|
||||
|
||||
const HTMLAnchorElement* enclosing_link_element() const;
|
||||
const HTMLElement* enclosing_html_element() const;
|
||||
@@ -140,10 +140,12 @@ public:
|
||||
virtual void document_did_attach_to_frame(Frame&) {}
|
||||
virtual void document_will_detach_from_frame(Frame&) {}
|
||||
|
||||
void set_document(Badge<Document>, Document&);
|
||||
|
||||
protected:
|
||||
Node(Document&, NodeType);
|
||||
|
||||
Document& m_document;
|
||||
Document* m_document { nullptr };
|
||||
mutable LayoutNode* m_layout_node { nullptr };
|
||||
NodeType m_type { NodeType::INVALID };
|
||||
bool m_needs_style_update { true };
|
||||
|
||||
Reference in New Issue
Block a user