1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

LibWeb+WebContent: Keep track of screen rect

It is now possible to get the up-to-date screen rect from a Web::Page.
This commit is contained in:
Linus Groh 2021-04-04 00:12:37 +02:00 committed by Andreas Kling
parent 96b26ec125
commit e8739ddab7
9 changed files with 29 additions and 1 deletions

View file

@ -74,6 +74,7 @@ public:
bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
Gfx::Palette palette() const;
Gfx::IntRect screen_rect() const;
private:
PageClient& m_client;
@ -86,6 +87,7 @@ class PageClient {
public:
virtual bool is_multi_process() const = 0;
virtual Gfx::Palette palette() const = 0;
virtual Gfx::IntRect screen_rect() const = 0;
virtual void page_did_set_document_in_main_frame(DOM::Document*) { }
virtual void page_did_change_title(const String&) { }
virtual void page_did_start_loading(const URL&) { }