LibWeb: Remove unused argument of InlineLevelIterator::next

Also remove unused method from LineBuilder.
This commit is contained in:
Andi Gallo 2023-08-17 05:38:52 +00:00 committed by Andreas Kling
parent 768c35af71
commit ef6a78518f
Notes: sideshowbarker 2024-07-17 01:23:08 +09:00
4 changed files with 6 additions and 8 deletions

View file

@ -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();

View file

@ -124,7 +124,7 @@ void InlineLevelIterator::skip_to_next()
compute_next();
}
Optional<InlineLevelIterator::Item> InlineLevelIterator::next(AvailableSize available_width)
Optional<InlineLevelIterator::Item> InlineLevelIterator::next()
{
if (!m_current_node)
return {};
@ -139,7 +139,7 @@ Optional<InlineLevelIterator::Item> 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::Item> InlineLevelIterator::next(AvailableSize avai
if (is<Layout::ListItemMarkerBox>(*m_current_node)) {
skip_to_next();
return next(available_width);
return next();
}
if (!is<Layout::Box>(*m_current_node)) {
skip_to_next();
return next(available_width);
return next();
}
if (is<Layout::ReplacedBox>(*m_current_node)) {

View file

@ -51,7 +51,7 @@ public:
InlineLevelIterator(Layout::InlineFormattingContext&, LayoutState&, Layout::BlockContainer const&, LayoutMode);
Optional<Item> next(AvailableSize available_width);
Optional<Item> next();
private:
void skip_to_next();

View file

@ -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();