Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix vertical alignment at the root of an IFC (#31636)
At the root of an inline formatting context, we used its vertical-align in order to compute the strut. That was wrong, since vertical-align on a block container shouldn't affect the contents, it should only affect the alignment of the block container (if it's inline-level) within the parent IFC. This was only working well if the block container was block-level, since effective_vertical_align_for_inline_layout returned `baseline` for block-level boxes. Instead of the outer display type, this patch changes the logic to check whether we are at the root of the IFC.
- Loading branch information
1 parent
63527f5
commit 0860deb
Showing
7 changed files
with
223 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
tests/wpt/meta/css/CSS2/linebox/inline-formatting-context-011.xht.ini
This file was deleted.
Oops, something went wrong.
87 changes: 87 additions & 0 deletions
87
tests/wpt/tests/css/CSS2/linebox/vertical-align-122-ref.xht
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Reftest Reference</title> | ||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"/> | ||
|
||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
<style type="text/css"> | ||
<![CDATA[ | ||
body { | ||
position: relative; | ||
font-size: 20px; | ||
} | ||
.person { | ||
position: absolute; | ||
width: 6em; | ||
height: 8.9em; | ||
} | ||
.face { | ||
position: relative; | ||
height: 4.2em; | ||
background: currentcolor; | ||
} | ||
.face > div { | ||
position: absolute; | ||
background: white; | ||
} | ||
.face > .mouth { | ||
left: 2em; | ||
top: 3em; | ||
width: 2em; | ||
height: .2em; | ||
} | ||
.face > .eye { | ||
top: 1em; | ||
width: 1em; | ||
height: 1.2em; | ||
} | ||
.face > .eye.left { | ||
left: 1em; | ||
} | ||
.face > .eye.right { | ||
right: 1em; | ||
} | ||
.torso { | ||
margin-top: 0.5em; | ||
height: 2.2em; | ||
border: 1em solid; | ||
} | ||
]]> | ||
</style> | ||
</head> | ||
<body> | ||
<div class="person" style="left: 0em; top: 0em"> | ||
<div class="face"> | ||
<div class="eye left"></div> | ||
<div class="eye right"></div> | ||
<div class="mouth"></div> | ||
</div> | ||
<div class="torso"></div> | ||
</div> | ||
<div class="person" style="left: 7em; top: 0em"> | ||
<div class="face"> | ||
<div class="eye left"></div> | ||
<div class="eye right"></div> | ||
<div class="mouth"></div> | ||
</div> | ||
<div class="torso"></div> | ||
</div> | ||
<div class="person" style="left: 14em; top: .5em"> | ||
<div class="face"> | ||
<div class="eye left"></div> | ||
<div class="eye right"></div> | ||
<div class="mouth"></div> | ||
</div> | ||
<div class="torso"></div> | ||
</div> | ||
<div class="person" style="left: 21em; top: .5em"> | ||
<div class="face"> | ||
<div class="eye left"></div> | ||
<div class="eye right"></div> | ||
<div class="mouth"></div> | ||
</div> | ||
<div class="torso"></div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.