1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 05:35:07 +00:00
serenity/LibHTML/DOM/Document.h
Andreas Kling 7eef69ad4b LibHTML: Refactor to go from DOM -> styled tree -> layout tree.
Frame::layout() drives everything now, it takes the DOM contained in the
frame and puts it through the tree transformations.
2019-06-29 21:42:07 +02:00

27 lines
661 B
C++

#pragma once
#include <AK/AKString.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;
StyleResolver& style_resolver();
void add_sheet(const StyleSheet& sheet) { m_sheets.append(sheet); }
const NonnullRefPtrVector<StyleSheet>& stylesheets() const { return m_sheets; }
private:
OwnPtr<StyleResolver> m_style_resolver;
NonnullRefPtrVector<StyleSheet> m_sheets;
};