mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Ensure abs-pos elements establish block formatting contexts
This commit is contained in:
parent
df9065afb6
commit
0ea9f69ca8
4 changed files with 71 additions and 0 deletions
|
@ -1682,6 +1682,13 @@ impl BlockFlow {
|
|||
/// Determines the type of formatting context this is. See the definition of
|
||||
/// `FormattingContextType`.
|
||||
pub fn formatting_context_type(&self) -> FormattingContextType {
|
||||
if self
|
||||
.base
|
||||
.flags
|
||||
.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
|
||||
{
|
||||
return FormattingContextType::Other;
|
||||
}
|
||||
if self.is_inline_flex_item() || self.is_block_flex_item() {
|
||||
return FormattingContextType::Other;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue