
This is analogous to the DOM's Node.tagName and makes it easy to ask "hey, what kinda thing is this Node?"
31 lines
752 B
C++
31 lines
752 B
C++
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <AK/NonnullRefPtrVector.h>
|
|
#include <AK/OwnPtr.h>
|
|
#include <LibHTML/CSS/StyleResolver.h>
|
|
#include <LibHTML/CSS/StyleSheet.h>
|
|
#include <LibHTML/DOM/ParentNode.h>
|
|
|
|
class LayoutNode;
|
|
class StyleResolver;
|
|
class StyleSheet;
|
|
|
|
class Document : public ParentNode {
|
|
public:
|
|
Document();
|
|
virtual ~Document() override;
|
|
|
|
void normalize();
|
|
|
|
StyleResolver& style_resolver();
|
|
|
|
void add_sheet(const StyleSheet& sheet) { m_sheets.append(sheet); }
|
|
const NonnullRefPtrVector<StyleSheet>& stylesheets() const { return m_sheets; }
|
|
|
|
virtual String tag_name() const override { return "#document"; }
|
|
|
|
private:
|
|
OwnPtr<StyleResolver> m_style_resolver;
|
|
NonnullRefPtrVector<StyleSheet> m_sheets;
|
|
};
|