1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

LibWeb: Implement "create a new browsing context and document"

Co-authored-by: Andreas Kling <kling@serenityos.org>
This commit is contained in:
Aliaksandr Kalenik 2023-04-23 19:31:46 +03:00 committed by Andreas Kling
parent 6871fbce9f
commit 3b00636288
4 changed files with 196 additions and 4 deletions

View file

@ -40,6 +40,14 @@ public:
static JS::NonnullGCPtr<BrowsingContext> create_a_new_browsing_context(Page&, JS::GCPtr<DOM::Document> creator, JS::GCPtr<DOM::Element> embedder, BrowsingContextGroup&);
static JS::NonnullGCPtr<BrowsingContext> create_a_new_top_level_browsing_context(Page&);
struct BrowsingContextAndDocument {
JS::NonnullGCPtr<BrowsingContext> browsing_context;
JS::NonnullGCPtr<DOM::Document> document;
};
static WebIDL::ExceptionOr<BrowsingContextAndDocument> create_a_new_browsing_context_and_document(Page& page, JS::GCPtr<DOM::Document> creator, JS::GCPtr<DOM::Element> embedder, JS::NonnullGCPtr<BrowsingContextGroup> group);
static WebIDL::ExceptionOr<BrowsingContextAndDocument> create_a_new_auxiliary_browsing_context_and_document(Page& page, JS::NonnullGCPtr<HTML::BrowsingContext> opener);
virtual ~BrowsingContext() override;
JS::NonnullGCPtr<HTML::TraversableNavigable> top_level_traversable() const;
@ -129,6 +137,8 @@ public:
virtual HTML::WindowProxy* window_proxy() override;
virtual HTML::WindowProxy const* window_proxy() const override;
void set_window_proxy(JS::GCPtr<WindowProxy>);
HTML::Window* active_window();
HTML::Window const* active_window() const;