summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-01-20 16:17:29 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-23 01:22:41 +0100
commit78f2ddfc14be1483752a5373d34968768139a0eb (patch)
treec78d77ad27792cc1457e6ab6be73e4bba03eaaa9 /Userland/Libraries/LibWeb/Layout
parentd3adc94ce8641831e1c06b58134cc2006970a735 (diff)
downloadserenity-78f2ddfc14be1483752a5373d34968768139a0eb.zip
LibWeb: Make InlineLevelIterator ignore list item marker boxes
Marker boxes are managed explicitly by the corresponding list item box.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout')
-rw-r--r--Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp
index b2d27bc5a7..192fb3431e 100644
--- a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp
+++ b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp
@@ -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);