layout: Place absolutes in IFCs at their hypothetical static position (#31418)

Absolutes need to be placed at their hypothetical position as if the
position value was static. This position differs based on the value they
had before blockification. The code for placing absolutes was taking
into account the original display for the inline value, but not for the
block value. A static `display: block` box would placed at a new block
position past the end of the linebox.
This commit is contained in:
Martin Robinson 2024-02-23 18:55:18 +01:00 committed by GitHub
parent 41a41b3d8f
commit 0d4e4748c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 32 additions and 40 deletions

View file

@ -89,6 +89,7 @@ where
}
}
#[derive(Debug)]
pub(super) enum Contents {
/// Refers to a DOM subtree, plus `::before` and `::after` pseudo-elements.
OfElement,
@ -107,6 +108,7 @@ pub(super) enum NonReplacedContents {
OfPseudoElement(Vec<PseudoElementContentItem>),
}
#[derive(Debug)]
pub(super) enum PseudoElementContentItem {
Text(String),
Replaced(ReplacedContent),