mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
LibWeb: Use Vector<LineBoxFragment> instead of NonnullOwnPtrVector
This removes one step of indirection, but more importantly, makes it easy to copy these objects. :^)
This commit is contained in:
parent
16a47165ee
commit
916bbf5910
2 changed files with 5 additions and 6 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibWeb/Layout/LineBoxFragment.h>
|
||||
|
||||
|
@ -20,8 +19,8 @@ public:
|
|||
|
||||
void add_fragment(Node const& layout_node, int start, int length, float leading_size, float trailing_size, float content_width, float content_height, float border_box_top, float border_box_bottom, LineBoxFragment::Type = LineBoxFragment::Type::Normal);
|
||||
|
||||
const NonnullOwnPtrVector<LineBoxFragment>& fragments() const { return m_fragments; }
|
||||
NonnullOwnPtrVector<LineBoxFragment>& fragments() { return m_fragments; }
|
||||
Vector<LineBoxFragment> const& fragments() const { return m_fragments; }
|
||||
Vector<LineBoxFragment>& fragments() { return m_fragments; }
|
||||
|
||||
void trim_trailing_whitespace();
|
||||
|
||||
|
@ -33,7 +32,7 @@ private:
|
|||
friend class InlineFormattingContext;
|
||||
friend class LineBuilder;
|
||||
|
||||
NonnullOwnPtrVector<LineBoxFragment> m_fragments;
|
||||
Vector<LineBoxFragment> m_fragments;
|
||||
float m_width { 0 };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue