Bug 1278058 Part 3: Added a reftest of fragmented stretched grid children. r?mats
MozReview-Commit-ID: FfOp2Vj1Ia
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-grid/grid-fragmentation-032-ref.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+ <meta charset="utf-8">
+ <title>Reference: Fragmentation with specified grid height, ensuring margins are calculated properly</title>
+ <link rel="author" title="Brad Werth" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1278058">
+
+ <style type="text/css">
+html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+}
+
+.bar111 {
+ float: left;
+ margin: 2px;
+ height: calc(100px + 1px + 10px);
+ width: 30px;
+ background-color: red;
+}
+
+.columns {
+ position:relative;
+ border: 2px dashed;
+ margin-left: 34px;
+ margin-bottom: 20px;
+ height: 150px;
+}
+
+.grid {
+ display: inline-block;
+ border: 1px solid;
+ margin: 10px;
+}
+
+.block {
+ border: 2px solid blue;
+ height: calc(100px - 2px - 20px);
+ width: 50px;
+ margin: 20px;
+}
+
+.columns2 {
+ width: 300px;
+}
+
+.grid2-1 {
+ width: calc((300px / 2) - 20px - 2px);
+ border-bottom: 0px;
+ margin-bottom: 0px;
+}
+
+.grid2-2 {
+ width: calc((300px / 2) - 20px - 2px);
+ border-top: 0px;
+ margin-top: 0px;
+}
+
+.block2-1 {
+ border-bottom: 0px;
+ margin-bottom: 0px;
+}
+
+.block2-2 {
+ border-top: 0px;
+ margin-top: 0px;
+}
+
+.columns3 {
+ width: 450px;
+}
+
+.grid3-1 {
+ width: calc((450px / 3) - 20px - 2px);
+ border-bottom: 0px;
+ margin-bottom: 0px;
+}
+
+.grid3-2 {
+ width: calc((450px / 3) - 20px - 2px);
+ height: 100px;
+ border-top: 0px;
+ margin-top: 0px;
+ border-bottom: 0px;
+ margin-bottom: calc(10px + 1px);
+}
+
+.grid3-3 {
+ width: calc((450px / 3) - 20px - 2px);
+ border-top: 0px;
+ margin-top: 0px;
+}
+
+.block3-1 {
+ border-bottom: 0px;
+ margin-bottom: 0px;
+}
+
+.block3-2 {
+ height: 100px;
+ border-top: 0px;
+ margin-top: 0px;
+ border-bottom: 0px;
+ margin-bottom: calc(10px + 1px);
+}
+
+.block3-3 {
+ border-top: 0px;
+ margin-top: 0px;
+}
+
+</style>
+</head>
+<body>
+
+<div class="bar111"></div>
+<div class="columns columns2">
+ <div class="grid grid2-1">
+ <div class="block block2-1"></div>
+ </div><div class="grid grid2-2">
+ <div class="block block2-2"></div>
+ </div>
+</div>
+
+<div class="bar111"></div>
+<div class="columns columns3">
+ <div class="grid grid3-1">
+ <div class="block block3-1"></div>
+ </div><div class="grid grid3-2">
+ <div class="block block3-2"></div>
+ </div><div class="grid grid3-3">
+ <div class="block block3-3"></div>
+ </div>
+</div>
+
+</body></html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-grid/grid-fragmentation-032.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+ <meta charset="utf-8">
+ <title>CSS Grid Test: Fragmentation with specified grid height, ensuring margins are calculated properly</title>
+ <link rel="author" title="Brad Werth" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1278058">
+ <link rel="match" href="grid-fragmentation-032-ref.html">
+ <style type="text/css">
+html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+}
+
+.bar111 {
+ float: left;
+ margin: 2px;
+ height: calc(100px + 1px + 10px);
+ width: 30px;
+ background-color: red;
+}
+
+.columns {
+ position:relative;
+ -moz-column-fill: auto;
+ -ms-column-fill: auto;
+ -webkit-column-fill: auto;
+ column-fill: auto;
+ column-gap: 0px;
+ border: 2px dashed;
+ margin-bottom: 20px;
+ height: 150px;
+}
+
+.grid {
+ display: grid;
+ border: 1px solid;
+ margin: 10px;
+}
+
+.block {
+ border: 2px solid blue;
+ width: 50px;
+ margin: 20px;
+}
+
+.columns2 {
+ -moz-columns: 2;
+ -ms-columns: 2;
+ -webkit-columns: 2;
+ columns: 2;
+ width: 300px;
+}
+
+.grid2 {
+ grid: repeat(2, 100px) / 100px;
+}
+
+.block2 {
+ grid-row: span 2;
+}
+
+.columns3 {
+ -moz-columns: 3;
+ -ms-columns: 3;
+ -webkit-columns: 3;
+ columns: 3;
+ width: 450px;
+}
+
+.grid3 {
+ grid: repeat(3, 100px) / 100px;
+}
+
+.block3 {
+ grid-row: span 3;
+}
+
+</style>
+</head>
+<body>
+
+<div class="bar111"></div>
+<div class="columns columns2">
+ <div class="grid grid2">
+ <div class="block block2"></div>
+ </div>
+</div>
+
+<div class="bar111"></div>
+<div class="columns columns3">
+ <div class="grid grid3">
+ <div class="block block3"></div>
+ </div>
+</div>
+
+</body></html>
\ No newline at end of file
--- a/layout/reftests/css-grid/reftest.list
+++ b/layout/reftests/css-grid/reftest.list
@@ -201,16 +201,17 @@ asserts(0-10) == grid-fragmentation-015.
== grid-fragmentation-024.html grid-fragmentation-024-ref.html
== grid-fragmentation-025.html grid-fragmentation-025-ref.html
== grid-fragmentation-026.html grid-fragmentation-026-ref.html
== grid-fragmentation-027.html grid-fragmentation-025-ref.html
== grid-fragmentation-028.html grid-fragmentation-028-ref.html
== grid-fragmentation-029.html grid-fragmentation-029-ref.html
== grid-fragmentation-030.html grid-fragmentation-030-ref.html
== grid-fragmentation-031.html grid-fragmentation-031-ref.html
+== grid-fragmentation-032.html grid-fragmentation-032-ref.html
# Fragmentation tests that does dynamic content removal/insertions.
# They should give the same result as the corresponding static test.
== grid-fragmentation-dyn3-001.html grid-fragmentation-001-ref.html
== grid-fragmentation-dyn4-001.html grid-fragmentation-001-ref.html
== grid-fragmentation-dyn1-002.html grid-fragmentation-002-ref.html
== grid-fragmentation-dyn3-002.html grid-fragmentation-002-ref.html
== grid-fragmentation-dyn3-003.html grid-fragmentation-003-ref.html