1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

LibWeb: Implement <template> parsing

Note that there is currently no way to display them as we can't
currently clone nodes.

Adds special case for templates for dumping to console.
Doesn't add it to the DOM inspector as I'm not sure how to do it.
This commit is contained in:
Luke 2020-08-19 22:30:33 +01:00 committed by Andreas Kling
parent f48feae0b2
commit 7902d215b3
14 changed files with 174 additions and 28 deletions

View file

@ -167,6 +167,13 @@ public:
void set_focused_element(Element*);
bool created_for_appropriate_template_contents() const { return m_created_for_appropriate_template_contents; }
void set_created_for_appropriate_template_contents(bool value) { m_created_for_appropriate_template_contents = value; }
Document* associated_inert_template_document() { return m_associated_inert_template_document; }
const Document* associated_inert_template_document() const { return m_associated_inert_template_document; }
void set_associated_inert_template_document(Document& document) { m_associated_inert_template_document = document; }
private:
virtual RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style) override;
@ -199,6 +206,9 @@ private:
bool m_editable { false };
WeakPtr<Element> m_focused_element;
bool m_created_for_appropriate_template_contents { false };
RefPtr<Document> m_associated_inert_template_document;
};
}