mirror of
https://github.com/servo/servo.git
synced 2025-06-22 08:08:59 +01:00
layout: Force outside ::marker to establish a BFC (#37252)
Even though we were continuing the parent BFC, we weren't updating the SequentialLayoutState to have the correct containing block info. That caused problem in the presence of floats. This patch establishes an independent BFC, which avoids the problem. This seems reasonable since outside markers are out-of-flow-ish, and it matches Firefox. Blink implements them as inline-blocks, so they should also establish a BFC. Testing: Adding new tests. Some still fail because of a different issue. Also, adding an expectation for several existing tests that were missing it. Fixes: #37222 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
a1f43ab06d
commit
8540b0f6e3
49 changed files with 768 additions and 245 deletions
|
@ -744,9 +744,14 @@ impl BlockLevelJob<'_> {
|
|||
self.propagated_data,
|
||||
false, /* is_list_item */
|
||||
);
|
||||
// An outside ::marker must establish a BFC, and can't contain floats.
|
||||
let block_formatting_context = BlockFormattingContext {
|
||||
contents: block_container,
|
||||
contains_floats: false,
|
||||
};
|
||||
ArcRefCell::new(BlockLevelBox::OutsideMarker(OutsideMarker {
|
||||
base: LayoutBoxBase::new(info.into(), info.style.clone()),
|
||||
block_container,
|
||||
block_formatting_context,
|
||||
list_item_style,
|
||||
}))
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue