From c8892f64f556da258ff477fcc31151ffde8021b4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 26 Feb 2022 09:27:20 +0100 Subject: [PATCH] LibWeb: Make InlineLevelIterator not enter into inline-block boxes The purpose of "entering" a box is to collect box model metrics that apply to content fragments within the box. However, inline-blocks are special, in that their inner content does not directly participate in the inline formatting context outside it. --- Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp index a0ed2c6f93..17d7c243a4 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp @@ -106,7 +106,7 @@ void InlineLevelIterator::compute_next() void InlineLevelIterator::skip_to_next() { - if (m_next_node && is(*m_next_node)) + if (m_next_node && is(*m_next_node) && !m_next_node->is_inline_block()) enter_node_with_box_model_metrics(static_cast(*m_next_node)); m_current_node = m_next_node;