mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Increase BFC root height to contain floats
This commit is contained in:
parent
9829931c27
commit
e38083a96e
11 changed files with 9 additions and 22 deletions
|
@ -96,10 +96,18 @@ impl BlockFormattingContext {
|
||||||
.collapsed_through
|
.collapsed_through
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// The content height of a BFC root should include any float participating in that BFC
|
||||||
|
// (https://drafts.csswg.org/css2/#root-height), we implement this by imagining there is
|
||||||
|
// an element with `clear: both` after the actual contents.
|
||||||
|
let clearance = sequential_layout_state.map_or(Length::zero(), |sequential_layout_state| {
|
||||||
|
sequential_layout_state.calculate_clearance(ClearSide::Both)
|
||||||
|
});
|
||||||
|
|
||||||
IndependentLayout {
|
IndependentLayout {
|
||||||
fragments: flow_layout.fragments,
|
fragments: flow_layout.fragments,
|
||||||
content_block_size: flow_layout.content_block_size +
|
content_block_size: flow_layout.content_block_size +
|
||||||
flow_layout.collapsible_margins_in_children.end.solve(),
|
flow_layout.collapsible_margins_in_children.end.solve() +
|
||||||
|
clearance,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[float-replaced-height-001.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[floats-005.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[floats-101.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[floats-145.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[block-formatting-context-height-001.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[block-formatting-context-height-002.xht]
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[change-column-flex-width.html]
|
|
||||||
[#container 1]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[block_formatting_context_containing_floats_a.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[float_clearance_intrinsic_width_a.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[float_intrinsic_height.html]
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue