mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
LibWeb: Fix invalidation of CSS properties that do not affect layout
Recently, we moved the resolution of CSS properties that do not affect layout to occur within LayoutState::commit(). This decision was a mistake as it breaks invalidation. With this change, we now re-resolve all properties that do not affect layout before each repaint.
This commit is contained in:
parent
955d73657e
commit
1af466babf
11 changed files with 314 additions and 250 deletions
|
@ -2082,6 +2082,11 @@ void Navigable::paint(Painting::RecordingPainter& recording_painter, PaintConfig
|
|||
context.set_should_paint_overlay(config.paint_overlay);
|
||||
context.set_has_focus(config.has_focus);
|
||||
|
||||
if (m_needs_to_resolve_paint_only_properties) {
|
||||
document->paintable()->resolve_paint_only_properties();
|
||||
m_needs_to_resolve_paint_only_properties = false;
|
||||
}
|
||||
|
||||
HashMap<Painting::PaintableBox const*, Painting::ViewportPaintable::ScrollFrame> scroll_frames;
|
||||
if (is_traversable()) {
|
||||
document->paintable()->assign_scroll_frame_ids(scroll_frames);
|
||||
|
|
|
@ -179,6 +179,8 @@ public:
|
|||
};
|
||||
void paint(Painting::RecordingPainter&, PaintConfig);
|
||||
|
||||
void set_needs_to_resolve_paint_only_properties() { m_needs_to_resolve_paint_only_properties = true; }
|
||||
|
||||
protected:
|
||||
Navigable();
|
||||
|
||||
|
@ -220,6 +222,8 @@ private:
|
|||
|
||||
CSSPixelSize m_size;
|
||||
CSSPixelPoint m_viewport_scroll_offset;
|
||||
|
||||
bool m_needs_to_resolve_paint_only_properties { true };
|
||||
};
|
||||
|
||||
HashTable<Navigable*>& all_navigables();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue