#include #include #include #include void LineBoxFragment::render(RenderingContext& context) { for (auto* ancestor = layout_node().parent(); ancestor; ancestor = ancestor->parent()) { if (!ancestor->is_visible()) return; } if (is(layout_node())) { to(layout_node()).render_fragment(context, *this); } } bool LineBoxFragment::is_justifiable_whitespace() const { return text() == " "; } StringView LineBoxFragment::text() const { if (!is(layout_node())) return {}; return to(layout_node()).node().data().substring_view(m_start, m_length); }