1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

LibHTML: Get rid of the style tree

We now create a layout tree directly from the DOM tree.
This way we don't actually lose text nodes ^)
This commit is contained in:
Sergey Bugaev 2019-09-21 15:32:17 +03:00 committed by Andreas Kling
parent a9ebd676e5
commit fd0aa5dd43
22 changed files with 126 additions and 261 deletions

View file

@ -1,14 +1,14 @@
#pragma once
#include <AK/OwnPtr.h>
#include <AK/NonnullRefPtrVector.h>
#include <AK/OwnPtr.h>
#include <LibHTML/CSS/StyleProperties.h>
class Document;
class Element;
class ParentNode;
class StyleRule;
class StyleSheet;
class StyledNode;
class StyleResolver {
public:
@ -18,12 +18,10 @@ public:
Document& document() { return m_document; }
const Document& document() const { return m_document; }
NonnullRefPtr<StyledNode> create_styled_node(const Element&);
NonnullRefPtr<StyledNode> create_styled_node(const Document&);
StyleProperties resolve_style(const Element&);
NonnullRefPtrVector<StyleRule> collect_matching_rules(const Element&) const;
private:
Document& m_document;
};