Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (283031 => 283032)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-24 08:48:48 UTC (rev 283031)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-24 09:38:48 UTC (rev 283032)
@@ -1,5 +1,29 @@
2021-09-24 Myles C. Maxfield <mmaxfi...@apple.com>
+ Handle CSSOM style mutation of font-palette
+ https://bugs.webkit.org/show_bug.cgi?id=230673
+
+ Reviewed by Antti Koivisto.
+
+ It already works.
+
+ The tests are being upstreamed at https://github.com/web-platform-tests/wpt/pull/30942.
+
+ * web-platform-tests/css/css-fonts/font-palette-add-2-expected.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-add-2.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-add-expected-mismatch.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-add.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-modify-2.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-modify.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-remove-2-expected.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-remove-2.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-remove-expected-mismatch.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-remove.html: Added.
+
+2021-09-24 Myles C. Maxfield <mmaxfi...@apple.com>
+
Handle CSSOM style mutation of font-palette-values
https://bugs.webkit.org/show_bug.cgi?id=230448
<rdar://problem/83343481>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-2-expected.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-2-expected.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-2-expected.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically adding font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette;">A</div>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-2.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-2.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-2.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically adding font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<link rel="mismatch" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR';">A</div>
+<script>
+let count = 0;
+function tick() {
+ if (count > 3) {
+ document.getElementById("target").style.setProperty("font-palette", "MyPalette");
+ document.documentElement.classList.remove("reftest-wait");
+ } else {
+ ++count;
+ requestAnimationFrame(tick);
+ }
+}
+requestAnimationFrame(tick);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-expected-mismatch.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add-expected-mismatch.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically adding font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR';">A</div>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-add.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically adding font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<link rel="mismatch" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR';">A</div>
+<script>
+let count = 0;
+function tick() {
+ if (count > 3) {
+ document.getElementById("target").style.setProperty("font-palette", "MyPalette");
+ document.documentElement.classList.remove("reftest-wait");
+ } else {
+ ++count;
+ requestAnimationFrame(tick);
+ }
+}
+requestAnimationFrame(tick);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically modifying font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+
+@font-palette-values MyPalette2 {
+ font-family: "Ahem-COLR";
+ base-palette: 0;
+ override-color: 1 #00FF00;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette2;">A</div>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically modifying font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<link rel="mismatch" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+
+@font-palette-values MyPalette2 {
+ font-family: "Ahem-COLR";
+ base-palette: 0;
+ override-color: 1 #00FF00;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette;">A</div>
+<script>
+let count = 0;
+function tick() {
+ if (count > 3) {
+ document.getElementById("target").style.setProperty("font-palette", "MyPalette2");
+ document.documentElement.classList.remove("reftest-wait");
+ } else {
+ ++count;
+ requestAnimationFrame(tick);
+ }
+}
+requestAnimationFrame(tick);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically modifying font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+
+@font-palette-values MyPalette2 {
+ font-family: "Ahem-COLR";
+ base-palette: 0;
+ override-color: 1 #00FF00;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette;">A</div>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically modifying font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<link rel="mismatch" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+
+@font-palette-values MyPalette2 {
+ font-family: "Ahem-COLR";
+ base-palette: 0;
+ override-color: 1 #00FF00;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette;">A</div>
+<script>
+let count = 0;
+function tick() {
+ if (count > 3) {
+ document.getElementById("target").style.setProperty("font-palette", "MyPalette2");
+ document.documentElement.classList.remove("reftest-wait");
+ } else {
+ ++count;
+ requestAnimationFrame(tick);
+ }
+}
+requestAnimationFrame(tick);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-2-expected.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-2-expected.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-2-expected.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically removing font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR';">A</div>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-2.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-2.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-2.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically removing font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<link rel="mismatch" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette;">A</div>
+<script>
+let count = 0;
+function tick() {
+ if (count > 3) {
+ document.getElementById("target").style.removeProperty("font-palette");
+ document.documentElement.classList.remove("reftest-wait");
+ } else {
+ ++count;
+ requestAnimationFrame(tick);
+ }
+}
+requestAnimationFrame(tick);
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-expected-mismatch.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove-expected-mismatch.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically removing font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette;">A</div>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove.html (0 => 283032)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove.html 2021-09-24 09:38:48 UTC (rev 283032)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Tests that dynamically removing font-palette causes the necessary rendering update</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<link rel="mismatch" href=""
+<style>
+@font-face {
+ font-family: "Ahem-COLR";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "Ahem-COLR";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div id="target" style="font: 48px 'Ahem-COLR'; font-palette: MyPalette;">A</div>
+<script>
+let count = 0;
+function tick() {
+ if (count > 3) {
+ document.getElementById("target").style.removeProperty("font-palette");
+ document.documentElement.classList.remove("reftest-wait");
+ } else {
+ ++count;
+ requestAnimationFrame(tick);
+ }
+}
+requestAnimationFrame(tick);
+</script>
+</body>
+</html>