mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-06 03:02:55 +00:00
We now create a layout tree directly from the DOM tree. This way we don't actually lose text nodes ^)
27 lines
573 B
C++
27 lines
573 B
C++
#pragma once
|
|
|
|
#include <AK/NonnullRefPtrVector.h>
|
|
#include <AK/OwnPtr.h>
|
|
#include <LibHTML/CSS/StyleProperties.h>
|
|
|
|
class Document;
|
|
class Element;
|
|
class ParentNode;
|
|
class StyleRule;
|
|
class StyleSheet;
|
|
|
|
class StyleResolver {
|
|
public:
|
|
explicit StyleResolver(Document&);
|
|
~StyleResolver();
|
|
|
|
Document& document() { return m_document; }
|
|
const Document& document() const { return m_document; }
|
|
|
|
StyleProperties resolve_style(const Element&);
|
|
|
|
NonnullRefPtrVector<StyleRule> collect_matching_rules(const Element&) const;
|
|
|
|
private:
|
|
Document& m_document;
|
|
};
|