From 72347205c461a18bdc3105300a0eb58c8ab9a833 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 8 Aug 2020 15:07:15 +0200 Subject: LibWeb: Always add line boxes through LayoutBlock::add_line_box() Let's not append directly to the line box vector all over the place. --- Libraries/LibWeb/Layout/LayoutBlock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Libraries/LibWeb/Layout/LayoutBlock.cpp') 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 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(); } -- cgit v1.2.3