1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:17:34 +00:00

LibWeb: Remove old Layout::Node::split_into_lines() API

Now that we build lines incrementally, we no longer need the atomic line
splitting API.

The new InlineLevelIterator and LineBuilder setup does have some
regressions from the old behavior, but we can deal with them as we go.
This commit is contained in:
Andreas Kling 2022-01-21 13:34:29 +01:00
parent ba49dc82e0
commit 766d816db3
12 changed files with 0 additions and 167 deletions

View file

@ -27,27 +27,6 @@ InlineNode::~InlineNode()
{
}
void InlineNode::split_into_lines(InlineFormattingContext& context, LayoutMode layout_mode)
{
auto& containing_block = context.containing_block();
auto is_not_undefined_or_auto = [](auto const& length_percentage) {
return !(length_percentage.is_length() && length_percentage.length().is_undefined_or_auto());
};
if (is_not_undefined_or_auto(computed_values().padding().left)) {
float padding_left = computed_values().padding().left.resolved(CSS::Length::make_px(containing_block.width())).resolved(CSS::Length::make_px(0), *this).to_px(*this);
containing_block.ensure_last_line_box().add_fragment(*this, 0, 0, padding_left, 0, LineBoxFragment::Type::Leading);
}
NodeWithStyleAndBoxModelMetrics::split_into_lines(context, layout_mode);
if (is_not_undefined_or_auto(computed_values().padding().right)) {
float padding_right = computed_values().padding().right.resolved(CSS::Length::make_px(containing_block.width())).resolved(CSS::Length::make_px(0), *this).to_px(*this);
containing_block.ensure_last_line_box().add_fragment(*this, 0, 0, padding_right, 0, LineBoxFragment::Type::Trailing);
}
}
void InlineNode::paint(PaintContext& context, PaintPhase phase)
{
auto& painter = context.painter();