mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
layout: Make baseline_offset_of_last_line_box_in_flow()
only check
blocks in flow. Improves python.org. Closes #12124.
This commit is contained in:
parent
dc3e11f96e
commit
c6b9b315aa
4 changed files with 95 additions and 1 deletions
|
@ -1405,7 +1405,8 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
||||||
return kid.as_inline().baseline_offset_of_last_line()
|
return kid.as_inline().baseline_offset_of_last_line()
|
||||||
}
|
}
|
||||||
if kid.is_block_like() &&
|
if kid.is_block_like() &&
|
||||||
kid.as_block().formatting_context_type() == FormattingContextType::None {
|
kid.as_block().formatting_context_type() == FormattingContextType::None &&
|
||||||
|
!base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
|
||||||
if let Some(baseline_offset) = kid.baseline_offset_of_last_line_box_in_flow() {
|
if let Some(baseline_offset) = kid.baseline_offset_of_last_line_box_in_flow() {
|
||||||
return Some(base(kid).position.start.b + baseline_offset)
|
return Some(base(kid).position.start.b + baseline_offset)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2484,6 +2484,18 @@
|
||||||
"url": "/_mozilla/css/inline_block_border_intrinsic_size_a.html"
|
"url": "/_mozilla/css/inline_block_border_intrinsic_size_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/inline_block_height_with_out_of_flow_child_a.html": [
|
||||||
|
{
|
||||||
|
"path": "css/inline_block_height_with_out_of_flow_child_a.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/inline_block_height_with_out_of_flow_child_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/inline_block_height_with_out_of_flow_child_a.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/inline_block_img_a.html": [
|
"css/inline_block_img_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/inline_block_img_a.html",
|
"path": "css/inline_block_img_a.html",
|
||||||
|
@ -11908,6 +11920,18 @@
|
||||||
"url": "/_mozilla/css/inline_block_border_intrinsic_size_a.html"
|
"url": "/_mozilla/css/inline_block_border_intrinsic_size_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/inline_block_height_with_out_of_flow_child_a.html": [
|
||||||
|
{
|
||||||
|
"path": "css/inline_block_height_with_out_of_flow_child_a.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/inline_block_height_with_out_of_flow_child_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/inline_block_height_with_out_of_flow_child_a.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/inline_block_img_a.html": [
|
"css/inline_block_img_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/inline_block_img_a.html",
|
"path": "css/inline_block_img_a.html",
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="match" href="inline_block_height_with_out_of_flow_child_ref.html">
|
||||||
|
<style>
|
||||||
|
.options-bar {
|
||||||
|
background-color: lightblue;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winkwink-nudgenudge {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tier-1 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subnav {
|
||||||
|
position: absolute;
|
||||||
|
top: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="options-bar">
|
||||||
|
<div class="winkwink-nudgenudge">
|
||||||
|
<div class="tier-1">
|
||||||
|
<div class="subnav">A</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
.options-bar {
|
||||||
|
background-color: lightblue;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winkwink-nudgenudge {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tier-1 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subnav {
|
||||||
|
position: absolute;
|
||||||
|
top: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="options-bar">
|
||||||
|
<div class="winkwink-nudgenudge">
|
||||||
|
<div class="tier-1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue