summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-overflow/reference
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-overflow/reference
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-overflow/reference')
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/input-scrollable-region-001-ref.html22
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/overflow-body-no-propagation-ref.html5
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/overflow-body-propagation-ref.html5
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/overflow-ellipsis-dynamic-001-ref.html12
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/overflow-inline-block-with-opacity-ref.html8
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/overflow-recalc-001-ref.html20
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/ref-if-there-is-no-red.xht18
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-001-ref.html14
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-002-ref.html13
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-rtl-001-ref.html15
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-001-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-rtl-001-ref.html18
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-001-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-rtl-001-ref.html16
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-001-ref.html20
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-rtl-001-ref.html19
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-001-ref.html15
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-005-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-006-ref.html18
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-007-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-008-ref.html18
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-009-ref.html19
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-010-ref.html20
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-011-ref.html21
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-012-ref.html21
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-013-ref.html20
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-014-ref.html16
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-015-ref.html19
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-016-ref.html15
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-017-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-018-ref.html19
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-019-ref.html19
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-020-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-021-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-022-ref.html16
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-023-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-024-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-025-ref.html19
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-026-ref.html18
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-027-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-029-ref.html20
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-030-ref.html18
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-031-ref.html22
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-032-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-035-ref.html22
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-036-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-037-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-038-ref.html16
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-039-ref.html16
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-040-ref.html16
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-block-in-inline-001-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-dynamic-001-ref.html16
-rw-r--r--testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-with-line-height-ref.html19
53 files changed, 901 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-overflow/reference/input-scrollable-region-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/input-scrollable-region-001-ref.html
new file mode 100644
index 0000000000..d7125ee2ef
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/input-scrollable-region-001-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Basic User Interface Reference File</title>
+<link rel="author" title="Boaz Sender, Ali Juma, Robert Ma">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+input {
+ font-family: Ahem;
+ width: 100px;
+ margin: 0px;
+ border: 1px solid black;
+ height: 30px;
+ padding: 0px 10px;
+ font-size: 18px;
+ box-sizing: border-box;
+ line-height: 1;
+}
+
+</style>
+<body>
+ <input type="text" value="foo">
+</body>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/overflow-body-no-propagation-ref.html b/testing/web-platform/tests/css/css-overflow/reference/overflow-body-no-propagation-ref.html
new file mode 100644
index 0000000000..9795d1f586
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/overflow-body-no-propagation-ref.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<html style="overflow:auto">
+<title>CSS Overflow Test Reference</title>
+<body style="margin-top:100px;overflow:scroll">The body should have scrollbars, not the viewport.</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/overflow-body-propagation-ref.html b/testing/web-platform/tests/css/css-overflow/reference/overflow-body-propagation-ref.html
new file mode 100644
index 0000000000..340bda9de9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/overflow-body-propagation-ref.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<html style="overflow:scroll">
+<title>CSS Overflow Test Reference</title>
+<body style="margin-top:100px">The viewport should have scrollbars, not the body.</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/overflow-ellipsis-dynamic-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/overflow-ellipsis-dynamic-001-ref.html
new file mode 100644
index 0000000000..85f8c50a8d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/overflow-ellipsis-dynamic-001-ref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<title>CSS test reference</title>
+<style>
+p {
+ width: 40ch;
+ font: 16px/1 monospace;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+}
+</style>
+<p>short<p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/overflow-inline-block-with-opacity-ref.html b/testing/web-platform/tests/css/css-overflow/reference/overflow-inline-block-with-opacity-ref.html
new file mode 100644
index 0000000000..1b37bfffb7
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/overflow-inline-block-with-opacity-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+ span { opacity: 0.99; }
+ #button { display: inline-block; }
+</style>
+<span>
+ <div id="button">hello<br>world</div>
+</span>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/overflow-recalc-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/overflow-recalc-001-ref.html
new file mode 100644
index 0000000000..b18dee8caf
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/overflow-recalc-001-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: Reference Overflow recalc after font-size change</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<style>
+#scroller {
+ height: 200px;
+ overflow: scroll;
+}
+#wrapper {
+ margin-top: 100px;
+ width: 200px;
+ height: 200px;
+ background: green;
+}
+</style>
+<p>Test passes if there is <strong>no red</strong>.</p>
+<div id="scroller">
+ <div id="wrapper"></div>
+</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/ref-if-there-is-no-red.xht b/testing/web-platform/tests/css/css-overflow/reference/ref-if-there-is-no-red.xht
new file mode 100644
index 0000000000..a5b4e9f47a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/ref-if-there-is-no-red.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+ <title>CSS Reftest Reference</title>
+
+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+ <p>Test passes if there is <strong>no red</strong>.</p>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-001-ref.html
new file mode 100644
index 0000000000..814bfd6a2f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-001-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ font: 100px/1 Ahem;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+<div>ppp</div>
+<div>pppp</div>
+<div>pppX</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-002-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-002-ref.html
new file mode 100644
index 0000000000..cf26b6b8c8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-002-ref.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<link rel="stylesheet" href="/fonts/ahem.css">
+<style>
+div {
+ background-color: green;
+ display: inline-block;
+ vertical-align: top;
+ font-family: Ahem;
+}
+</style>
+<div><span>ABC</span><span style="visibility: hidden">…</span></div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-rtl-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-rtl-001-ref.html
new file mode 100644
index 0000000000..5c75e38d83
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-rtl-001-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ font: 100px/1 Ahem;
+ white-space: pre;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+<div> ppp</div>
+<div>pppp</div>
+<div>Xppp</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-001-ref.html
new file mode 100644
index 0000000000..18f8a1beae
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-001-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ font: 100px/1 Ahem;
+ height: 400px;
+ display: inline-block;
+ writing-mode: vertical-lr;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+<div>ppp</div>
+<div>pppp</div>
+<div>pppX</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-rtl-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-rtl-001-ref.html
new file mode 100644
index 0000000000..1c9e660331
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-ellipsis-vertical-rtl-001-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ font: 100px/1 Ahem;
+ height: 400px;
+ display: inline-block;
+ writing-mode: vertical-lr;
+ direction: rtl;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+<div>ppp</div>
+<div>pppp</div>
+<div>Xppp</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-001-ref.html
new file mode 100644
index 0000000000..18836f3204
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-001-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis and scrolling reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ font: 100px/1 Ahem;
+ white-space: pre;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+
+<div>p pX</div>
+<div>pp p</div>
+<div> pX</div>
+<div>pp p</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-rtl-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-rtl-001-ref.html
new file mode 100644
index 0000000000..4be95f4fb9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-rtl-001-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis and scrolling reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ font: 100px/1 Ahem;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+
+<div>X pp</div>
+<div>ppp</div>
+<div>Xp</div>
+<div>ppp</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-001-ref.html
new file mode 100644
index 0000000000..8b671171e6
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-001-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis and scrolling reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ display: inline-block;
+ writing-mode: vertical-lr;
+ font: 100px/1 Ahem;
+ height: 400px;
+ white-space: pre;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+
+<div>p pX</div>
+<div>pp p</div>
+<div> pX</div>
+<div>pp p</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-rtl-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-rtl-001-ref.html
new file mode 100644
index 0000000000..fff3dec59c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/text-overflow-scroll-vertical-lr-rtl-001-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: text-overflow: ellipsis and scrolling reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ div {
+ display: inline-block;
+ writing-mode: vertical-lr;
+ font: 100px/1 Ahem;
+ height: 400px;
+ }
+</style>
+<p>The test passes if it matches the reference.</p>
+
+<div>X pp</div>
+<div>ppp</div>
+<div>Xp</div>
+<div>ppp</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-001-ref.html
new file mode 100644
index 0000000000..ef28e01dac
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-001-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ font: 16px / 32px serif;
+ white-space: pre;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+Line 4
+Line 5</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-005-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-005-ref.html
new file mode 100644
index 0000000000..c9a9ae5d7f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-005-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+Line 4…</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-006-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-006-ref.html
new file mode 100644
index 0000000000..3a17a6d5f3
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-006-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+Line 4…</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-007-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-007-ref.html
new file mode 100644
index 0000000000..1c9a728aaf
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-007-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2
+Line 3
+Line 4…</div></div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-008-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-008-ref.html
new file mode 100644
index 0000000000..4ead437830
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-008-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: block;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2
+Line 3</div><div>Line A
+Line B
+Line C</div>Line 一
+Line 二…</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-009-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-009-ref.html
new file mode 100644
index 0000000000..62e100d633
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-009-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+.child {
+ font: 24px / 48px serif;
+ color: blue;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2<div class="child">Line 3…</div></div></div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-010-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-010-ref.html
new file mode 100644
index 0000000000..63e9885e8b
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-010-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+.child {
+ font: 24px / 48px serif;
+ color: blue;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2<div class="child">Line 3
+Line 4</div>Line 5…</div></div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-011-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-011-ref.html
new file mode 100644
index 0000000000..fbcd8ca311
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-011-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+.child {
+ font: 24px / 48px serif;
+ color: blue;
+ padding: 0 4px;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2<div class="child">Line 3
+Line 4</div>Line 5…</div></div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-012-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-012-ref.html
new file mode 100644
index 0000000000..d28c9388ae
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-012-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+.child {
+ display: flex;
+ font: 24px / 48px serif;
+ color: blue;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2<div class="child">Line 3
+Line 4</div>Line 5…</div></div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-013-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-013-ref.html
new file mode 100644
index 0000000000..ba14aefc7c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-013-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+.child {
+ font: 24px / 48px serif;
+ color: blue;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2<table class="child" border="1"><tr><td>Line 3
+Line 4</td></tr></table>Line 5…</div></div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-014-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-014-ref.html
new file mode 100644
index 0000000000..c7346ab527
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-014-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+ direction: rtl;
+}
+</style>
+<div class="clamp">Line 1
+Line 2…</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-015-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-015-ref.html
new file mode 100644
index 0000000000..d73bc7d7cb
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-015-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: horizontal;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 4px 0;
+ background-color: yellow;
+ writing-mode: vertical-rl;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+Line 4
+Line 5</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-016-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-016-ref.html
new file mode 100644
index 0000000000..e54947e395
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-016-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2…</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-017-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-017-ref.html
new file mode 100644
index 0000000000..043e5f3d1c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-017-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3…</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-018-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-018-ref.html
new file mode 100644
index 0000000000..b95f7ce766
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-018-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+Line 4
+Line 5</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-019-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-019-ref.html
new file mode 100644
index 0000000000..b95f7ce766
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-019-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+Line 4
+Line 5</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-020-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-020-ref.html
new file mode 100644
index 0000000000..043e5f3d1c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-020-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3…</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-021-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-021-ref.html
new file mode 100644
index 0000000000..043e5f3d1c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-021-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3…</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-022-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-022-ref.html
new file mode 100644
index 0000000000..29d738589d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-022-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-023-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-023-ref.html
new file mode 100644
index 0000000000..3127bb078b
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-023-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-024-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-024-ref.html
new file mode 100644
index 0000000000..d4820a1b48
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-024-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: inline-block;
+ overflow: hidden;
+ font: 16px / 32px monospace;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+Before <div class="clamp">Line 1
+Line 2
+Line …</div> After</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-025-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-025-ref.html
new file mode 100644
index 0000000000..c33a6b5033
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-025-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px monospace;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+ width: 11ch;
+}
+.float {
+ float: right;
+ color: orange;
+}
+</style>
+<div class="clamp"><div><div class="float">[f]</div>A B C D…</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-026-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-026-ref.html
new file mode 100644
index 0000000000..e4c1b03349
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-026-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px monospace;
+ white-space: pre;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+Line 4
+Line 5</div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-027-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-027-ref.html
new file mode 100644
index 0000000000..be27d6d276
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-027-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px monospace;
+ white-space: pre;
+ background-color: yellow;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2<fieldset>Line 3
+Line 4<legend>Line 5
+Line 6</legend></fieldset>Line 7…</div></div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-029-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-029-ref.html
new file mode 100644
index 0000000000..0d18c2a7f5
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-029-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: block;
+ font: 16px / 32px monospace;
+ white-space: pre;
+ background-color: yellow;
+}
+.child {
+ overflow: hidden;
+}
+</style>
+<div class="clamp"><div class="child">Line 1
+Line 2
+Line 3
+Line 4
+Line 5</div></div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-030-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-030-ref.html
new file mode 100644
index 0000000000..e88c8bffc0
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-030-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px monospace;
+ white-space: pre;
+ background-color: yellow;
+ border: none;
+ overflow: hidden;
+}
+</style>
+<div class="clamp"><div>Line 1
+Line 2
+Line 3…</div></div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-031-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-031-ref.html
new file mode 100644
index 0000000000..14f2fb1bb4
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-031-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+.big {
+ font-weight: bold;
+ border-top: 2px solid blue;
+ padding: 20px 0;
+}
+</style>
+<div class="clamp"><div class="item">Line 1
+Line 2
+Line 3 <span class="big">BIG</span>…</div></div>
+<p>Following content.</p>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-032-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-032-ref.html
new file mode 100644
index 0000000000..8f5b1ef53e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-032-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reference</title>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ font: 16px / 32px serif;
+ white-space: pre;
+ padding: 0 4px;
+ background-color: yellow;
+}
+</style>
+<div class="clamp">Line 1
+Line 2
+Line 3
+…</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-035-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-035-ref.html
new file mode 100644
index 0000000000..230218399e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-035-ref.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS reference</title>
+<link rel="stylesheet" href="/fonts/ahem.css">
+<style>
+#parent {
+ display: inline-block;
+ background: green;
+}
+#clamp {
+ font-family: Ahem;
+ display: block;
+ overflow: hidden; /* can be removed once implementations update their old -webkit-line-clamp implementations */
+}
+</style>
+<div id="parent">
+ <div id="clamp">
+ AAA<br>
+ BBB<br>
+ CCC<span style="visibility: hidden">…</span>
+ </div>
+</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-036-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-036-ref.html
new file mode 100644
index 0000000000..0de35e98ab
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-036-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ width: 10ch;
+ font: 16px / 32px monospace;
+ background-color: yellow;
+ padding: 4px;
+ overflow: hidden;
+}
+</style>
+<div class="clamp">
+ supercalifragilisticexpialidocious
+ supercali…
+</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-037-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-037-ref.html
new file mode 100644
index 0000000000..2927716d76
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-037-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ width: 150px;
+ font: 16px / 32px monospace;
+ background-color: yellow;
+ padding: 4px;
+ overflow: hidden;
+}
+</style>
+<div class="clamp">
+ supercalifragilisticexpialidocious
+ supercalifragilisticexpialidocious
+</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-038-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-038-ref.html
new file mode 100644
index 0000000000..bd8db762dd
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-038-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+ font: 16px / 32px serif;
+ background-color: yellow;
+ overflow: hidden;
+}
+</style>
+<div class="clamp">
+ <div>
+ Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5
+ </div>
+</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-039-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-039-ref.html
new file mode 100644
index 0000000000..fd8a76b2f8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-039-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<style>
+.clamp {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 5;
+ font: 16px / 32px serif;
+ background-color: yellow;
+ overflow: hidden;
+}
+</style>
+<div class="clamp">
+ <div>
+ Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5<br>Line 6
+ </div>
+</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-040-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-040-ref.html
new file mode 100644
index 0000000000..f55be86e54
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-040-ref.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Test Reference</title>
+<style>
+.clamp {
+ font: 16px / 32px serif;
+ white-space: pre;
+ background-color: yellow;
+ height: 5em;
+}
+</style>
+<div class="clamp">Line 1
+Line 2…
+Line 3
+Line 4
+Line 5</div>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-block-in-inline-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-block-in-inline-001-ref.html
new file mode 100644
index 0000000000..79f2e40910
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-block-in-inline-001-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+.clamp {
+ display: -webkit-inline-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+}
+</style>
+<body>
+ <div class="clamp">
+ 1<br>
+ 2<br>
+ <div>3</div>
+ 4<br>
+ 5
+ </div>
+</body>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-dynamic-001-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-dynamic-001-ref.html
new file mode 100644
index 0000000000..21458953df
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-dynamic-001-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<style>
+#container {
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ font-size: 20px;
+ width: 10ch;
+}
+</style>
+<body>
+ <div id="container">
+ abc def ghi jkl mno pqr stu vwx yz
+ 123 456 789
+ </div>
+</body>
diff --git a/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-with-line-height-ref.html b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-with-line-height-ref.html
new file mode 100644
index 0000000000..c2c8914161
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/reference/webkit-line-clamp-with-line-height-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+#test {
+ width: 100px;
+
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+
+ border: solid thin grey;
+ font: 20px 'Ahem';
+ line-height: 40px;
+}
+</style>
+<p>This tests the -webkit-line-clamp property with line-height applied.</p>
+<div id="test">
+ XXXX XXX
+</div>