mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:25:07 +00:00
LibHTML: HtmlView only needs to store the main Frame, not the Document
Remove the Document pointer from HtmlView and always get to it through the main Frame instead. The idea here is to move towards HtmlView being higher-level than the DOM stuff (as much as possible and practical.)
This commit is contained in:
parent
64ce453050
commit
f11c85f4a7
2 changed files with 34 additions and 21 deletions
|
@ -11,8 +11,8 @@ class HtmlView : public GScrollableWidget {
|
|||
public:
|
||||
virtual ~HtmlView() override;
|
||||
|
||||
Document* document() { return m_document; }
|
||||
const Document* document() const { return m_document; }
|
||||
Document* document();
|
||||
const Document* document() const;
|
||||
void set_document(Document*);
|
||||
|
||||
const LayoutDocument* layout_root() const;
|
||||
|
@ -49,7 +49,6 @@ private:
|
|||
void layout_and_sync_size();
|
||||
|
||||
RefPtr<Frame> m_main_frame;
|
||||
RefPtr<Document> m_document;
|
||||
|
||||
bool m_should_show_line_box_borders { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue