1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +00:00

LibWeb: Resolve outline CSS property before paint commands recording

Refactor to resolve paint-only properties before painting, aiming to
stop using layout nodes during recording of painting commands.

Also adds a test, as we have not had any for outlines yet.
This commit is contained in:
Aliaksandr Kalenik 2024-02-11 01:56:39 +01:00 committed by Alexander Kalenik
parent f19b17e089
commit 95d91a37d2
7 changed files with 64 additions and 11 deletions

View file

@ -37,6 +37,12 @@ public:
void set_box_shadow_data(Vector<ShadowData>&& box_shadow_data) { m_box_shadow_data = move(box_shadow_data); }
Vector<ShadowData> const& box_shadow_data() const { return m_box_shadow_data; }
void set_outline_data(Optional<BordersData> outline_data) { m_outline_data = outline_data; }
Optional<BordersData> const& outline_data() const { return m_outline_data; }
void set_outline_offset(CSSPixels outline_offset) { m_outline_offset = outline_offset; }
CSSPixels outline_offset() const { return m_outline_offset; }
void set_enclosing_scroll_frame(RefPtr<ScrollFrame> scroll_frame) { m_enclosing_scroll_frame = scroll_frame; }
void set_enclosing_clip_frame(RefPtr<ClipFrame> clip_frame) { m_enclosing_clip_frame = clip_frame; }
@ -55,6 +61,8 @@ private:
RefPtr<ClipFrame const> m_enclosing_clip_frame;
Vector<ShadowData> m_box_shadow_data;
Optional<BordersData> m_outline_data;
CSSPixels m_outline_offset { 0 };
Vector<PaintableFragment> m_fragments;
};