2019-06-27 15:47:59 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/NonnullRefPtrVector.h>
|
2019-09-21 12:32:17 +00:00
|
|
|
#include <AK/OwnPtr.h>
|
|
|
|
#include <LibHTML/CSS/StyleProperties.h>
|
2019-06-27 15:47:59 +00:00
|
|
|
|
|
|
|
class Document;
|
|
|
|
class Element;
|
2019-06-28 19:17:34 +00:00
|
|
|
class ParentNode;
|
2019-06-27 18:40:21 +00:00
|
|
|
class StyleRule;
|
2019-06-27 15:47:59 +00:00
|
|
|
class StyleSheet;
|
|
|
|
|
|
|
|
class StyleResolver {
|
|
|
|
public:
|
|
|
|
explicit StyleResolver(Document&);
|
|
|
|
~StyleResolver();
|
|
|
|
|
|
|
|
Document& document() { return m_document; }
|
|
|
|
const Document& document() const { return m_document; }
|
|
|
|
|
2019-10-04 10:12:39 +00:00
|
|
|
NonnullRefPtr<StyleProperties> resolve_style(const Element&, const StyleProperties* parent_properties) const;
|
2019-06-27 15:47:59 +00:00
|
|
|
|
2019-06-27 18:40:21 +00:00
|
|
|
NonnullRefPtrVector<StyleRule> collect_matching_rules(const Element&) const;
|
|
|
|
|
2019-06-27 15:47:59 +00:00
|
|
|
private:
|
|
|
|
Document& m_document;
|
|
|
|
};
|