summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Layout/LayoutBlock.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-08 15:07:15 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-09 15:21:09 +0200
commit72347205c461a18bdc3105300a0eb58c8ab9a833 (patch)
tree5a99c7696925d13acd8a1a415cb7172182bc6efd /Libraries/LibWeb/Layout/LayoutBlock.cpp
parent7b356c33cb33665f8dd3f1f1b827eccda4c2c6d0 (diff)
downloadserenity-72347205c461a18bdc3105300a0eb58c8ab9a833.zip
LibWeb: Always add line boxes through LayoutBlock::add_line_box()
Let's not append directly to the line box vector all over the place.
Diffstat (limited to 'Libraries/LibWeb/Layout/LayoutBlock.cpp')
-rw-r--r--Libraries/LibWeb/Layout/LayoutBlock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutBlock.cpp b/Libraries/LibWeb/Layout/LayoutBlock.cpp
index 8f04c170e7..59b5011ec6 100644
--- a/Libraries/LibWeb/Layout/LayoutBlock.cpp
+++ b/Libraries/LibWeb/Layout/LayoutBlock.cpp
@@ -757,7 +757,7 @@ NonnullRefPtr<CSS::StyleProperties> LayoutBlock::style_for_anonymous_block() con
LineBox& LayoutBlock::ensure_last_line_box()
{
if (m_line_boxes.is_empty())
- m_line_boxes.append(LineBox());
+ return add_line_box();
return m_line_boxes.last();
}