mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Make Frame::page_view() always go via main_frame()
When you ask a subframe for its PageView, you'll now always get the main frame's PageView. Subframes don't have a PageView of their own.
This commit is contained in:
parent
be6abce44f
commit
37b21cfd7d
Notes:
sideshowbarker
2024-07-19 05:47:55 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/37b21cfd7df
1 changed files with 4 additions and 2 deletions
|
@ -47,13 +47,15 @@ public:
|
|||
static NonnullRefPtr<Frame> create(PageView& page_view) { return adopt(*new Frame(page_view)); }
|
||||
~Frame();
|
||||
|
||||
bool is_main_frame() const { return this == &m_main_frame; }
|
||||
|
||||
const Document* document() const { return m_document; }
|
||||
Document* document() { return m_document; }
|
||||
|
||||
void set_document(Document*);
|
||||
|
||||
PageView* page_view() { return m_page_view; }
|
||||
const PageView* page_view() const { return m_page_view; }
|
||||
PageView* page_view() { return is_main_frame() ? m_page_view : main_frame().m_page_view; }
|
||||
const PageView* page_view() const{ return is_main_frame() ? m_page_view : main_frame().m_page_view; }
|
||||
|
||||
const Gfx::Size& size() const { return m_size; }
|
||||
void set_size(const Gfx::Size&);
|
||||
|
|
Loading…
Add table
Reference in a new issue