aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/layout/block.rs2
-rw-r--r--tests/ref/absolute_content_height_a.html20
-rw-r--r--tests/ref/absolute_content_height_ref.html21
-rw-r--r--tests/ref/basic.list1
4 files changed, 43 insertions, 1 deletions
diff --git a/components/layout/block.rs b/components/layout/block.rs
index 580a81c2a4f..704d592e06d 100644
--- a/components/layout/block.rs
+++ b/components/layout/block.rs
@@ -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;
{
diff --git a/tests/ref/absolute_content_height_a.html b/tests/ref/absolute_content_height_a.html
new file mode 100644
index 00000000000..8f12b89aef8
--- /dev/null
+++ b/tests/ref/absolute_content_height_a.html
@@ -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>
+
diff --git a/tests/ref/absolute_content_height_ref.html b/tests/ref/absolute_content_height_ref.html
new file mode 100644
index 00000000000..bb239ed179f
--- /dev/null
+++ b/tests/ref/absolute_content_height_ref.html
@@ -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>
+
diff --git a/tests/ref/basic.list b/tests/ref/basic.list
index 31186763f0d..30af1f25250 100644
--- a/tests/ref/basic.list
+++ b/tests/ref/basic.list
@@ -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