mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Update web-platform-tests to revision b'421155a1c8752a36b465e62f466b18f821190e08'
This commit is contained in:
parent
871cefc926
commit
fd56698ec7
722 changed files with 19686 additions and 8130 deletions
|
@ -0,0 +1,27 @@
|
|||
.group {
|
||||
inline-size: min-content;
|
||||
}
|
||||
|
||||
.group-align-left {
|
||||
/* Only the one that matches the inline axis will apply */
|
||||
margin-bottom: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.group-align-right {
|
||||
/* Only the one that matches the inline axis will apply */
|
||||
margin-top: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.group-align-center {
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.group-align-start {
|
||||
margin-inline-end: auto;
|
||||
}
|
||||
|
||||
.group-align-end {
|
||||
margin-inline-start: auto;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
.text-container {
|
||||
inline-size: 200px;
|
||||
border: 1px solid black;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pre {
|
||||
white-space: pre;
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
const simpleTestString = `ABCDEFGHIJKLO
|
||||
AAAAAAAA
|
||||
AAAA
|
||||
AA
|
||||
A`;
|
||||
|
||||
function generateSimpleTest({ textGroupAlign, textAlign, direction, writingMode }) {
|
||||
if (!direction)
|
||||
direction = "ltr";
|
||||
if (!writingMode)
|
||||
writingMode = "horizontal-tb";
|
||||
|
||||
const container = document.createElement("div");
|
||||
container.textContent = simpleTestString;
|
||||
container.style = `text-group-align: ${textGroupAlign}; text-align: ${textAlign}; direction: ${direction}; writing-mode: ${writingMode}`;
|
||||
container.classList.add("text-container", "pre");
|
||||
document.body.append(container);
|
||||
}
|
||||
|
||||
function generateSimpleReference({ textGroupAlign, textAlign, direction, writingMode }) {
|
||||
if (!direction)
|
||||
direction = "ltr";
|
||||
if (!writingMode)
|
||||
writingMode = "horizontal-tb";
|
||||
|
||||
const container = document.createElement("div");
|
||||
container.classList.add("text-container", "pre");
|
||||
container.style = `text-align: ${textAlign}; direction: ${direction}; writing-mode: ${writingMode}`;
|
||||
|
||||
const group = document.createElement("div");
|
||||
group.textContent = simpleTestString;
|
||||
group.classList.add("group", `group-align-${textGroupAlign}`);
|
||||
container.append(group);
|
||||
|
||||
document.body.append(container);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: center</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "center", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: center</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "center", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: center</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-center-vlr-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "center", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: center</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-center-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "center", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: end</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "end", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: end</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "end", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: end</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-end-vlr-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "end", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: end</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-end-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "end", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: left</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "left", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: left</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "left", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: left</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-left-vlr-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "left", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: left</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-left-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "left", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: right</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "right", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: right</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "right", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: right</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-right-vlr-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "right", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: right</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-right-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "right", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: start</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "start", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference: text-group-align: start</title>
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<link rel="stylesheet" href="support/fake-group-align.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleReference({ textGroupAlign: "start", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: start</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-start-vlr-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "start", writingMode: "vertical-lr", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>text-group-align: start</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-group-align-property">
|
||||
<link rel="match" href="text-group-align-start-ref.html">
|
||||
<link rel="stylesheet" href="support/test-helpers.css">
|
||||
<body>
|
||||
<script src="support/test-helpers.js"></script>
|
||||
<script>
|
||||
for (let direction of ["ltr", "rtl"]) {
|
||||
for (let textAlign of ["start", "end", "left", "right", "center"]) {
|
||||
generateSimpleTest({ textGroupAlign: "start", direction, textAlign });
|
||||
}
|
||||
document.body.append(document.createElement("br"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue