diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-04 21:06:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-04 21:06:27 +0100 |
commit | 90b12a41c8ec484b3fa4fc9b4c037b0c0c27bf7b (patch) | |
tree | 9b086ae04c3fa2f413613f7244997c08ae0412b8 | |
parent | 52d993cfa842247a6236311fda7bff87532f78e2 (diff) | |
download | serenity-90b12a41c8ec484b3fa4fc9b4c037b0c0c27bf7b.zip |
LibWeb: Make LineBox take incoming fragment size as floats
-rw-r--r-- | Libraries/LibWeb/Layout/LineBox.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibWeb/Layout/LineBox.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibWeb/Layout/LineBox.cpp b/Libraries/LibWeb/Layout/LineBox.cpp index 8d2c3d63da..b4415ae11b 100644 --- a/Libraries/LibWeb/Layout/LineBox.cpp +++ b/Libraries/LibWeb/Layout/LineBox.cpp @@ -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) { diff --git a/Libraries/LibWeb/Layout/LineBox.h b/Libraries/LibWeb/Layout/LineBox.h index 5bfb71abec..cc821d9d6e 100644 --- a/Libraries/LibWeb/Layout/LineBox.h +++ b/Libraries/LibWeb/Layout/LineBox.h @@ -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; } |