1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

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
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); LineBuilder line_builder(*this, m_state);
for (;;) { for (;;) {
auto item_opt = iterator.next(line_builder.available_width_for_current_line()); auto item_opt = iterator.next();
if (!item_opt.has_value()) if (!item_opt.has_value())
break; break;
auto& item = item_opt.value(); auto& item = item_opt.value();

View file

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

View file

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

View file

@ -37,8 +37,6 @@ public:
return false; return false;
} }
AvailableSize available_width_for_current_line() const { return m_available_width_for_current_line; }
void update_last_line(); void update_last_line();
void remove_last_line_if_empty(); void remove_last_line_if_empty();