mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
Ladybird/WebView: Close top-level BC when the WebView is destroyed
This commit is contained in:
parent
f043d4b654
commit
3610ac5e19
2 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,11 @@ PageClientLadybird::PageClientLadybird(WebView& view)
|
|||
{
|
||||
}
|
||||
|
||||
PageClientLadybird::~PageClientLadybird()
|
||||
{
|
||||
m_page->top_level_browsing_context().close();
|
||||
}
|
||||
|
||||
Web::Layout::InitialContainingBlock* PageClientLadybird::layout_root()
|
||||
{
|
||||
auto* document = page().top_level_browsing_context().active_document();
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Ladybird {
|
|||
class PageClientLadybird final : public Web::PageClient {
|
||||
public:
|
||||
static NonnullOwnPtr<PageClientLadybird> create(WebView&);
|
||||
virtual ~PageClientLadybird() override;
|
||||
|
||||
Web::Page& page() { return *m_page; }
|
||||
Web::Page const& page() const { return *m_page; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue