diff --git a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp index 6ad1ddf8f71..ef211d7efd2 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp @@ -244,7 +244,7 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode) LineBuilder line_builder(*this, m_state); for (;;) { - auto item_opt = iterator.next(line_builder.available_width_for_current_line()); + auto item_opt = iterator.next(); if (!item_opt.has_value()) break; auto& item = item_opt.value(); diff --git a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp index 32b21cf8f6f..368df002477 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp @@ -124,7 +124,7 @@ void InlineLevelIterator::skip_to_next() compute_next(); } -Optional InlineLevelIterator::next(AvailableSize available_width) +Optional InlineLevelIterator::next() { if (!m_current_node) return {}; @@ -139,7 +139,7 @@ Optional InlineLevelIterator::next(AvailableSize avai if (!chunk_opt.has_value()) { m_text_node_context = {}; skip_to_next(); - return next(available_width); + return next(); } m_text_node_context->next_chunk = m_text_node_context->chunk_iterator.next(); @@ -200,12 +200,12 @@ Optional InlineLevelIterator::next(AvailableSize avai if (is(*m_current_node)) { skip_to_next(); - return next(available_width); + return next(); } if (!is(*m_current_node)) { skip_to_next(); - return next(available_width); + return next(); } if (is(*m_current_node)) { diff --git a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.h b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.h index c8b5e79e0d6..a8f15f48fb3 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.h +++ b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.h @@ -51,7 +51,7 @@ public: InlineLevelIterator(Layout::InlineFormattingContext&, LayoutState&, Layout::BlockContainer const&, LayoutMode); - Optional next(AvailableSize available_width); + Optional next(); private: void skip_to_next(); diff --git a/Userland/Libraries/LibWeb/Layout/LineBuilder.h b/Userland/Libraries/LibWeb/Layout/LineBuilder.h index b054f9d6a33..17fe13a732a 100644 --- a/Userland/Libraries/LibWeb/Layout/LineBuilder.h +++ b/Userland/Libraries/LibWeb/Layout/LineBuilder.h @@ -37,8 +37,6 @@ public: return false; } - AvailableSize available_width_for_current_line() const { return m_available_width_for_current_line; } - void update_last_line(); void remove_last_line_if_empty();