mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb: Schedule repainting from EventLoop::process()
In this change, updating layout and painting are moved to the EventLoop processing steps. This modification allows the addition of resize observation dispatching that needs to happen in event loop processing steps and must occur in the following order relative to layout and painting: 1. Update layout. 2. Gather and broadcast resize observations. 3. Paint.
This commit is contained in:
committed by
Andreas Kling
parent
fb8edcea00
commit
8ba18dfd40
@@ -15,6 +15,7 @@
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/HighResolutionTime/Performance.h>
|
||||
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Platform/EventLoopPlugin.h>
|
||||
#include <LibWeb/Platform/Timer.h>
|
||||
|
||||
@@ -213,7 +214,12 @@ void EventLoop::process()
|
||||
|
||||
// FIXME: 15. Invoke the mark paint timing algorithm for each Document object in docs.
|
||||
|
||||
// FIXME: 16. For each fully active Document in docs, update the rendering or user interface of that Document and its browsing context to reflect the current state.
|
||||
// 16. For each fully active Document in docs, update the rendering or user interface of that Document and its browsing context to reflect the current state.
|
||||
for_each_fully_active_document_in_docs([&](DOM::Document& document) {
|
||||
auto* browsing_context = document.browsing_context();
|
||||
auto& page = browsing_context->page();
|
||||
page.client().schedule_repaint();
|
||||
});
|
||||
|
||||
// 13. If all of the following are true
|
||||
// - this is a window event loop
|
||||
|
||||
Reference in New Issue
Block a user