mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +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
|
@ -1189,12 +1189,16 @@ JS::GCPtr<DOM::Node> TraversableNavigable::currently_focused_area()
|
|||
|
||||
void TraversableNavigable::paint(DevicePixelRect const& content_rect, Painting::BackingStore& target, PaintOptions paint_options)
|
||||
{
|
||||
HTML::Navigable::PaintConfig paint_config;
|
||||
auto document = active_document();
|
||||
if (!document)
|
||||
return;
|
||||
|
||||
DOM::Document::PaintConfig paint_config;
|
||||
paint_config.paint_overlay = paint_options.paint_overlay == PaintOptions::PaintOverlay::Yes;
|
||||
paint_config.should_show_line_box_borders = paint_options.should_show_line_box_borders;
|
||||
paint_config.has_focus = paint_options.has_focus;
|
||||
paint_config.canvas_fill_rect = Gfx::IntRect { {}, content_rect.size() };
|
||||
auto display_list = record_display_list(paint_config);
|
||||
auto display_list = document->record_display_list(paint_config);
|
||||
if (!display_list) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue