mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
LibWeb: Make LineBox take incoming fragment size as floats
This commit is contained in:
parent
52d993cfa8
commit
90b12a41c8
Notes:
sideshowbarker
2024-07-19 01:03:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/90b12a41c8e
@ -33,7 +33,7 @@
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
void LineBox::add_fragment(Node& layout_node, int start, int length, int width, int height, LineBoxFragment::Type fragment_type)
|
||||
void LineBox::add_fragment(Node& layout_node, int start, int length, float width, float height, LineBoxFragment::Type fragment_type)
|
||||
{
|
||||
bool text_align_is_justify = layout_node.style().text_align() == CSS::TextAlign::Justify;
|
||||
if (!text_align_is_justify && !m_fragments.is_empty() && &m_fragments.last().layout_node() == &layout_node) {
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
|
||||
float width() const { return m_width; }
|
||||
|
||||
void add_fragment(Node& layout_node, int start, int length, int width, int height, LineBoxFragment::Type = LineBoxFragment::Type::Normal);
|
||||
void add_fragment(Node& layout_node, int start, int length, float width, float height, LineBoxFragment::Type = LineBoxFragment::Type::Normal);
|
||||
|
||||
const NonnullOwnPtrVector<LineBoxFragment>& fragments() const { return m_fragments; }
|
||||
NonnullOwnPtrVector<LineBoxFragment>& fragments() { return m_fragments; }
|
||||
|
Loading…
Reference in New Issue
Block a user