mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Only set line builder's block offset if clearance increases it
This prevents text from overlapping with each other if a `<br>` with `clear: ..` is used in between.
This commit is contained in:
parent
6f1710121d
commit
04ba375cc7
Notes:
github-actions[bot]
2025-03-31 07:12:12 +00:00
Author: https://github.com/gmta
Commit: 04ba375cc7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4151
3 changed files with 47 additions and 1 deletions
|
@ -283,7 +283,8 @@ void InlineFormattingContext::generate_line_boxes()
|
|||
if (item.node) {
|
||||
auto introduce_clearance = parent().clear_floating_boxes(*item.node, *this);
|
||||
if (introduce_clearance == BlockFormattingContext::DidIntroduceClearance::Yes) {
|
||||
line_builder.set_current_block_offset(vertical_float_clearance());
|
||||
if (vertical_float_clearance() > line_builder.current_block_offset())
|
||||
line_builder.set_current_block_offset(vertical_float_clearance());
|
||||
parent().reset_margin_state();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue