mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
layout: Ensure IFC for abspos with inline-level original display (#39041)
Absolutely positioned elements get blockified, but their static position still depends on the original display. Therefore, if we encounter an abspos with an inline-level original display, we will now ensure that it's handled in an inline formatting context. This way its static position will correctly take into account things like `text-align`. Testing: Several WPT tests are now passing. Fixes: #39017 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
665ee150a6
commit
9264ef1a95
17 changed files with 42 additions and 44 deletions
|
@ -615,6 +615,12 @@ impl<'dom> style::dom::TElement for ServoLayoutElement<'dom> {
|
|||
return true;
|
||||
}
|
||||
|
||||
if new_box.position.is_absolutely_positioned() &&
|
||||
old_box.original_display != new_box.original_display
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if old.get_font() != new.get_font() {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue