mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Disallow margins from collapsing through block formatting
contexts per CSS 2.1 § 8.3.1. Closes #10449.
This commit is contained in:
parent
a3fd226341
commit
f69931552b
5 changed files with 84 additions and 4 deletions
|
@ -1751,7 +1751,7 @@ impl Flow for BlockFlow {
|
|||
self.base.position.size.block = self.fragment.border_box.size.block;
|
||||
}
|
||||
None
|
||||
} else if self.is_root() || self.base.flags.is_float() || self.is_inline_block() {
|
||||
} else if self.is_root() || self.formatting_context_type() != FormattingContextType::None {
|
||||
// Root element margins should never be collapsed according to CSS § 8.3.1.
|
||||
debug!("assign_block_size: assigning block_size for root flow {:?}",
|
||||
flow::base(self).debug_id());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue