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

LibWeb: Make InlineLevelIterator ignore list item marker boxes

Marker boxes are managed explicitly by the corresponding list item box.
This commit is contained in:
Andreas Kling 2022-01-20 16:17:29 +01:00
parent d3adc94ce8
commit 78f2ddfc14

View file

@ -7,6 +7,7 @@
#include <LibWeb/Layout/BreakNode.h>
#include <LibWeb/Layout/InlineLevelIterator.h>
#include <LibWeb/Layout/InlineNode.h>
#include <LibWeb/Layout/ListItemMarkerBox.h>
#include <LibWeb/Layout/ReplacedBox.h>
namespace Web::Layout {
@ -75,6 +76,11 @@ Optional<InlineLevelIterator::Item> InlineLevelIterator::next(float available_wi
};
}
if (is<Layout::ListItemMarkerBox>(*m_current_node)) {
skip_to_next();
return next(available_width);
}
if (!is<Layout::Box>(*m_current_node)) {
skip_to_next();
return next(available_width);