2019-06-15 18:55:47 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/AKString.h>
|
2019-06-29 21:42:07 +02:00
|
|
|
#include <AK/NonnullRefPtrVector.h>
|
|
|
|
#include <AK/OwnPtr.h>
|
|
|
|
#include <LibHTML/CSS/StyleResolver.h>
|
|
|
|
#include <LibHTML/CSS/StyleSheet.h>
|
2019-06-15 23:41:15 +02:00
|
|
|
#include <LibHTML/DOM/ParentNode.h>
|
2019-06-15 18:55:47 +02:00
|
|
|
|
2019-06-15 22:49:44 +02:00
|
|
|
class LayoutNode;
|
2019-06-29 21:42:07 +02:00
|
|
|
class StyleResolver;
|
|
|
|
class StyleSheet;
|
2019-06-15 22:49:44 +02:00
|
|
|
|
2019-06-15 18:55:47 +02:00
|
|
|
class Document : public ParentNode {
|
|
|
|
public:
|
|
|
|
Document();
|
|
|
|
virtual ~Document() override;
|
|
|
|
|
2019-06-29 21:42:07 +02:00
|
|
|
StyleResolver& style_resolver();
|
2019-06-15 22:49:44 +02:00
|
|
|
|
2019-06-29 21:42:07 +02:00
|
|
|
void add_sheet(const StyleSheet& sheet) { m_sheets.append(sheet); }
|
|
|
|
const NonnullRefPtrVector<StyleSheet>& stylesheets() const { return m_sheets; }
|
2019-06-15 22:49:44 +02:00
|
|
|
|
2019-06-15 18:55:47 +02:00
|
|
|
private:
|
2019-06-29 21:42:07 +02:00
|
|
|
OwnPtr<StyleResolver> m_style_resolver;
|
|
|
|
NonnullRefPtrVector<StyleSheet> m_sheets;
|
2019-06-15 18:55:47 +02:00
|
|
|
};
|