mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
LibWeb+WebContent: Remove PageClient::page_did_invalidate()
...and schedule repainting directly from Navigable::set_needs_display() bypassing PageClient.
This commit is contained in:
parent
c3f5dbb101
commit
d3f8d24abb
4 changed files with 3 additions and 9 deletions
|
@ -2033,7 +2033,7 @@ void Navigable::set_needs_display()
|
|||
set_needs_display(viewport_rect());
|
||||
}
|
||||
|
||||
void Navigable::set_needs_display(CSSPixelRect const& rect)
|
||||
void Navigable::set_needs_display(CSSPixelRect const&)
|
||||
{
|
||||
// FIXME: Ignore updates outside the visible viewport rect.
|
||||
// This requires accounting for fixed-position elements in the input rect, which we don't do yet.
|
||||
|
@ -2041,7 +2041,8 @@ void Navigable::set_needs_display(CSSPixelRect const& rect)
|
|||
m_needs_repaint = true;
|
||||
|
||||
if (is<TraversableNavigable>(*this)) {
|
||||
static_cast<TraversableNavigable*>(this)->page().client().page_did_invalidate(to_top_level_rect(rect));
|
||||
// Schedule the main thread event loop, which will, in turn, schedule a repaint.
|
||||
Web::HTML::main_thread_event_loop().schedule();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -253,7 +253,6 @@ public:
|
|||
virtual void page_did_leave_tooltip_area() { }
|
||||
virtual void page_did_hover_link(const AK::URL&) { }
|
||||
virtual void page_did_unhover_link() { }
|
||||
virtual void page_did_invalidate(CSSPixelRect const&) { }
|
||||
virtual void page_did_change_favicon(Gfx::Bitmap const&) { }
|
||||
virtual void page_did_layout() { }
|
||||
virtual void page_did_request_scroll(i32, i32) { }
|
||||
|
|
|
@ -224,11 +224,6 @@ void PageClient::set_viewport_rect(Web::DevicePixelRect const& rect)
|
|||
page().top_level_traversable()->set_viewport_rect(page().device_to_css_rect(rect));
|
||||
}
|
||||
|
||||
void PageClient::page_did_invalidate(Web::CSSPixelRect const&)
|
||||
{
|
||||
Web::HTML::main_thread_event_loop().schedule();
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_cursor_change(Gfx::StandardCursor cursor)
|
||||
{
|
||||
client().async_did_request_cursor_change(m_id, (u32)cursor);
|
||||
|
|
|
@ -88,7 +88,6 @@ private:
|
|||
virtual Gfx::Palette palette() const override;
|
||||
virtual Web::DevicePixelRect screen_rect() const override { return m_screen_rect; }
|
||||
virtual Web::CSS::PreferredColorScheme preferred_color_scheme() const override { return m_preferred_color_scheme; }
|
||||
virtual void page_did_invalidate(Web::CSSPixelRect const&) override;
|
||||
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override;
|
||||
virtual void page_did_layout() override;
|
||||
virtual void page_did_change_title(ByteString const&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue