diff options
author | Andreas Kling <kling@serenityos.org> | 2022-01-21 13:34:29 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-23 01:22:41 +0100 |
commit | 766d816db3642635e79dc4a8026534098c4d922a (patch) | |
tree | cfcdfd22438f1b6c927f1d005e7d403764f56c10 /Userland/Libraries/LibWeb/Layout/InlineNode.cpp | |
parent | ba49dc82e0f3b29fac84556dc658a1113f835409 (diff) | |
download | serenity-766d816db3642635e79dc4a8026534098c4d922a.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/InlineNode.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/InlineNode.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/InlineNode.cpp b/Userland/Libraries/LibWeb/Layout/InlineNode.cpp index a5e2a2bbfc..d7ea26d59f 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineNode.cpp @@ -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(); |