mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibWeb: Minor cleanup tweak in TextNode::split_into_lines_by_rules()
Merge an unnecessarily nested branch with its parent.
This commit is contained in:
parent
5074aaea69
commit
37e29a630b
Notes:
sideshowbarker
2024-07-18 19:01:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/37e29a630bd
1 changed files with 3 additions and 5 deletions
|
@ -184,11 +184,9 @@ void TextNode::split_into_lines_by_rules(InlineFormattingContext& context, Layou
|
|||
line_boxes.last().add_fragment(*this, chunk.start, chunk.length, chunk_width, font.glyph_height());
|
||||
available_width -= chunk_width;
|
||||
|
||||
if (do_wrap_lines) {
|
||||
if (available_width < 0) {
|
||||
containing_block.add_line_box();
|
||||
available_width = context.available_width_at_line(line_boxes.size() - 1);
|
||||
}
|
||||
if (do_wrap_lines && available_width < 0) {
|
||||
containing_block.add_line_box();
|
||||
available_width = context.available_width_at_line(line_boxes.size() - 1);
|
||||
}
|
||||
|
||||
if (do_wrap_breaks && chunk.has_breaking_newline) {
|
||||
|
|
Loading…
Reference in a new issue