LibWeb: Avoid unnecessary Vector copying when generating line boxes

Carry the same Vector<Gfx::DrawGlyphOrEmoji> all the way from the inline
level iterator to the final line box fragment.
This commit is contained in:
Andreas Kling 2024-03-24 16:51:04 +01:00
commit 9af966f87d
Notes: sideshowbarker 2024-07-17 12:02:22 +09:00
5 changed files with 8 additions and 9 deletions

View file

@ -20,7 +20,7 @@ public:
CSSPixels bottom() const { return m_bottom; }
CSSPixels baseline() const { return m_baseline; }
void add_fragment(Node const& layout_node, int start, int length, CSSPixels leading_size, CSSPixels trailing_size, CSSPixels leading_margin, CSSPixels trailing_margin, CSSPixels content_width, CSSPixels content_height, CSSPixels border_box_top, CSSPixels border_box_bottom, Span<Gfx::DrawGlyphOrEmoji const> = {});
void add_fragment(Node const& layout_node, int start, int length, CSSPixels leading_size, CSSPixels trailing_size, CSSPixels leading_margin, CSSPixels trailing_margin, CSSPixels content_width, CSSPixels content_height, CSSPixels border_box_top, CSSPixels border_box_bottom, Vector<Gfx::DrawGlyphOrEmoji> = {});
Vector<LineBoxFragment> const& fragments() const { return m_fragments; }
Vector<LineBoxFragment>& fragments() { return m_fragments; }