diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-08 11:12:22 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-08 11:12:22 +0200 |
commit | 3a7e26ef2855bcadbea521913529d1ae3cd5004b (patch) | |
tree | 7ec39a60f6323b2d0e88d1b8b3494ce8f2fa520f /Userland/Libraries | |
parent | 9d9500989ad346db2b3891924ef04698caed36ad (diff) | |
download | serenity-3a7e26ef2855bcadbea521913529d1ae3cd5004b.zip |
LibWeb: Rename frame_did_set_viewport_rect() => browsing_context_*()
Names are still catching up after the Frame => BrowsingContext rename.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/ImageBox.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/ImageBox.h | 3 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Page/BrowsingContext.cpp | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Page/BrowsingContext.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp index dfb5bac7d8..ff24df84de 100644 --- a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp @@ -108,7 +108,7 @@ bool ImageBox::renders_as_alt_text() const return false; } -void ImageBox::frame_did_set_viewport_rect(const Gfx::IntRect& viewport_rect) +void ImageBox::browsing_context_did_set_viewport_rect(Gfx::IntRect const& viewport_rect) { m_image_loader.set_visible_in_viewport(viewport_rect.to_type<float>().intersects(absolute_rect())); } diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.h b/Userland/Libraries/LibWeb/Layout/ImageBox.h index c58853d373..e00fe451a9 100644 --- a/Userland/Libraries/LibWeb/Layout/ImageBox.h +++ b/Userland/Libraries/LibWeb/Layout/ImageBox.h @@ -27,7 +27,8 @@ public: bool renders_as_alt_text() const; private: - virtual void frame_did_set_viewport_rect(const Gfx::IntRect&) final; + // ^BrowsingContext::ViewportClient + virtual void browsing_context_did_set_viewport_rect(Gfx::IntRect const&) final; int preferred_width() const; int preferred_height() const; diff --git a/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp b/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp index 182fc4ddf2..eafb709217 100644 --- a/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp @@ -108,7 +108,7 @@ void BrowsingContext::set_viewport_rect(Gfx::IntRect const& rect) if (did_change) { for (auto* client : m_viewport_clients) - client->frame_did_set_viewport_rect(rect); + client->browsing_context_did_set_viewport_rect(rect); } } @@ -123,7 +123,7 @@ void BrowsingContext::set_size(Gfx::IntSize const& size) } for (auto* client : m_viewport_clients) - client->frame_did_set_viewport_rect(viewport_rect()); + client->browsing_context_did_set_viewport_rect(viewport_rect()); } void BrowsingContext::set_viewport_scroll_offset(Gfx::IntPoint const& offset) @@ -133,7 +133,7 @@ void BrowsingContext::set_viewport_scroll_offset(Gfx::IntPoint const& offset) m_viewport_scroll_offset = offset; for (auto* client : m_viewport_clients) - client->frame_did_set_viewport_rect(viewport_rect()); + client->browsing_context_did_set_viewport_rect(viewport_rect()); } void BrowsingContext::set_needs_display(Gfx::IntRect const& rect) diff --git a/Userland/Libraries/LibWeb/Page/BrowsingContext.h b/Userland/Libraries/LibWeb/Page/BrowsingContext.h index 2e9aacc96d..36a3380561 100644 --- a/Userland/Libraries/LibWeb/Page/BrowsingContext.h +++ b/Userland/Libraries/LibWeb/Page/BrowsingContext.h @@ -30,7 +30,7 @@ public: class ViewportClient { public: virtual ~ViewportClient() { } - virtual void frame_did_set_viewport_rect(Gfx::IntRect const&) = 0; + virtual void browsing_context_did_set_viewport_rect(Gfx::IntRect const&) = 0; }; void register_viewport_client(ViewportClient&); void unregister_viewport_client(ViewportClient&); |