summaryrefslogtreecommitdiffstats
path: root/layout/reftests/printing
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/printing')
-rw-r--r--layout/reftests/printing/1108104-ref.html33
-rw-r--r--layout/reftests/printing/1108104.html30
-rw-r--r--layout/reftests/printing/115199-1-ref.html20
-rw-r--r--layout/reftests/printing/115199-1.html25
-rw-r--r--layout/reftests/printing/115199-2-ref.html18
-rw-r--r--layout/reftests/printing/115199-2a.html24
-rw-r--r--layout/reftests/printing/115199-2b.html24
-rw-r--r--layout/reftests/printing/129941-1-ref.html10
-rw-r--r--layout/reftests/printing/129941-1a.html10
-rw-r--r--layout/reftests/printing/129941-1b.html10
-rw-r--r--layout/reftests/printing/129941-1c.html10
-rw-r--r--layout/reftests/printing/129941-1d.html10
-rw-r--r--layout/reftests/printing/129941-1e.html10
-rw-r--r--layout/reftests/printing/1321803-1-ref.html10
-rw-r--r--layout/reftests/printing/1321803-1a.html10
-rw-r--r--layout/reftests/printing/272830-1-ref.html22
-rw-r--r--layout/reftests/printing/272830-1.html22
-rw-r--r--layout/reftests/printing/318022-1-ref.html13
-rw-r--r--layout/reftests/printing/318022-1.html15
-rw-r--r--layout/reftests/printing/381497-f.html10
-rw-r--r--layout/reftests/printing/381497-n.html16
-rw-r--r--layout/reftests/printing/403669-1-ref.html12
-rw-r--r--layout/reftests/printing/403669-1.html13
-rw-r--r--layout/reftests/printing/577450-1-ref.html8
-rw-r--r--layout/reftests/printing/577450-1.html8
-rw-r--r--layout/reftests/printing/609227-1-ref.html12
-rw-r--r--layout/reftests/printing/609227-1.html13
-rw-r--r--layout/reftests/printing/609227-2-ref.html9
-rw-r--r--layout/reftests/printing/609227-2a.html12
-rw-r--r--layout/reftests/printing/609227-2b.html12
-rw-r--r--layout/reftests/printing/626395-1-ref.html8
-rw-r--r--layout/reftests/printing/626395-1a.html9
-rw-r--r--layout/reftests/printing/626395-1b.html9
-rw-r--r--layout/reftests/printing/626395-2-ref.html7
-rw-r--r--layout/reftests/printing/626395-2a.html9
-rw-r--r--layout/reftests/printing/626395-2b.html9
-rw-r--r--layout/reftests/printing/626395-2c.html9
-rw-r--r--layout/reftests/printing/626395-2d.html9
-rw-r--r--layout/reftests/printing/652178-1-ref.html14
-rw-r--r--layout/reftests/printing/652178-1-ref2.html14
-rw-r--r--layout/reftests/printing/652178-1.html17
-rw-r--r--layout/reftests/printing/745025-1-ref.html9
-rw-r--r--layout/reftests/printing/745025-1.html18
-rw-r--r--layout/reftests/printing/820496-1-ref.html7
-rw-r--r--layout/reftests/printing/820496-1.html6
-rw-r--r--layout/reftests/printing/960822-ref.html7
-rw-r--r--layout/reftests/printing/960822.html7
-rw-r--r--layout/reftests/printing/966419-1-ref.html9
-rw-r--r--layout/reftests/printing/966419-1.html9
-rw-r--r--layout/reftests/printing/966419-2-ref.html9
-rw-r--r--layout/reftests/printing/966419-2.html9
-rw-r--r--layout/reftests/printing/blank.html1
-rw-r--r--layout/reftests/printing/reftest-stylo.list52
-rw-r--r--layout/reftests/printing/reftest.list39
-rw-r--r--layout/reftests/printing/test-async-print.html33
55 files changed, 780 insertions, 0 deletions
diff --git a/layout/reftests/printing/1108104-ref.html b/layout/reftests/printing/1108104-ref.html
new file mode 100644
index 000000000..d698cdae5
--- /dev/null
+++ b/layout/reftests/printing/1108104-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+ <meta charset="utf-8">
+ <style type="text/css" media="all">
+@font-face {
+ font-family: 'dvsm';
+ font-style: normal;
+ font-weight: 200;
+ src: url(../fonts/DejaVuSansMono.woff) format('truetype');
+}
+body,html {margin:0; padding:0;}
+.header{
+ font-family: 'dvsm';
+ position:absolute;
+ top:0;
+ left:0;
+ right:0;
+}
+</style>
+</head>
+<body>
+
+ <div class="header">This is a header!</div>
+
+ <p>I'm a paragraph (0)</p>
+ <div style="page-break-before:always;"></div>
+ <div style="height:1px; font-family: 'dvsm';">This is a header!</div>
+ <p style="margin-top:-1px; padding-top:2em;">I'm a paragraph (1)</p>
+
+
+</body>
+</html>
diff --git a/layout/reftests/printing/1108104.html b/layout/reftests/printing/1108104.html
new file mode 100644
index 000000000..b2a166f89
--- /dev/null
+++ b/layout/reftests/printing/1108104.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+ <meta charset="utf-8">
+ <style type="text/css" media="all">
+@font-face {
+ font-family: 'dvsm';
+ font-style: normal;
+ font-weight: 200;
+ src: url(../fonts/DejaVuSansMono.woff) format('truetype');
+}
+body,html {margin:0; padding:0;}
+.header{
+ font-family: 'dvsm';
+ position:fixed;
+ top:0px;
+ left:0;
+ right:0;
+}
+</style>
+</head>
+<body>
+
+ <div class="header">This is a header!</div>
+
+ <p>I'm a paragraph (0)</p>
+ <p style="page-break-before:always; padding-top:2em;">I'm a paragraph (1)</p>
+
+</body>
+</html>
diff --git a/layout/reftests/printing/115199-1-ref.html b/layout/reftests/printing/115199-1-ref.html
new file mode 100644
index 000000000..7899e1c09
--- /dev/null
+++ b/layout/reftests/printing/115199-1-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+ <style>
+ * {
+ margin: 0;
+ padding: 0;
+ }
+ body {
+ margin: 0.1in 0.1in;
+ }
+ div {
+ border: 0.25in solid green;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/printing/115199-1.html b/layout/reftests/printing/115199-1.html
new file mode 100644
index 000000000..1aaef1e7b
--- /dev/null
+++ b/layout/reftests/printing/115199-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+ <style>
+ @page {
+ /*
+ * Default page margins are .5in and the reference file adds .1inch margin
+ * to the body hence we do .6in to match this.
+ */
+ margin: 0.6in;
+ }
+ * {
+ margin: 0;
+ padding: 0;
+ }
+ div {
+ width: 100%;
+ border: 0.25in solid green;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/printing/115199-2-ref.html b/layout/reftests/printing/115199-2-ref.html
new file mode 100644
index 000000000..b6c15e62d
--- /dev/null
+++ b/layout/reftests/printing/115199-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+ <style>
+ * {
+ margin: 0;
+ padding: 0;
+ }
+ div {
+ width: 100%;
+ border: 0.25in solid green;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/printing/115199-2a.html b/layout/reftests/printing/115199-2a.html
new file mode 100644
index 000000000..1e70f47e3
--- /dev/null
+++ b/layout/reftests/printing/115199-2a.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+ <style>
+ @page {
+ /*
+ * Test a margin that causes the page to have zero width.
+ */
+ margin: 0 2.5in;
+ }
+ * {
+ margin: 0;
+ padding: 0;
+ }
+ div {
+ width: 100%;
+ border: 0.25in solid green;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/printing/115199-2b.html b/layout/reftests/printing/115199-2b.html
new file mode 100644
index 000000000..620542fe2
--- /dev/null
+++ b/layout/reftests/printing/115199-2b.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+ <style>
+ @page {
+ /*
+ * Test huge margins, they should be reset back the default margin size.
+ */
+ margin: 10in;
+ }
+ * {
+ margin: 0;
+ padding: 0;
+ }
+ div {
+ width: 100%;
+ border: 0.25in solid green;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/printing/129941-1-ref.html b/layout/reftests/printing/129941-1-ref.html
new file mode 100644
index 000000000..e52de4795
--- /dev/null
+++ b/layout/reftests/printing/129941-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0">
+ <body style="margin: 0; padding: 0">
+ <div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green; border-bottom: none"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/129941-1a.html b/layout/reftests/printing/129941-1a.html
new file mode 100644
index 000000000..fbfe485d2
--- /dev/null
+++ b/layout/reftests/printing/129941-1a.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0;">
+ <body style="margin: 0; padding: 0;">
+ <div style="overflow: scroll; height: 5in;">
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/129941-1b.html b/layout/reftests/printing/129941-1b.html
new file mode 100644
index 000000000..fc89006af
--- /dev/null
+++ b/layout/reftests/printing/129941-1b.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0;">
+ <body style="margin: 0; padding: 0;">
+ <div style="overflow: -moz-hidden-unscrollable; height: 5in;">
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/129941-1c.html b/layout/reftests/printing/129941-1c.html
new file mode 100644
index 000000000..1ae18cc2e
--- /dev/null
+++ b/layout/reftests/printing/129941-1c.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0; overflow: hidden">
+ <body style="margin: 0; padding: 0; overflow: scroll; height: 5in">
+ <div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/129941-1d.html b/layout/reftests/printing/129941-1d.html
new file mode 100644
index 000000000..b743d1a5a
--- /dev/null
+++ b/layout/reftests/printing/129941-1d.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0; overflow: hidden">
+ <body style="margin: 0; padding: 0; overflow: -moz-hidden-unscrollable; height: 5in;">
+ <div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/129941-1e.html b/layout/reftests/printing/129941-1e.html
new file mode 100644
index 000000000..5e9847745
--- /dev/null
+++ b/layout/reftests/printing/129941-1e.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0;">
+ <body style="margin: 0; padding: 0; overflow: -moz-hidden-unscrollable; height: 5in;">
+ <div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/1321803-1-ref.html b/layout/reftests/printing/1321803-1-ref.html
new file mode 100644
index 000000000..0dbb78cfa
--- /dev/null
+++ b/layout/reftests/printing/1321803-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0">
+ <body style="margin: 0; padding: 0">
+ <div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green;"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/1321803-1a.html b/layout/reftests/printing/1321803-1a.html
new file mode 100644
index 000000000..a5262b7ed
--- /dev/null
+++ b/layout/reftests/printing/1321803-1a.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-print" style="margin: 0; padding: 0;">
+ <body style="margin: 0; padding: 0; overflow: scroll; height: 5in">
+ <div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ <div style="height: 1.25in; border: 0.25in solid green"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/272830-1-ref.html b/layout/reftests/printing/272830-1-ref.html
new file mode 100644
index 000000000..4fb052949
--- /dev/null
+++ b/layout/reftests/printing/272830-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html><html class="reftest-print"><style>html{font-size:12pt}</style>
+<table>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>xxxxxxxxxxxxxxxxxxx</td></tr>
+ <tr><td>last line</td></tr>
+
+</table>
+
+</body>
+
+</html>
diff --git a/layout/reftests/printing/272830-1.html b/layout/reftests/printing/272830-1.html
new file mode 100644
index 000000000..4683b75a5
--- /dev/null
+++ b/layout/reftests/printing/272830-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html><html class="reftest-print"><style>html{font-size:12pt}</style>
+<table>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>last line</td></tr></tbody>
+
+</table>
+
+</body>
+
+</html>
diff --git a/layout/reftests/printing/318022-1-ref.html b/layout/reftests/printing/318022-1-ref.html
new file mode 100644
index 000000000..c844e8385
--- /dev/null
+++ b/layout/reftests/printing/318022-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html><html class="reftest-print">
+<head>
+<style type="text/css" media="all">
+html{font-size:12pt}
+#c {page-break-before:always;}
+</style>
+</head>
+<body>
+<div>Line 1</div>
+<div>Line 2</div>
+<div id="c">Line 3</div>
+</body>
+</html>
diff --git a/layout/reftests/printing/318022-1.html b/layout/reftests/printing/318022-1.html
new file mode 100644
index 000000000..189cc623d
--- /dev/null
+++ b/layout/reftests/printing/318022-1.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html><html class="reftest-print">
+<head>
+<style type="text/css" media="all">
+html{font-size:12pt}
+#a {float:left;}
+#b {clear:both;}
+#c {page-break-before:always;}
+</style>
+</head>
+<body>
+<div id="a">Line 1</div>
+<div id="b">Line 2</div>
+<div id="c">Line 3</div>
+</body>
+</html>
diff --git a/layout/reftests/printing/381497-f.html b/layout/reftests/printing/381497-f.html
new file mode 100644
index 000000000..e05befb94
--- /dev/null
+++ b/layout/reftests/printing/381497-f.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html class="reftest-print">
+<title>Height test</title>
+
+<div style="top: 0; left: 0; right: 0; position: fixed; height: 100%; border-left: 2em blue solid;">
+The left border of this box must span the entire page content area.
+This box must be repeated on the second page.
+</div>
+
+<p style="page-break-before: always;">...
diff --git a/layout/reftests/printing/381497-n.html b/layout/reftests/printing/381497-n.html
new file mode 100644
index 000000000..791d5aede
--- /dev/null
+++ b/layout/reftests/printing/381497-n.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html class="reftest-print">
+<title>Height test</title>
+<style type="text/css">
+ html, body { height: 100%; margin: 0; padding: 0;}
+</style>
+
+
+<div style="height: 100%; border-left: 2em blue solid;">
+The left border of this box must span the entire page content area.
+This box must be repeated on the second page.
+</div>
+<div style="height: 100%; border-left: 2em blue solid;">
+The left border of this box must span the entire page content area.
+This box must be repeated on the second page.
+</div> \ No newline at end of file
diff --git a/layout/reftests/printing/403669-1-ref.html b/layout/reftests/printing/403669-1-ref.html
new file mode 100644
index 000000000..5d14e048a
--- /dev/null
+++ b/layout/reftests/printing/403669-1-ref.html
@@ -0,0 +1,12 @@
+<html class="reftest-print">
+<body>
+ <table cellspacing="0" cellpadding="0"
+ width="1px">
+ <tr><td>
+ a a a a a a a a a a a a a a
+ a a a a a a a a a a a a a a
+ </td></tr>
+ </table>
+ Ending Text
+</body>
+</html>
diff --git a/layout/reftests/printing/403669-1.html b/layout/reftests/printing/403669-1.html
new file mode 100644
index 000000000..8958ef982
--- /dev/null
+++ b/layout/reftests/printing/403669-1.html
@@ -0,0 +1,13 @@
+<html class="reftest-print">
+<body>
+ <table cellspacing="0" cellpadding="0"
+ height="100px"
+ width="1px">
+ <tr><td>
+ a a a a a a a a a a a a a a
+ a a a a a a a a a a a a a a
+ </td></tr>
+ </table>
+ Ending Text
+</body>
+</html>
diff --git a/layout/reftests/printing/577450-1-ref.html b/layout/reftests/printing/577450-1-ref.html
new file mode 100644
index 000000000..ac7535115
--- /dev/null
+++ b/layout/reftests/printing/577450-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="position: fixed; color: green; font-size: 2em">Big green text</div>
+ <!-- force two pages -->
+ <div style="height: 3in; width: 2in"></div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/577450-1.html b/layout/reftests/printing/577450-1.html
new file mode 100644
index 000000000..a30c84ef3
--- /dev/null
+++ b/layout/reftests/printing/577450-1.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body style="color: green; font-size: 2em">
+ <div style="position: fixed">Big green text</div>
+ <!-- force two pages -->
+ <div style="height: 3in; width: 2in"></div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/609227-1-ref.html b/layout/reftests/printing/609227-1-ref.html
new file mode 100644
index 000000000..1def35989
--- /dev/null
+++ b/layout/reftests/printing/609227-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html style="overflow: hidden; height: 100%; margin: 0; padding:0"
+ class="reftest-print">
+ <body style="overflow: hidden; height: 100%; margin: 0; padding:0">
+ <!-- Hidden overflow on the inline-block to put its baseline at its bottom
+ edge, as in the original issue in bug 609227 -->
+ <div style="height: 100%; display: inline-block; overflow: hidden">
+ Some text
+ </div>
+ </body>
+</html>
+
diff --git a/layout/reftests/printing/609227-1.html b/layout/reftests/printing/609227-1.html
new file mode 100644
index 000000000..f934716cb
--- /dev/null
+++ b/layout/reftests/printing/609227-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html style="overflow: hidden; height: 100%; margin: 0; padding: 0"
+ class="reftest-print">
+ <body style="overflow: hidden; height: 100%; margin: 0; padding:0">
+ <div></div>
+ <!-- Hidden overflow on the inline-block to put its baseline at its bottom
+ edge, as in the original issue in bug 609227 -->
+ <div style="height: 100%; display: inline-block; overflow: hidden">
+ Some text
+ </div>
+ </body>
+</html>
+
diff --git a/layout/reftests/printing/609227-2-ref.html b/layout/reftests/printing/609227-2-ref.html
new file mode 100644
index 000000000..dc8a1231d
--- /dev/null
+++ b/layout/reftests/printing/609227-2-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="page-break-before: always">
+ <div style="display: inline-block; width: 1in; height: 1in">
+ Should be on second page
+ </div>
+ </div>
+</html>
diff --git a/layout/reftests/printing/609227-2a.html b/layout/reftests/printing/609227-2a.html
new file mode 100644
index 000000000..15aaca252
--- /dev/null
+++ b/layout/reftests/printing/609227-2a.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div>
+ <div style="float: left; width: 3.5in; height: 1.5in;"></div>
+ </div>
+ <div>
+ <div style="display: inline-block; width: 1in; height: 1in">
+ Should be on second page
+ </div>
+ </div>
+</html>
diff --git a/layout/reftests/printing/609227-2b.html b/layout/reftests/printing/609227-2b.html
new file mode 100644
index 000000000..cb0e7730c
--- /dev/null
+++ b/layout/reftests/printing/609227-2b.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <!-- Key: no whitespace between float and inline-block -->
+ <div>
+ <div style="float: left; width: 3.5in;
+ height: 1.5in;"></div></div><div><div
+ style="display: inline-block; width: 1in; height: 1in">
+ Should be on second page
+ </div>
+ </div>
+</html>
diff --git a/layout/reftests/printing/626395-1-ref.html b/layout/reftests/printing/626395-1-ref.html
new file mode 100644
index 000000000..bb44e5ce0
--- /dev/null
+++ b/layout/reftests/printing/626395-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: hidden; height: 3in">
+ </div>
+ Some text
+ </body>
+</html>
diff --git a/layout/reftests/printing/626395-1a.html b/layout/reftests/printing/626395-1a.html
new file mode 100644
index 000000000..5c3df2d33
--- /dev/null
+++ b/layout/reftests/printing/626395-1a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: hidden; height: 3in;">
+ <div style="height: 10in;"></div>
+ </div>
+ Some text
+ </body>
+</html>
diff --git a/layout/reftests/printing/626395-1b.html b/layout/reftests/printing/626395-1b.html
new file mode 100644
index 000000000..9276ff2ce
--- /dev/null
+++ b/layout/reftests/printing/626395-1b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: -moz-hidden-unscrollable; height: 3in;">
+ <div style="height: 10in;"></div>
+ </div>
+ Some text
+ </body>
+</html>
diff --git a/layout/reftests/printing/626395-2-ref.html b/layout/reftests/printing/626395-2-ref.html
new file mode 100644
index 000000000..710d612ff
--- /dev/null
+++ b/layout/reftests/printing/626395-2-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: hidden; height: 3in">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/626395-2a.html b/layout/reftests/printing/626395-2a.html
new file mode 100644
index 000000000..ec32da78f
--- /dev/null
+++ b/layout/reftests/printing/626395-2a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: hidden; height: 3in;
+ padding-bottom: 0.5in; margin-bottom: 5in">
+ <div style="height: 10in;"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/626395-2b.html b/layout/reftests/printing/626395-2b.html
new file mode 100644
index 000000000..d1e38c9ad
--- /dev/null
+++ b/layout/reftests/printing/626395-2b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: -moz-hidden-unscrollable; height: 3in;
+ padding-bottom: 0.5in; margin-bottom: 5in">
+ <div style="height: 10in;"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/626395-2c.html b/layout/reftests/printing/626395-2c.html
new file mode 100644
index 000000000..b8691b806
--- /dev/null
+++ b/layout/reftests/printing/626395-2c.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: hidden; height: 1in;
+ padding-bottom: 1in; border-bottom: 1in solid transparent">
+ <div style="height: 10in;"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/626395-2d.html b/layout/reftests/printing/626395-2d.html
new file mode 100644
index 000000000..d2082b2ab
--- /dev/null
+++ b/layout/reftests/printing/626395-2d.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+ <body>
+ <div style="overflow: -moz-hidden-unscrollable; height: 1in;
+ padding-bottom: 1in; border-bottom: 1in solid transparent">
+ <div style="height: 10in;"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/652178-1-ref.html b/layout/reftests/printing/652178-1-ref.html
new file mode 100644
index 000000000..cd9c91ec0
--- /dev/null
+++ b/layout/reftests/printing/652178-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<body>
+ Something
+ <div>
+ <div style="width: 60%; float: left; border: 5px solid green;">
+ This should print on page 1
+ </div>
+
+ <!-- This just needs to be taller than a page -->
+ <div style="width: 30%; float: right; border: 5px solid purple; height: 3in">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/652178-1-ref2.html b/layout/reftests/printing/652178-1-ref2.html
new file mode 100644
index 000000000..21aa2a783
--- /dev/null
+++ b/layout/reftests/printing/652178-1-ref2.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<body>
+ Something
+ <div style="height: 0">
+ <div style="width: 60%; border: 5px solid green;">
+ This should print on page 1
+ </div>
+ </div>
+
+ <div style="width: 30%; margin-left: auto; border: 5px solid purple; height: 3in">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/652178-1.html b/layout/reftests/printing/652178-1.html
new file mode 100644
index 000000000..4be937f86
--- /dev/null
+++ b/layout/reftests/printing/652178-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<body>
+ Something
+ <div>
+ <div style="width: 60%; float: left; border: 5px solid green;">
+ This should print on page 1
+ </div>
+
+ <!-- This just needs to be taller than a page -->
+ <div style="width: 30%; float: right; border: 5px solid purple; height: 3in">
+ </div>
+
+ <!-- This is needed! -->
+ <div style="clear: both"></div>
+ </body>
+</html>
diff --git a/layout/reftests/printing/745025-1-ref.html b/layout/reftests/printing/745025-1-ref.html
new file mode 100644
index 000000000..44f0b10da
--- /dev/null
+++ b/layout/reftests/printing/745025-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head>
+
+</head>
+<body>
+<!-- A 10x10 red image --><img style="-moz-transform: perspective(1px)" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFElEQVQYlWP4z8DwnxjMMKqQvgoBksPHOVp9kXEAAAAASUVORK5CYII=">
+</body>
+</html>
diff --git a/layout/reftests/printing/745025-1.html b/layout/reftests/printing/745025-1.html
new file mode 100644
index 000000000..40420636d
--- /dev/null
+++ b/layout/reftests/printing/745025-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-print">
+<body>
+<canvas id="canvas" width="10" height="10"></canvas>
+<script>
+var canvas = document.getElementById('canvas');
+canvas.mozPrintCallback = function(obj) {
+ setTimeout(function() {
+ var ctx = obj.context;
+ ctx.fillStyle = 'rgb(255, 0, 0)';
+ ctx.fillRect(0, 0, 10, 10);
+ obj.done();
+ document.documentElement.classList.toggle("reftest-wait");
+ }, 0);
+};
+</script>
+</body>
+</html>
diff --git a/layout/reftests/printing/820496-1-ref.html b/layout/reftests/printing/820496-1-ref.html
new file mode 100644
index 000000000..eaacdf437
--- /dev/null
+++ b/layout/reftests/printing/820496-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<body style="margin:0">
+ <div style="height:10000px; background:blue;">
+ <div style="height:5000px; width:50%; background:yellow;">
+</body>
+</html>
diff --git a/layout/reftests/printing/820496-1.html b/layout/reftests/printing/820496-1.html
new file mode 100644
index 000000000..83f1ebb3f
--- /dev/null
+++ b/layout/reftests/printing/820496-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<body style="margin:0; height:10000px; background:blue;">
+ <div style="height:5000px; width:50%; background:yellow;">
+</body>
+</html>
diff --git a/layout/reftests/printing/960822-ref.html b/layout/reftests/printing/960822-ref.html
new file mode 100644
index 000000000..a3ed74fc4
--- /dev/null
+++ b/layout/reftests/printing/960822-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head><meta charset="utf-8"></head>
+<body>
+<div style="width:100in; border:solid blue;">line</div>
+</body>
+</html>
diff --git a/layout/reftests/printing/960822.html b/layout/reftests/printing/960822.html
new file mode 100644
index 000000000..bdab0ae0f
--- /dev/null
+++ b/layout/reftests/printing/960822.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head><meta charset="utf-8"></head>
+<body>
+<div style="width:30in; border:solid blue;">line</div>
+</body>
+</html>
diff --git a/layout/reftests/printing/966419-1-ref.html b/layout/reftests/printing/966419-1-ref.html
new file mode 100644
index 000000000..5535357f5
--- /dev/null
+++ b/layout/reftests/printing/966419-1-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head><meta charset="utf-8"></head>
+<body>
+<div style="width:8in; border:solid blue">line</div>
+<div style="page-break-before:always"></div>
+<div style="width:1in;height:1em"></div>
+</body>
+</html>
diff --git a/layout/reftests/printing/966419-1.html b/layout/reftests/printing/966419-1.html
new file mode 100644
index 000000000..99207ee9c
--- /dev/null
+++ b/layout/reftests/printing/966419-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head><meta charset="utf-8"></head>
+<body>
+<div style="width:8in; border:solid blue">line</div>
+<div style="page-break-before:always"></div>
+<div style="width:6in;height:1em"></div>
+</body>
+</html>
diff --git a/layout/reftests/printing/966419-2-ref.html b/layout/reftests/printing/966419-2-ref.html
new file mode 100644
index 000000000..f4e8415d6
--- /dev/null
+++ b/layout/reftests/printing/966419-2-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head><meta charset="utf-8"></head>
+<body>
+<div style="width:1in;height:1em"></div>
+<div style="page-break-before:always"></div>
+<div style="width:8in; border:solid blue">line</div>
+</body>
+</html>
diff --git a/layout/reftests/printing/966419-2.html b/layout/reftests/printing/966419-2.html
new file mode 100644
index 000000000..82797b792
--- /dev/null
+++ b/layout/reftests/printing/966419-2.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html class="reftest-print">
+<head><meta charset="utf-8"></head>
+<body>
+<div style="width:6in;height:1em"></div>
+<div style="page-break-before:always"></div>
+<div style="width:8in; border:solid blue">line</div>
+</body>
+</html>
diff --git a/layout/reftests/printing/blank.html b/layout/reftests/printing/blank.html
new file mode 100644
index 000000000..180da60ea
--- /dev/null
+++ b/layout/reftests/printing/blank.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html class="reftest-print"><style>html{font-size:12pt}</style>
diff --git a/layout/reftests/printing/reftest-stylo.list b/layout/reftests/printing/reftest-stylo.list
new file mode 100644
index 000000000..2324cd008
--- /dev/null
+++ b/layout/reftests/printing/reftest-stylo.list
@@ -0,0 +1,52 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+# Sanity check
+skip == blank.html blank.html
+
+# Bugs
+== 272830-1.html 272830-1.html
+== 318022-1.html 318022-1.html
+== 403669-1.html 403669-1.html
+random-if((B2G&&browserIsRemote)||Mulet) == 381497-n.html 381497-n.html
+# reftest-print doesn't work on B2G (scrollbar difference only)
+# Initial mulet triage: parity with B2G/B2G Desktop
+== test-async-print.html test-async-print.html
+fails-if(B2G||Mulet) == 129941-1a.html 129941-1a.html
+# reftest-print doesn't work on B2G
+# Initial mulet triage: parity with B2G/B2G Desktop
+== 129941-1b.html 129941-1b.html
+== 609227-1.html 609227-1.html
+fails-if(B2G||Mulet) == 609227-2a.html 609227-2a.html
+# reftest-print doesn't work on B2G
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(B2G||Mulet) == 609227-2b.html 609227-2b.html
+# reftest-print doesn't work on B2G
+# Initial mulet triage: parity with B2G/B2G Desktop
+== 577450-1.html 577450-1.html
+== 626395-1a.html 626395-1a.html
+== 626395-1b.html 626395-1b.html
+== 626395-2a.html 626395-2a.html
+== 626395-2b.html 626395-2b.html
+== 626395-2c.html 626395-2c.html
+== 626395-2d.html 626395-2d.html
+== 652178-1.html 652178-1.html
+fails-if(B2G||Mulet) == 115199-1.html 115199-1.html
+# reftest-print doesn't work on B2G
+# Initial mulet triage: parity with B2G/B2G Desktop
+== 115199-2a.html 115199-2a.html
+== 115199-2b.html 115199-2b.html
+== 652178-1.html 652178-1.html
+skip-if(B2G||Mulet) fuzzy-if(cocoaWidget,1,5000) == 745025-1.html 745025-1.html
+# reftest-print doesn't work on B2G
+# Initial mulet triage: parity with B2G/B2G Desktop
+== 820496-1.html 820496-1.html
+
+# NOTE: These tests don't yet rigorously test what they're
+# trying to test (shrink-to-fit behavior), due to bug 967311.
+random-if((B2G&&browserIsRemote)||Mulet) == 960822.html 960822.html
+# reftest-print doesn't work on B2G (scrollbar difference only)
+# Initial mulet triage: parity with B2G/B2G Desktop
+== 966419-1.html 966419-1.html
+== 966419-2.html 966419-2.html
+# skip-if(B2G||Mulet) asserts(3) HTTP(..) fails 1108104.html 1108104-ref.html
+# bug 1067755, 1135556
+# Initial mulet triage: parity with B2G/B2G Desktop
diff --git a/layout/reftests/printing/reftest.list b/layout/reftests/printing/reftest.list
new file mode 100644
index 000000000..ef821a87c
--- /dev/null
+++ b/layout/reftests/printing/reftest.list
@@ -0,0 +1,39 @@
+# Sanity check
+== blank.html blank.html
+
+# Bugs
+== 272830-1.html 272830-1-ref.html
+== 318022-1.html 318022-1-ref.html
+== 403669-1.html 403669-1-ref.html
+== 381497-n.html 381497-f.html
+== test-async-print.html 272830-1-ref.html
+== 129941-1a.html 129941-1-ref.html
+== 129941-1b.html 129941-1-ref.html
+== 129941-1c.html 129941-1-ref.html
+== 129941-1d.html 129941-1-ref.html
+== 129941-1e.html 129941-1-ref.html
+== 609227-1.html 609227-1-ref.html
+== 609227-2a.html 609227-2-ref.html
+== 609227-2b.html 609227-2-ref.html
+== 577450-1.html 577450-1-ref.html
+== 626395-1a.html 626395-1-ref.html
+== 626395-1b.html 626395-1-ref.html
+== 626395-2a.html 626395-2-ref.html
+== 626395-2b.html 626395-2-ref.html
+== 626395-2c.html 626395-2-ref.html
+== 626395-2d.html 626395-2-ref.html
+== 652178-1.html 652178-1-ref.html
+== 115199-1.html 115199-1-ref.html
+== 115199-2a.html 115199-2-ref.html
+== 115199-2b.html 115199-2-ref.html
+== 652178-1.html 652178-1-ref2.html
+fuzzy-if(cocoaWidget,1,5000) == 745025-1.html 745025-1-ref.html
+== 820496-1.html 820496-1-ref.html
+
+# NOTE: These tests don't yet rigorously test what they're
+# trying to test (shrink-to-fit behavior), due to bug 967311.
+== 960822.html 960822-ref.html
+== 966419-1.html 966419-1-ref.html
+== 966419-2.html 966419-2-ref.html
+# asserts(3) HTTP(..) fails 1108104.html 1108104-ref.html # bug 1067755, 1135556
+== 1321803-1a.html 1321803-1-ref.html
diff --git a/layout/reftests/printing/test-async-print.html b/layout/reftests/printing/test-async-print.html
new file mode 100644
index 000000000..f3b5f09f3
--- /dev/null
+++ b/layout/reftests/printing/test-async-print.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html><html class="reftest-wait reftest-print"><style>html{font-size:12pt}</style>
+<head>
+ <script type="text/javascript">
+
+ window.onload = function (){
+ setTimeout(function() {
+ document.documentElement.className = "reftest-print";},
+ 1000);
+ }
+ </script>
+</head>
+<body>
+<table>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>xxxxxxxxxxxxxxxxxxx</td></tr></tbody>
+ <tbody><tr><td>last line</td></tr></tbody>
+
+</table>
+
+</body>
+
+</html>