15
15
#include < LibGfx/Rect.h>
16
16
#include < LibGfx/Size.h>
17
17
#include < LibWeb/DOM/Position.h>
18
+ #include < LibWeb/HTML/BrowsingContextContainer.h>
18
19
#include < LibWeb/Loader/FrameLoader.h>
19
20
#include < LibWeb/Page/EventHandler.h>
20
21
#include < LibWeb/TreeNode.h>
@@ -23,7 +24,7 @@ namespace Web {
23
24
24
25
class BrowsingContext : public TreeNode <BrowsingContext> {
25
26
public:
26
- static NonnullRefPtr<BrowsingContext> create_nested (DOM::Element& host_element , BrowsingContext& top_level_browsing_context) { return adopt_ref (*new BrowsingContext (host_element , top_level_browsing_context)); }
27
+ static NonnullRefPtr<BrowsingContext> create_nested (HTML::BrowsingContextContainer& container , BrowsingContext& top_level_browsing_context) { return adopt_ref (*new BrowsingContext (container , top_level_browsing_context)); }
27
28
static NonnullRefPtr<BrowsingContext> create (Page& page) { return adopt_ref (*new BrowsingContext (page)); }
28
29
~BrowsingContext ();
29
30
@@ -66,8 +67,8 @@ class BrowsingContext : public TreeNode<BrowsingContext> {
66
67
BrowsingContext& top_level_browsing_context () { return *m_top_level_browsing_context; }
67
68
BrowsingContext const & top_level_browsing_context () const { return *m_top_level_browsing_context; }
68
69
69
- DOM::Element* host_element () { return m_host_element ; }
70
- DOM::Element const * host_element () const { return m_host_element ; }
70
+ HTML::BrowsingContextContainer* container () { return m_container ; }
71
+ HTML::BrowsingContextContainer const * container () const { return m_container ; }
71
72
72
73
Gfx::IntPoint to_top_level_position (Gfx::IntPoint const &);
73
74
Gfx::IntRect to_top_level_rect (Gfx::IntRect const &);
@@ -91,8 +92,8 @@ class BrowsingContext : public TreeNode<BrowsingContext> {
91
92
HashMap<URL, size_t > const & frame_nesting_levels () const { return m_frame_nesting_levels; }
92
93
93
94
private:
94
- explicit BrowsingContext (Page&, DOM::Element* host_element , BrowsingContext& top_level_browsing_context);
95
- explicit BrowsingContext (DOM::Element& host_element , BrowsingContext& top_level_browsing_context);
95
+ explicit BrowsingContext (Page&, HTML::BrowsingContextContainer* , BrowsingContext& top_level_browsing_context);
96
+ explicit BrowsingContext (HTML::BrowsingContextContainer& , BrowsingContext& top_level_browsing_context);
96
97
explicit BrowsingContext (Page&);
97
98
98
99
void reset_cursor_blink_cycle ();
@@ -106,7 +107,7 @@ class BrowsingContext : public TreeNode<BrowsingContext> {
106
107
FrameLoader m_loader;
107
108
EventHandler m_event_handler;
108
109
109
- WeakPtr<DOM::Element> m_host_element ;
110
+ WeakPtr<HTML::BrowsingContextContainer> m_container ;
110
111
RefPtr<DOM::Document> m_document;
111
112
Gfx::IntSize m_size;
112
113
Gfx::IntPoint m_viewport_scroll_offset;
0 commit comments