1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibWeb: Remove unnecessary on_foo hooks from Frame

Frame can just call through the PageClient instead of using hooks.
This commit is contained in:
Andreas Kling 2020-06-08 21:31:53 +02:00
parent 5042e560ef
commit e04d68a03a
4 changed files with 5 additions and 22 deletions

View file

@ -66,8 +66,7 @@ void Frame::set_document(Document* document)
if (m_document)
m_document->attach_to_frame({}, *this);
if (on_set_document)
on_set_document(m_document);
page().client().page_did_set_document_in_main_frame(m_document);
}
void Frame::set_size(const Gfx::Size& size)

View file

@ -60,10 +60,7 @@ public:
void set_needs_display(const Gfx::Rect&);
Function<void(const String&)> on_title_change;
Function<void(const URL&)> on_load_start;
Function<void(const Gfx::Bitmap&)> on_favicon_change;
Function<void(Document*)> on_set_document;
void set_viewport_rect(const Gfx::Rect&);
Gfx::Rect viewport_rect() const { return m_viewport_rect; }