mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
layout: Include padding in the content block-size when computing the
block-size value when `height: auto` is specified for absolutely-positioned elements. Improves "Edit links" on the Wikipedia sidebar.
This commit is contained in:
parent
a8b0fb1e79
commit
2f3b3eb4c4
4 changed files with 43 additions and 1 deletions
|
@ -1112,7 +1112,7 @@ impl BlockFlow {
|
|||
let static_b_offset = self.static_b_offset;
|
||||
|
||||
// This is the stored content block-size value from assign-block-size
|
||||
let content_block_size = self.fragment.content_box().size.block;
|
||||
let content_block_size = self.fragment.border_box.size.block;
|
||||
|
||||
let mut solution = None;
|
||||
{
|
||||
|
|
20
tests/ref/absolute_content_height_a.html
Normal file
20
tests/ref/absolute_content_height_a.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
section {
|
||||
position: absolute;
|
||||
background: peachpuff;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 3em 0 0;
|
||||
width: 10em;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<section>XXXXX</section>
|
||||
</body>
|
||||
</html>
|
||||
|
21
tests/ref/absolute_content_height_ref.html
Normal file
21
tests/ref/absolute_content_height_ref.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
section {
|
||||
background: peachpuff;
|
||||
padding: 3em 0 0;
|
||||
width: 10em;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<section>XXXXX</section>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -39,6 +39,7 @@ fragment=top != ../html/acid2.html acid2_ref.html
|
|||
== 2dcontext/transform_a.html 2dcontext/transform_ref.html
|
||||
|
||||
== abs_float_pref_width_a.html abs_float_pref_width_ref.html
|
||||
== absolute_content_height_a.html absolute_content_height_ref.html
|
||||
== acid1_a.html acid1_b.html
|
||||
== acid2_noscroll.html acid2_ref_broken.html
|
||||
== after_block_iteration.html after_block_iteration_ref.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue