mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +00:00
LibWeb: Move m_needs_repaint
and record_display_list()
in Document
Let's make document responsible for display list invalidation, considering it already takes care of style and layout.
This commit is contained in:
parent
ab76b99f1e
commit
69c6e07139
Notes:
github-actions[bot]
2024-08-19 16:58:13 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 69c6e07139
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1106
16 changed files with 117 additions and 109 deletions
|
@ -209,7 +209,7 @@ void EventLoop::process()
|
|||
// loop processing.
|
||||
for_each_fully_active_document_in_docs([&](DOM::Document& document) {
|
||||
auto navigable = document.navigable();
|
||||
if (navigable && !navigable->has_a_rendering_opportunity() && navigable->needs_repaint())
|
||||
if (navigable && !navigable->has_a_rendering_opportunity() && document.needs_repaint())
|
||||
schedule();
|
||||
if (navigable && navigable->has_a_rendering_opportunity())
|
||||
return;
|
||||
|
@ -328,7 +328,7 @@ void EventLoop::process()
|
|||
// 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 navigable = document.navigable();
|
||||
if (navigable && navigable->needs_repaint()) {
|
||||
if (navigable && document.needs_repaint()) {
|
||||
auto* browsing_context = document.browsing_context();
|
||||
auto& page = browsing_context->page();
|
||||
if (navigable->is_traversable()) {
|
||||
|
@ -341,7 +341,7 @@ void EventLoop::process()
|
|||
// FIXME: Not in the spec: If there is a screenshot request queued, process it now.
|
||||
// This prevents tests deadlocking on screenshot requests on macOS.
|
||||
for (auto& document : docs) {
|
||||
if (document->page().top_level_traversable()->needs_repaint())
|
||||
if (document->needs_repaint())
|
||||
document->page().client().process_screenshot_requests();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue