LibWeb+WebContent: Delete unused page_did_layout()

This commit is contained in:
Aliaksandr Kalenik 2025-07-17 05:17:34 +02:00 committed by Jelle Raaijmakers
commit aa31b69e7e
Notes: github-actions[bot] 2025-07-17 06:25:29 +00:00
4 changed files with 0 additions and 20 deletions

View file

@ -1393,10 +1393,6 @@ void Document::update_layout(UpdateLayoutReason reason)
update_paint_and_hit_testing_properties_if_needed(); update_paint_and_hit_testing_properties_if_needed();
paintable()->assign_clip_frames(); paintable()->assign_clip_frames();
if (navigable->is_traversable()) {
page().client().page_did_layout();
}
if (auto range = get_selection()->range()) { if (auto range = get_selection()->range()) {
paintable()->recompute_selection_states(*range); paintable()->recompute_selection_states(*range);
} }

View file

@ -351,7 +351,6 @@ public:
virtual void page_did_hover_link(URL::URL const&) { } virtual void page_did_hover_link(URL::URL const&) { }
virtual void page_did_unhover_link() { } virtual void page_did_unhover_link() { }
virtual void page_did_change_favicon(Gfx::Bitmap const&) { } virtual void page_did_change_favicon(Gfx::Bitmap const&) { }
virtual void page_did_layout() { }
virtual void page_did_request_alert(String const&) { } virtual void page_did_request_alert(String const&) { }
virtual void page_did_request_confirm(String const&) { } virtual void page_did_request_confirm(String const&) { }
virtual void page_did_request_prompt(String const&, String const&) { } virtual void page_did_request_prompt(String const&, String const&) { }

View file

@ -207,17 +207,6 @@ void PageClient::page_did_request_cursor_change(Gfx::Cursor const& cursor)
client().async_did_request_cursor_change(m_id, cursor); client().async_did_request_cursor_change(m_id, cursor);
} }
void PageClient::page_did_layout()
{
auto* layout_root = this->layout_root();
VERIFY(layout_root);
if (layout_root->paintable_box()->has_scrollable_overflow())
m_content_size = page().enclosing_device_rect(layout_root->paintable_box()->scrollable_overflow_rect().value()).size();
else
m_content_size = page().enclosing_device_rect(layout_root->paintable_box()->absolute_rect()).size();
}
void PageClient::page_did_change_title(ByteString const& title) void PageClient::page_did_change_title(ByteString const& title)
{ {
client().async_did_change_title(m_id, title); client().async_did_change_title(m_id, title);

View file

@ -63,8 +63,6 @@ public:
void set_window_position(Web::DevicePixelPoint); void set_window_position(Web::DevicePixelPoint);
void set_window_size(Web::DevicePixelSize); void set_window_size(Web::DevicePixelSize);
Web::DevicePixelSize content_size() const { return m_content_size; }
Web::WebIDL::ExceptionOr<void> toggle_media_play_state(); Web::WebIDL::ExceptionOr<void> toggle_media_play_state();
void toggle_media_mute_state(); void toggle_media_mute_state();
Web::WebIDL::ExceptionOr<void> toggle_media_loop_state(); Web::WebIDL::ExceptionOr<void> toggle_media_loop_state();
@ -112,7 +110,6 @@ private:
virtual Web::CSS::PreferredContrast preferred_contrast() const override { return m_preferred_contrast; } virtual Web::CSS::PreferredContrast preferred_contrast() const override { return m_preferred_contrast; }
virtual Web::CSS::PreferredMotion preferred_motion() const override { return m_preferred_motion; } virtual Web::CSS::PreferredMotion preferred_motion() const override { return m_preferred_motion; }
virtual void page_did_request_cursor_change(Gfx::Cursor const&) override; virtual void page_did_request_cursor_change(Gfx::Cursor const&) override;
virtual void page_did_layout() override;
virtual void page_did_change_title(ByteString const&) override; virtual void page_did_change_title(ByteString const&) override;
virtual void page_did_change_url(URL::URL const&) override; virtual void page_did_change_url(URL::URL const&) override;
virtual void page_did_request_refresh() override; virtual void page_did_request_refresh() override;
@ -187,7 +184,6 @@ private:
GC::Ref<Web::Page> m_page; GC::Ref<Web::Page> m_page;
RefPtr<Gfx::PaletteImpl> m_palette_impl; RefPtr<Gfx::PaletteImpl> m_palette_impl;
Web::DevicePixelRect m_screen_rect; Web::DevicePixelRect m_screen_rect;
Web::DevicePixelSize m_content_size;
float m_device_pixels_per_css_pixel { 1.0f }; float m_device_pixels_per_css_pixel { 1.0f };
u64 m_id { 0 }; u64 m_id { 0 };
bool m_has_focus { false }; bool m_has_focus { false };