mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Remove application of vertical float clearance to BFC Y offset
In 15103d172c
we applied any remaining vertical float clearance to the
BFC's current Y offset for the next block to layout, because a `<br
style="clear: left">` could introduce clearance that would otherwise be
ignored. However, a `<div>` that floats _and_ clears `right` also
introduces this clearance and it is obvious that this should not push
down any subsequent blocks to layout in the current BFC.
Turns out, we don't need this change anymore. Some other later change
also fixed the underlying issue, and by getting rid of the original fix
we can now render https://en.wikipedia.org/wiki/SerenityOS correctly
again.
Fixes #4418.
This commit is contained in:
parent
1731389bfe
commit
79352ad725
Notes:
github-actions[bot]
2025-04-23 12:26:44 +00:00
Author: https://github.com/gmta
Commit: 79352ad725
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4439
3 changed files with 57 additions and 4 deletions
|
@ -564,10 +564,6 @@ void BlockFormattingContext::layout_inline_children(BlockContainer const& block_
|
|||
block_container_state.set_content_width(used_width_px);
|
||||
block_container_state.set_content_height(context.automatic_content_height());
|
||||
}
|
||||
|
||||
// If we end up with remaining vertical clearance, we should make sure the next block is moved down accordingly.
|
||||
if (context.vertical_float_clearance() > 0)
|
||||
m_y_offset_of_current_block_container = context.vertical_float_clearance();
|
||||
}
|
||||
|
||||
CSSPixels BlockFormattingContext::compute_auto_height_for_block_level_element(Box const& box, AvailableSpace const& available_space)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue