diff --git a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp index cc76581386f..b913ffe1eb8 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineLevelIterator.cpp @@ -68,7 +68,7 @@ void InlineLevelIterator::exit_node_with_box_model_metrics() // This is similar to Layout::Node::next_in_pre_order() but will not descend into inline-block nodes. Layout::Node const* InlineLevelIterator::next_inline_node_in_pre_order(Layout::Node const& current, Layout::Node const* stay_within) { - if (current.first_child() && current.first_child()->is_inline() && !current.is_inline_block()) { + if (current.first_child() && current.first_child()->is_inline() && !current.is_inline_block() && !current.is_replaced_box()) { if (!current.is_box() || !static_cast(current).is_out_of_flow(m_inline_formatting_context)) return current.first_child(); }