mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
layout: Place list item markers correctly in the block direction.
This commit is contained in:
parent
56d3426431
commit
a746fa0ac1
4 changed files with 36 additions and 2 deletions
|
@ -116,8 +116,9 @@ impl Flow for ListItemFlow {
|
|||
let item_inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height);
|
||||
let marker_inline_metrics = marker.inline_metrics(layout_context);
|
||||
marker.border_box.start.b = item_inline_metrics.block_size_above_baseline -
|
||||
marker_inline_metrics.block_size_above_baseline;
|
||||
marker.border_box.size.block = marker_inline_metrics.block_size_above_baseline;
|
||||
marker_inline_metrics.ascent;
|
||||
marker.border_box.size.block = marker_inline_metrics.ascent +
|
||||
marker_inline_metrics.depth_below_baseline;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -198,6 +198,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
|
|||
== many_brs_a.html many_brs_ref.html
|
||||
== margin_a.html margin_b.html
|
||||
== margins_inside_floats_a.html margins_inside_floats_ref.html
|
||||
== marker_block_direction_placement_a.html marker_block_direction_placement_ref.html
|
||||
== max_width_float_simple_a.html max_width_float_simple_b.html
|
||||
== max_width_simple_a.html max_width_simple_b.html
|
||||
== min_max_height_a.html min_max_height_b.html
|
||||
|
|
12
tests/ref/marker_block_direction_placement_a.html
Normal file
12
tests/ref/marker_block_direction_placement_a.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
body, ol, p {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
body {
|
||||
line-height: 10;
|
||||
}
|
||||
</style>
|
||||
<ol><li>Hello</ol>
|
||||
|
20
tests/ref/marker_block_direction_placement_ref.html
Normal file
20
tests/ref/marker_block_direction_placement_ref.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
body, ol, p {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
body {
|
||||
line-height: 10;
|
||||
}
|
||||
section {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 64px;
|
||||
background: white;
|
||||
}
|
||||
</style>
|
||||
<ol><li>Hello</ol><section></section>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue