LibWeb+WebContent: Change event loop to synchronously paint next frame

...instead of scheduling repaint timer in PageClient.

This change fixes flickering on Discord that happened because:
- Event loop schedules repainting by activating repaint timer
- `Document::tear_down_layout_tree()` destroys paintable tree
- Repaint timer invokes callback and renders an empty frame because
  paintable tree was destroyed
This commit is contained in:
Aliaksandr Kalenik 2024-05-28 15:51:53 +02:00 committed by Andreas Kling
commit b8d18ebcf7
Notes: sideshowbarker 2024-07-16 21:45:42 +09:00
7 changed files with 29 additions and 24 deletions

View file

@ -73,6 +73,7 @@ public:
virtual double device_pixels_per_css_pixel() const override { return 1.0; }
virtual CSS::PreferredColorScheme preferred_color_scheme() const override { return m_host_page->client().preferred_color_scheme(); }
virtual void request_file(FileRequest) override { }
virtual void paint_next_frame() override { }
virtual void paint(DevicePixelRect const&, Gfx::Bitmap&, Web::PaintOptions = {}) override { }
virtual void schedule_repaint() override { }
virtual bool is_ready_to_paint() const override { return true; }