Title: [283075] trunk/LayoutTests/imported/w3c
- Revision
- 283075
- Author
- [email protected]
- Date
- 2021-09-25 00:16:22 -0700 (Sat, 25 Sep 2021)
Log Message
Make sure empty font families do the right thing for font palettes
https://bugs.webkit.org/show_bug.cgi?id=230598
<rdar://problem/83383955>
Reviewed by Tim Horton.
It already works.
These tests are being upstreamed in https://github.com/web-platform-tests/wpt/pull/30957.
* web-platform-tests/css/css-fonts/font-palette-empty-font-family-expected-mismatch.html: Added.
* web-platform-tests/css/css-fonts/font-palette-empty-font-family.html: Added.
* web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid-expected.txt:
* web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (283074 => 283075)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-25 06:24:50 UTC (rev 283074)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-25 07:16:22 UTC (rev 283075)
@@ -1,3 +1,20 @@
+2021-09-25 Myles C. Maxfield <[email protected]>
+
+ Make sure empty font families do the right thing for font palettes
+ https://bugs.webkit.org/show_bug.cgi?id=230598
+ <rdar://problem/83383955>
+
+ Reviewed by Tim Horton.
+
+ It already works.
+
+ These tests are being upstreamed in https://github.com/web-platform-tests/wpt/pull/30957.
+
+ * web-platform-tests/css/css-fonts/font-palette-empty-font-family-expected-mismatch.html: Added.
+ * web-platform-tests/css/css-fonts/font-palette-empty-font-family.html: Added.
+ * web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid-expected.txt:
+ * web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
+
2021-09-24 Nikos Mouchtaris <[email protected]>
Implement round,mod,rem functions for calc
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-empty-font-family-expected-mismatch.html (0 => 283075)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-empty-font-family-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-empty-font-family-expected-mismatch.html 2021-09-25 07:16:22 UTC (rev 283075)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that an empty font family name is handled correctly</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 style="font: 48px 'Ahem-COLR'; color-palette: MyPalette;">A</div>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-empty-font-family.html (0 => 283075)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-empty-font-family.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-empty-font-family.html 2021-09-25 07:16:22 UTC (rev 283075)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests that an empty font family name is handled correctly</title>
+<link rel="help" href=""
+<link rel="author" title="Myles C. Maxfield" href=""
+<link rel="mismatch" href=""
+<style>
+@font-face {
+ font-family: "";
+ src: url("resources/Ahem-COLOR-palettes.ttf") format("truetype");
+}
+
+@font-palette-values MyPalette {
+ font-family: "";
+ base-palette: 1;
+}
+</style>
+</head>
+<body>
+<div style="font: 48px ''; color-palette: MyPalette;">A</div>
+</body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid-expected.txt (283074 => 283075)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid-expected.txt 2021-09-25 06:24:50 UTC (rev 283074)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid-expected.txt 2021-09-25 07:16:22 UTC (rev 283075)
@@ -13,4 +13,5 @@
PASS CSS Fonts Module Level 4: parsing @font-palette-values 11
PASS CSS Fonts Module Level 4: parsing @font-palette-values 12
PASS CSS Fonts Module Level 4: parsing @font-palette-values 13
+PASS CSS Fonts Module Level 4: parsing @font-palette-values 14
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html (283074 => 283075)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html 2021-09-25 06:24:50 UTC (rev 283074)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html 2021-09-25 07:16:22 UTC (rev 283075)
@@ -78,6 +78,11 @@
@font-palette-values A {
override-color: 0;
}
+
+/* 13 */
+@font-palette-values A {
+ font-family: "";
+}
</style>
</head>
<body>
@@ -84,7 +89,7 @@
<script>
let rules = document.getElementById("style").sheet.cssRules;
test(function() {
- assert_equals(rules.length, 13);
+ assert_equals(rules.length, 14);
});
test(function() {
@@ -177,6 +182,13 @@
assert_equals(text.indexOf("override-color"), -1);
assert_equals(rule.size, 0);
});
+
+test(function() {
+ let text = rules[13].cssText;
+ let rule = rules[13];
+ // I see nothing in the spec that indicates an empty string is a parse error.
+ assert_not_equals(text.indexOf("font-family"), -1);
+});
</script>
</body>
</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes