mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 02:54:54 +03:00
LibWeb: Ignore only anonymous blocks in block auto height calculation
Previously block auto height calculation was changed to skip boxes with collapsed margins and then condition to skip anonymous boxes with no lines was also removed in6c5ba10bb0
to avoid skipping anonymous wrappers of tables. Skipping boxes with collapsed margins (currently it's check that height is 0) is wrong because it makes empty boxes with clearance to be skipped which is not correct while anonymous boxes with no lines should be skipped and it's no longer causes problems with tables (fixed in87f0e835eb
)
This commit is contained in:
parent
6eb2f4bfee
commit
00f8b5a911
Notes:
sideshowbarker
2024-07-17 01:15:12 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/00f8b5a911 Pull-request: https://github.com/SerenityOS/serenity/pull/17180
@ -432,9 +432,9 @@ CSSPixels BlockFormattingContext::compute_auto_height_for_block_level_element(Bo
|
||||
|
||||
auto const& child_box_state = m_state.get(*child_box);
|
||||
|
||||
if (margins_collapse_through(*child_box, m_state)) {
|
||||
// Ignore anonymous block containers with no lines. These don't count as in-flow block boxes.
|
||||
if (child_box->is_anonymous() && child_box->is_block_container() && child_box_state.line_boxes.is_empty())
|
||||
continue;
|
||||
}
|
||||
|
||||
auto margin_bottom = m_margin_state.current_collapsed_margin();
|
||||
if (box_state.padding_bottom == 0 && box_state.border_bottom == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user