2019-10-03 10:20:13 -03:00
|
|
|
#include <LibGUI/GPainter.h>
|
|
|
|
|
#include <LibHTML/Layout/LayoutText.h>
|
|
|
|
|
#include <LibHTML/Layout/LineBoxFragment.h>
|
|
|
|
|
#include <LibHTML/RenderingContext.h>
|
|
|
|
|
|
|
|
|
|
void LineBoxFragment::render(RenderingContext& context)
|
|
|
|
|
{
|
2019-10-09 16:25:29 -03:00
|
|
|
for (auto* ancestor = layout_node().parent(); ancestor; ancestor = ancestor->parent()) {
|
|
|
|
|
if (!ancestor->is_visible())
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-03 10:20:13 -03:00
|
|
|
if (layout_node().is_text()) {
|
|
|
|
|
auto& layout_text = static_cast<const LayoutText&>(layout_node());
|
|
|
|
|
layout_text.render_fragment(context, *this);
|
|
|
|
|
}
|
|
|
|
|
}
|