mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
7bc9310170
Each HtmlView now has a main_frame(), which represents the main frame of the web page. Frame inherits from TreeNode<Frame>, which will allow us to someday implement a Frame tree (to support the <frame> element.)
31 lines
631 B
C++
31 lines
631 B
C++
#pragma once
|
|
|
|
#include <AK/Noncopyable.h>
|
|
#include <AK/RefPtr.h>
|
|
#include <AK/Weakable.h>
|
|
#include <LibDraw/Size.h>
|
|
#include <LibHTML/TreeNode.h>
|
|
|
|
class Document;
|
|
|
|
class Frame
|
|
: public TreeNode<Frame>
|
|
, public Weakable<Frame> {
|
|
public:
|
|
static NonnullRefPtr<Frame> create() { return adopt(*new Frame); }
|
|
~Frame();
|
|
|
|
const Document* document() const { return m_document; }
|
|
Document* document() { return m_document; }
|
|
|
|
void set_document(Document*);
|
|
|
|
const Size& size() const { return m_size; }
|
|
void set_size(const Size&);
|
|
|
|
private:
|
|
Frame();
|
|
|
|
RefPtr<Document> m_document;
|
|
Size m_size;
|
|
};
|