mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
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:
parent
f48024c2d1
commit
9af966f87d
Notes:
sideshowbarker
2024-07-17 12:02:22 +09:00
Author: https://github.com/awesomekling
Commit: 9af966f87d
Pull-request: https://github.com/SerenityOS/serenity/pull/23708
Reviewed-by: https://github.com/kalenikaliaksandr ✅
5 changed files with 8 additions and 9 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue