Diff
Modified: trunk/LayoutTests/ChangeLog (252759 => 252760)
--- trunk/LayoutTests/ChangeLog 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/ChangeLog 2019-11-22 03:56:06 UTC (rev 252760)
@@ -1,3 +1,21 @@
+2019-11-21 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Remove font-variant @font-face descriptor
+ https://bugs.webkit.org/show_bug.cgi?id=203179
+
+ Reviewed by Simon Fraser.
+
+ Delete tests for the removed feature.
+
+ * css3/font-variant-font-face-all-expected.html: Deleted.
+ * css3/font-variant-font-face-all.html: Deleted.
+ * css3/font-variant-font-face-override-expected.html:
+ * css3/font-variant-font-face-override.html:
+ * fast/text/font-face-empty-string-expected.txt:
+ * fast/text/font-face-empty-string.html:
+ * fast/text/font-face-_javascript_-expected.txt:
+ * fast/text/font-face-_javascript_.html:
+
2019-11-21 Yusuke Suzuki <ysuz...@apple.com>
Unreviewed, rolling in again, regression is not caused by it
Deleted: trunk/LayoutTests/css3/font-variant-font-face-all-expected.html (252759 => 252760)
--- trunk/LayoutTests/css3/font-variant-font-face-all-expected.html 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/css3/font-variant-font-face-all-expected.html 2019-11-22 03:56:06 UTC (rev 252760)
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-@font-face {
- font-family: "FontFeaturesTestOTF";
- src: url("resources/FontWithFeatures.otf") format("opentype");
-}
-@font-face {
- font-family: "FontFeaturesTestTTF";
- src: url("resources/FontWithFeatures.ttf") format("truetype");
-}
-.fontWithFeaturesTTF {
- font-family: "FontWithFeaturesTTF";
-}
-</style>
-</head>
-<body>
-<p>This test is a dump-render-tree test which makes sure that the following properties are appropriately applied:</p>
-<ul>
-<li>-webkit-font-variant-ligatures</li>
-<li>-webkit-font-variant-position</li>
-<li>-webkit-font-variant-caps</li>
-<li>-webkit-font-variant-numeric</li>
-<li>-webkit-font-variant-alternates</li>
-<li>-webkit-font-variant-east-asian</li>
-</ul>
-The test passes if there is a particular sequence of checks and x characters below. Note that some x characters are expected.
-<div id="insertionpoint"><span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-</div>
-<div id="insertionPoint2"><span style="font-family: FontFeaturesTestTTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">BB</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-<span style="font-family: FontFeaturesTestOTF;">AA</span>
-</div>
-</body>
-</html>
Deleted: trunk/LayoutTests/css3/font-variant-font-face-all.html (252759 => 252760)
--- trunk/LayoutTests/css3/font-variant-font-face-all.html 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/css3/font-variant-font-face-all.html 2019-11-22 03:56:06 UTC (rev 252760)
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-</head>
-<body>
-<p>This test is a dump-render-tree test which makes sure that the following properties are appropriately applied:</p>
-<ul>
-<li>-webkit-font-variant-ligatures</li>
-<li>-webkit-font-variant-position</li>
-<li>-webkit-font-variant-caps</li>
-<li>-webkit-font-variant-numeric</li>
-<li>-webkit-font-variant-alternates</li>
-<li>-webkit-font-variant-east-asian</li>
-</ul>
-The test passes if there is a particular sequence of checks and x characters below. Note that some x characters are expected.
-<div id="insertionPoint"></div>
-<div id="insertionPoint2"></div>
-<script>
-var insertionPoint = document.getElementById("insertionPoint");
-var insertionPoint2 = document.getElementById("insertionPoint2");
-
-var styleNode = document.createElement("style");
-document.head.appendChild(styleNode);
-
-function addElement(pointToInsert, fontFamily, extension, format, property, value, text) {
- styleNode.sheet.insertRule("@font-face { font-family: " + fontFamily + "_" + property + "_" + value + "; src: url('resources/FontWithFeatures." + extension + "') format('" + format + "'); " + property + ": " + value + "; }", 0);
- var element = document.createElement("span");
- element.textContent = text + text;
- element.style.fontFamily = fontFamily + "_" + property + "_" + value;
- pointToInsert.appendChild(element);
- pointToInsert.appendChild(document.createTextNode(" "));
-}
-
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "common-ligatures", "C");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "no-common-ligatures", "C");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "discretionary-ligatures", "E");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "no-discretionary-ligatures", "E");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "historical-ligatures", "F");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "no-historical-ligatures", "F");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "contextual", "G");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-ligatures", "no-contextual", "G");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-position", "sub", "H");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-position", "super", "I");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-caps", "small-caps", "J");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-caps", "all-small-caps", "J");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-caps", "petite-caps", "L");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-caps", "all-petite-caps", "L");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-caps", "unicase", "N");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-caps", "titling-caps", "O");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "lining-nums", "P");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "oldstyle-nums", "Q");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "proportional-nums", "R");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "tabular-nums", "S");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "diagonal-fractions", "T");
-//addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "stacked-fractions", "U");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "ordinal", "V");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-numeric", "slashed-zero", "W");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-alternates", "historical-forms", "X");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "jis78", "Y");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "jis83", "Z");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "jis90", "a");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "jis04", "b");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "simplified", "c");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "traditional", "d");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "full-width", "e");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "proportional-width", "f");
-addElement(insertionPoint, "FontFeaturesTestOTF", "otf", "opentype", "font-variant-east-asian", "ruby", "g");
-
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "common-ligatures", "C");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "no-common-ligatures", "C");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "discretionary-ligatures", "G");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "no-discretionary-ligatures", "G");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "historical-ligatures", "I");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "no-historical-ligatures", "I");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "contextual", "L");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-ligatures", "no-contextual", "L");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-position", "sub", "O");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-position", "super", "P");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-caps", "small-caps", "S");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-caps", "all-small-caps", "S");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-caps", "petite-caps", "T");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-caps", "all-petite-caps", "T");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-caps", "unicase", "Y");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-caps", "titling-caps", "a");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "lining-nums", "c");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "oldstyle-nums", "d");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "proportional-nums", "f");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "tabular-nums", "g");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "diagonal-fractions", "i");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "stacked-fractions", "j");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "ordinal", "Q");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-numeric", "slashed-zero", "k");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-alternates", "historical-forms", "K");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "jis78", "m");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "jis83", "n");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "jis90", "o");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "jis04", "p");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "simplified", "q");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "traditional", "r");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "full-width", "t");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "proportional-width", "u");
-addElement(insertionPoint2, "FontFeaturesTestTTF", "ttf", "truetype", "font-variant-east-asian", "ruby", "v");
-</script>
-</body>
-</html>
Modified: trunk/LayoutTests/css3/font-variant-font-face-override-expected.html (252759 => 252760)
--- trunk/LayoutTests/css3/font-variant-font-face-override-expected.html 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/css3/font-variant-font-face-override-expected.html 2019-11-22 03:56:06 UTC (rev 252760)
@@ -16,11 +16,7 @@
This test makes sure that local font feature styles can override the font feature styles declared in @font-face blocks.
<div style="font: 40px FontFeaturesTestOTF;">AA</div>
<div style="font: 40px FontFeaturesTestOTF;">BB</div>
-<div style="font: 40px FontFeaturesTestOTF;">AA</div>
-<div style="font: 40px FontFeaturesTestOTF;">BB</div>
<div style="font: 40px FontFeaturesTestTTF;">AA</div>
<div style="font: 40px FontFeaturesTestTTF;">BB</div>
-<div style="font: 40px FontFeaturesTestTTF;">AA</div>
-<div style="font: 40px FontFeaturesTestTTF;">BB</div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/LayoutTests/css3/font-variant-font-face-override.html (252759 => 252760)
--- trunk/LayoutTests/css3/font-variant-font-face-override.html 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/css3/font-variant-font-face-override.html 2019-11-22 03:56:06 UTC (rev 252760)
@@ -8,20 +8,10 @@
font-feature-settings: "titl" 1;
}
@font-face {
- font-family: "FontFeaturesTestOTF2";
- src: url("resources/FontWithFeatures.otf") format("opentype");
- font-variant-caps: titling-caps;
-}
-@font-face {
font-family: "FontFeaturesTestTTF";
src: url("resources/FontWithFeatures.ttf") format("truetype");
font-feature-settings: "titl" 1;
}
-@font-face {
- font-family: "FontFeaturesTestTTF2";
- src: url("resources/FontWithFeatures.ttf") format("truetype");
- font-variant-caps: titling-caps;
-}
</style>
</head>
<body>
@@ -28,11 +18,7 @@
This test makes sure that local font feature styles can override the font feature styles declared in @font-face blocks.
<div style="font: 40px FontFeaturesTestOTF;">OO</div>
<div style="font: 40px FontFeaturesTestOTF; font-feature-settings: 'titl' 0;">OO</div>
-<div style="font: 40px FontFeaturesTestOTF2;">OO</div>
-<div style="font: 40px FontFeaturesTestOTF2; font-feature-settings: 'titl' 0;">OO</div>
<div style="font: 40px FontFeaturesTestTTF;">aa</div>
<div style="font: 40px FontFeaturesTestTTF; font-feature-settings: 'titl' 0;">aa</div>
-<div style="font: 40px FontFeaturesTestTTF2;">aa</div>
-<div style="font: 40px FontFeaturesTestTTF2; font-feature-settings: 'titl' 0;">aa</div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/LayoutTests/fast/text/font-face-empty-string-expected.txt (252759 => 252760)
--- trunk/LayoutTests/fast/text/font-face-empty-string-expected.txt 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/fast/text/font-face-empty-string-expected.txt 2019-11-22 03:56:06 UTC (rev 252760)
@@ -12,9 +12,6 @@
PASS fontface = new FontFace('WebFont', 'url(\'asdf\')', {unicodeRange: ''}) did not throw exception.
PASS fontface.unicodeRange is "U+0-10ffff"
PASS fontface.unicodeRange = '' threw exception SyntaxError: The string did not match the expected pattern..
-PASS fontface = new FontFace('WebFont', 'url(\'asdf\')', {variant: ''}) did not throw exception.
-PASS fontface.variant is "normal"
-PASS fontface.variant = '' threw exception SyntaxError: The string did not match the expected pattern..
PASS fontface = new FontFace('WebFont', 'url(\'asdf\')', {featureSettings: ''}) did not throw exception.
PASS fontface.featureSettings is "normal"
PASS fontface.featureSettings = '' threw exception SyntaxError: The string did not match the expected pattern..
Modified: trunk/LayoutTests/fast/text/font-face-empty-string.html (252759 => 252760)
--- trunk/LayoutTests/fast/text/font-face-empty-string.html 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/fast/text/font-face-empty-string.html 2019-11-22 03:56:06 UTC (rev 252760)
@@ -17,9 +17,6 @@
shouldNotThrow("fontface = new FontFace('WebFont', 'url(\\\'asdf\\\')', {unicodeRange: ''})");
shouldBeEqualToString("fontface.unicodeRange", "U+0-10ffff");
shouldThrow("fontface.unicodeRange = ''");
-shouldNotThrow("fontface = new FontFace('WebFont', 'url(\\\'asdf\\\')', {variant: ''})");
-shouldBeEqualToString("fontface.variant", "normal");
-shouldThrow("fontface.variant = ''");
shouldNotThrow("fontface = new FontFace('WebFont', 'url(\\\'asdf\\\')', {featureSettings: ''})");
shouldBeEqualToString("fontface.featureSettings", "normal");
shouldThrow("fontface.featureSettings = ''");
@@ -28,4 +25,4 @@
</script>
<script src=""
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/LayoutTests/fast/text/font-face-_javascript_-expected.txt (252759 => 252760)
--- trunk/LayoutTests/fast/text/font-face-_javascript_-expected.txt 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/fast/text/font-face-_javascript_-expected.txt 2019-11-22 03:56:06 UTC (rev 252760)
@@ -3,7 +3,6 @@
PASS new FontFace('family_name', 'url(\'asdf\')', {}).weight is "normal"
PASS new FontFace('family_name', 'url(\'asdf\')', {}).stretch is "normal"
PASS new FontFace('family_name', 'url(\'asdf\')', {}).unicodeRange is "U+0-10ffff"
-PASS new FontFace('family_name', 'url(\'asdf\')', {}).variant is "normal"
PASS new FontFace('family_name', 'url(\'asdf\')', {}).featureSettings is "normal"
PASS new FontFace('family_name', 'url(\'asdf\')', {'style': 'normal'}).style is "normal"
PASS new FontFace('family_name', 'url(\'asdf\')', {'style': 'inherit'}).style threw exception SyntaxError: The string did not match the expected pattern..
@@ -19,15 +18,11 @@
PASS new FontFace('family_name', 'url(\'asdf\')', {'stretch': 'ultra-expanded'}).stretch is "ultra-expanded"
PASS new FontFace('family_name', 'url(\'asdf\')', {'unicodeRange': 'U+26'}).unicodeRange is "U+26"
PASS new FontFace('family_name', 'url(\'asdf\')', {'unicodeRange': 'U+0-7F'}).unicodeRange is "U+0-7f"
-PASS new FontFace('family_name', 'url(\'asdf\')', {'variant': 'variant_name'}).variant threw exception SyntaxError: The string did not match the expected pattern..
-PASS new FontFace('family_name', 'url(\'asdf\')', {'variant': 'small-caps'}).variant is "small-caps"
-PASS new FontFace('family_name', 'url(\'asdf\')', {'variant': 'small-caps common-ligatures'}).variant is "common-ligatures small-caps"
PASS new FontFace('family_name', 'url(\'asdf\')', {'featureSettings': '\'titl\''}).featureSettings is "\"titl\""
PASS everything.style is "italic"
PASS everything.weight is "bold"
PASS everything.stretch is "extra-expanded"
PASS everything.unicodeRange is "U+26"
-PASS everything.variant is "small-caps"
PASS everything.featureSettings is "\"titl\""
PASS everything.family is "other_family_name"
PASS everything.style is "normal"
@@ -34,7 +29,6 @@
PASS everything.weight is "300"
PASS everything.stretch is "condensed"
PASS everything.unicodeRange is "U+0-7f"
-PASS everything.variant is "stacked-fractions"
PASS everything.featureSettings is "\"smcp\""
PASS new FontFace('family_name', 'url(\'asdf\')', {}) did not throw exception.
PASS new FontFace('family_name', newArrayBuffer, {}) did not throw exception.
Modified: trunk/LayoutTests/fast/text/font-face-_javascript_.html (252759 => 252760)
--- trunk/LayoutTests/fast/text/font-face-_javascript_.html 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/fast/text/font-face-_javascript_.html 2019-11-22 03:56:06 UTC (rev 252760)
@@ -10,7 +10,6 @@
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {}).weight", "normal");
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {}).stretch", "normal");
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {}).unicodeRange", "U+0-10ffff");
-shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {}).variant", "normal");
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {}).featureSettings", "normal");
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {'style': 'normal'}).style", "normal");
@@ -27,17 +26,13 @@
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {'stretch': 'ultra-expanded'}).stretch", "ultra-expanded");
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {'unicodeRange': 'U+26'}).unicodeRange", "U+26");
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {'unicodeRange': 'U+0-7F'}).unicodeRange", "U+0-7f");
-shouldThrow("new FontFace('family_name', 'url(\\'asdf\\')', {'variant': 'variant_name'}).variant");
-shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {'variant': 'small-caps'}).variant", "small-caps");
-shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {'variant': 'small-caps common-ligatures'}).variant", "common-ligatures small-caps");
shouldBeEqualToString("new FontFace('family_name', 'url(\\'asdf\\')', {'featureSettings': '\\'titl\\''}).featureSettings", "\"titl\"");
-var everything = new FontFace('family_name', 'url(\'asdf\')', {'style': 'italic', 'weight': 'bold', 'stretch': 'extra-expanded', 'unicodeRange': 'U+26', 'variant': 'small-caps', 'featureSettings': '\'titl\''});
+var everything = new FontFace('family_name', 'url(\'asdf\')', {'style': 'italic', 'weight': 'bold', 'stretch': 'extra-expanded', 'unicodeRange': 'U+26', 'featureSettings': '\'titl\''});
shouldBeEqualToString("everything.style", "italic");
shouldBeEqualToString("everything.weight", "bold");
shouldBeEqualToString("everything.stretch", "extra-expanded");
shouldBeEqualToString("everything.unicodeRange", "U+26");
-shouldBeEqualToString("everything.variant", "small-caps");
shouldBeEqualToString("everything.featureSettings", "\"titl\"");
everything.family = "other_family_name";
@@ -50,8 +45,6 @@
shouldBeEqualToString("everything.stretch", "condensed");
everything.unicodeRange = "U+0-7F";
shouldBeEqualToString("everything.unicodeRange", "U+0-7f");
-everything.variant = "stacked-fractions";
-shouldBeEqualToString("everything.variant", "stacked-fractions");
everything.featureSettings = "'smcp'";
shouldBeEqualToString("everything.featureSettings", "\"smcp\"");
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (252759 => 252760)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2019-11-22 03:56:06 UTC (rev 252760)
@@ -846,7 +846,6 @@
# This port doesn't support small-caps synthesis.
webkit.org/b/152620 css3/font-variant-all.html [ ImageOnlyFailure ]
-webkit.org/b/152620 css3/font-variant-font-face-all.html [ ImageOnlyFailure ]
webkit.org/b/152620 css3/font-variant-font-face-override.html [ ImageOnlyFailure ]
webkit.org/b/152620 css3/font-variant-petite-caps-synthesis-coverage.html [ ImageOnlyFailure ]
webkit.org/b/152620 css3/font-variant-petite-caps-synthesis.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/platform/win/TestExpectations (252759 => 252760)
--- trunk/LayoutTests/platform/win/TestExpectations 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/platform/win/TestExpectations 2019-11-22 03:56:06 UTC (rev 252760)
@@ -529,7 +529,6 @@
css3/font-feature-settings-rendering.html [ Skip ]
webkit.org/b/149771 css3/font-feature-settings-font-face-rendering.html [ Skip ] # WontFix
-webkit.org/b/149771 css3/font-variant-font-face-all.html [ Skip ] # WontFix
webkit.org/b/149771 css3/font-variant-font-face-override.html [ Skip ] # WontFix
webkit.org/b/149774 css3/font-variant-petite-caps-synthesis-coverage.html [ Skip ] # WontFix
webkit.org/b/149774 css3/font-variant-petite-caps-synthesis.html [ Skip ] # WontFix
Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (252759 => 252760)
--- trunk/LayoutTests/platform/wincairo/TestExpectations 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations 2019-11-22 03:56:06 UTC (rev 252760)
@@ -1172,7 +1172,6 @@
# Font feature settings is not implemented.
css3/font-feature-settings-rendering.html [ Skip ]
webkit.org/b/149771 css3/font-feature-settings-font-face-rendering.html [ Skip ]
-webkit.org/b/149771 css3/font-variant-font-face-all.html [ Skip ]
webkit.org/b/149771 css3/font-variant-font-face-override.html [ Skip ]
webkit.org/b/149774 css3/font-variant-petite-caps-synthesis-coverage.html [ Skip ]
webkit.org/b/149774 css3/font-variant-petite-caps-synthesis.html [ Skip ]
Modified: trunk/LayoutTests/platform/wpe/TestExpectations (252759 => 252760)
--- trunk/LayoutTests/platform/wpe/TestExpectations 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/LayoutTests/platform/wpe/TestExpectations 2019-11-22 03:56:06 UTC (rev 252760)
@@ -1585,7 +1585,6 @@
Bug(WPE) css3/font-feature-settings-rendering.html [ ImageOnlyFailure ]
Bug(WPE) css3/font-synthesis-small-caps.html [ ImageOnlyFailure ]
Bug(WPE) css3/font-variant-all.html [ ImageOnlyFailure ]
-Bug(WPE) css3/font-variant-font-face-all.html [ ImageOnlyFailure ]
Bug(WPE) css3/font-variant-font-face-override.html [ ImageOnlyFailure ]
Bug(WPE) css3/font-variant-petite-caps-synthesis-coverage.html [ ImageOnlyFailure ]
Bug(WPE) css3/font-variant-petite-caps-synthesis.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (252759 => 252760)
--- trunk/Source/WebCore/ChangeLog 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/ChangeLog 2019-11-22 03:56:06 UTC (rev 252760)
@@ -1,3 +1,65 @@
+2019-11-21 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Remove font-variant @font-face descriptor
+ https://bugs.webkit.org/show_bug.cgi?id=203179
+
+ Reviewed by Simon Fraser.
+
+ As per https://github.com/w3c/csswg-drafts/issues/2531
+
+ Deleted relevant tests.
+
+ * css/CSSFontFace.cpp:
+ (WebCore::CSSFontFace::font):
+ (WebCore::CSSFontFace::setVariantLigatures): Deleted.
+ (WebCore::CSSFontFace::setVariantPosition): Deleted.
+ (WebCore::CSSFontFace::setVariantCaps): Deleted.
+ (WebCore::CSSFontFace::setVariantNumeric): Deleted.
+ (WebCore::CSSFontFace::setVariantAlternates): Deleted.
+ (WebCore::CSSFontFace::setVariantEastAsian): Deleted.
+ * css/CSSFontFace.h:
+ * css/CSSFontFaceSource.cpp:
+ (WebCore::CSSFontFaceSource::load):
+ (WebCore::CSSFontFaceSource::font):
+ * css/CSSFontFaceSource.h:
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule):
+ * css/FontFace.cpp:
+ (WebCore::FontFace::create):
+ (WebCore::FontFace::setVariant): Deleted.
+ (WebCore::FontFace::variant const): Deleted.
+ * css/FontFace.h:
+ * css/FontFace.idl:
+ * loader/cache/CachedFont.cpp:
+ (WebCore::CachedFont::createFont):
+ (WebCore::CachedFont::platformDataFromCustomData):
+ * loader/cache/CachedFont.h:
+ * loader/cache/CachedSVGFont.cpp:
+ (WebCore::CachedSVGFont::createFont):
+ (WebCore::CachedSVGFont::platformDataFromCustomData):
+ * loader/cache/CachedSVGFont.h:
+ * platform/graphics/FontCache.cpp:
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ (WebCore::FontPlatformDataCacheKey::operator== const):
+ (WebCore::FontPlatformDataCacheKeyHash::hash):
+ (WebCore::FontCache::getCachedFontPlatformData):
+ (WebCore::FontCache::fontForFamily):
+ * platform/graphics/FontCache.h:
+ (WebCore::FontCache::fontForFamily):
+ (WebCore::FontCache::getCachedFontPlatformData):
+ (WebCore::FontCache::createFontPlatformDataForTesting):
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::preparePlatformFont):
+ (WebCore::fontWithFamily):
+ (WebCore::FontCache::createFontPlatformData):
+ (WebCore::FontCache::systemFallbackForCharacters):
+ * platform/graphics/cocoa/FontCacheCoreText.h:
+ * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
+ (WebCore::FontFamilySpecificationCoreText::fontRanges const):
+ * platform/graphics/mac/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/mac/FontCustomPlatformData.h:
+
2019-11-21 Peng Liu <peng.l...@apple.com>
Ignore the requests to enter/exit video fullscreen/picture-in-picture if the requesting mode is the same as the current mode
Modified: trunk/Source/WebCore/css/CSSFontFace.cpp (252759 => 252760)
--- trunk/Source/WebCore/css/CSSFontFace.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/CSSFontFace.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -40,7 +40,6 @@
#include "FontCache.h"
#include "FontDescription.h"
#include "FontFace.h"
-#include "FontVariantBuilder.h"
#include "Settings.h"
#include "StyleBuilderConverter.h"
#include "StyleProperties.h"
@@ -278,147 +277,6 @@
return true;
}
-bool CSSFontFace::setVariantLigatures(CSSValue& variantLigatures)
-{
- auto ligatures = extractFontVariantLigatures(variantLigatures);
-
- if (m_variantSettings.commonLigatures == ligatures.commonLigatures
- && m_variantSettings.discretionaryLigatures == ligatures.discretionaryLigatures
- && m_variantSettings.historicalLigatures == ligatures.historicalLigatures
- && m_variantSettings.contextualAlternates == ligatures.contextualAlternates)
- return true;
-
- m_variantSettings.commonLigatures = ligatures.commonLigatures;
- m_variantSettings.discretionaryLigatures = ligatures.discretionaryLigatures;
- m_variantSettings.historicalLigatures = ligatures.historicalLigatures;
- m_variantSettings.contextualAlternates = ligatures.contextualAlternates;
-
- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantLigatures, &variantLigatures);
-
- iterateClients(m_clients, [&](Client& client) {
- client.fontPropertyChanged(*this);
- });
-
- return true;
-}
-
-bool CSSFontFace::setVariantPosition(CSSValue& variantPosition)
-{
- if (!is<CSSPrimitiveValue>(variantPosition))
- return false;
-
- FontVariantPosition position = downcast<CSSPrimitiveValue>(variantPosition);
-
- if (m_variantSettings.position == position)
- return true;
-
- m_variantSettings.position = position;
-
- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantPosition, &variantPosition);
-
- iterateClients(m_clients, [&](Client& client) {
- client.fontPropertyChanged(*this);
- });
-
- return true;
-}
-
-bool CSSFontFace::setVariantCaps(CSSValue& variantCaps)
-{
- if (!is<CSSPrimitiveValue>(variantCaps))
- return false;
-
- FontVariantCaps caps = downcast<CSSPrimitiveValue>(variantCaps);
-
- if (m_variantSettings.caps == caps)
- return true;
-
- m_variantSettings.caps = caps;
-
- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantCaps, &variantCaps);
-
- iterateClients(m_clients, [&](Client& client) {
- client.fontPropertyChanged(*this);
- });
-
- return true;
-}
-
-bool CSSFontFace::setVariantNumeric(CSSValue& variantNumeric)
-{
- auto numeric = extractFontVariantNumeric(variantNumeric);
-
- if (m_variantSettings.numericFigure == numeric.figure
- && m_variantSettings.numericSpacing == numeric.spacing
- && m_variantSettings.numericFraction == numeric.fraction
- && m_variantSettings.numericOrdinal == numeric.ordinal
- && m_variantSettings.numericSlashedZero == numeric.slashedZero)
- return true;
-
- m_variantSettings.numericFigure = numeric.figure;
- m_variantSettings.numericSpacing = numeric.spacing;
- m_variantSettings.numericFraction = numeric.fraction;
- m_variantSettings.numericOrdinal = numeric.ordinal;
- m_variantSettings.numericSlashedZero = numeric.slashedZero;
-
- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantNumeric, &variantNumeric);
-
- iterateClients(m_clients, [&](Client& client) {
- client.fontPropertyChanged(*this);
- });
-
- return true;
-}
-
-bool CSSFontFace::setVariantAlternates(CSSValue& variantAlternates)
-{
- if (!is<CSSPrimitiveValue>(variantAlternates))
- return false;
-
- FontVariantAlternates alternates = downcast<CSSPrimitiveValue>(variantAlternates);
-
- if (m_variantSettings.alternates == alternates)
- return true;
-
- m_variantSettings.alternates = alternates;
-
- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantAlternates, &variantAlternates);
-
- iterateClients(m_clients, [&](Client& client) {
- client.fontPropertyChanged(*this);
- });
-
- return true;
-}
-
-bool CSSFontFace::setVariantEastAsian(CSSValue& variantEastAsian)
-{
- auto eastAsian = extractFontVariantEastAsian(variantEastAsian);
-
- if (m_variantSettings.eastAsianVariant == eastAsian.variant
- && m_variantSettings.eastAsianWidth == eastAsian.width
- && m_variantSettings.eastAsianRuby == eastAsian.ruby)
- return true;
-
- m_variantSettings.eastAsianVariant = eastAsian.variant;
- m_variantSettings.eastAsianWidth = eastAsian.width;
- m_variantSettings.eastAsianRuby = eastAsian.ruby;
-
- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantEastAsian, &variantEastAsian);
-
- iterateClients(m_clients, [&](Client& client) {
- client.fontPropertyChanged(*this);
- });
-
- return true;
-}
-
void CSSFontFace::setFeatureSettings(CSSValue& featureSettings)
{
// Can only call this with a primitive value of normal, or a value list containing font feature values.
@@ -813,7 +671,7 @@
return Font::create(FontCache::singleton().lastResortFallbackFont(fontDescription)->platformData(), Font::Origin::Local, Font::Interstitial::Yes, visibility);
}
case CSSFontFaceSource::Status::Success:
- if (RefPtr<Font> result = source->font(fontDescription, syntheticBold, syntheticItalic, m_featureSettings, m_variantSettings, m_fontSelectionCapabilities))
+ if (RefPtr<Font> result = source->font(fontDescription, syntheticBold, syntheticItalic, m_featureSettings, m_fontSelectionCapabilities))
return result;
break;
case CSSFontFaceSource::Status::Failure:
Modified: trunk/Source/WebCore/css/CSSFontFace.h (252759 => 252760)
--- trunk/Source/WebCore/css/CSSFontFace.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/CSSFontFace.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -69,12 +69,6 @@
void setWeight(CSSValue&);
void setStretch(CSSValue&);
bool setUnicodeRange(CSSValue&);
- bool setVariantLigatures(CSSValue&);
- bool setVariantPosition(CSSValue&);
- bool setVariantCaps(CSSValue&);
- bool setVariantNumeric(CSSValue&);
- bool setVariantAlternates(CSSValue&);
- bool setVariantEastAsian(CSSValue&);
void setFeatureSettings(CSSValue&);
void setLoadingBehavior(CSSValue&);
@@ -87,9 +81,7 @@
FontSelectionCapabilities fontSelectionCapabilities() const { return m_fontSelectionCapabilities.computeFontSelectionCapabilities(); }
const Vector<UnicodeRange>& ranges() const { return m_ranges; }
const FontFeatureSettings& featureSettings() const { return m_featureSettings; }
- const FontVariantSettings& variantSettings() const { return m_variantSettings; }
FontLoadingBehavior loadingBehavior() const { return m_loadingBehavior; }
- void setVariantSettings(const FontVariantSettings& variantSettings) { m_variantSettings = variantSettings; }
void setWeight(FontSelectionRange weight) { m_fontSelectionCapabilities.weight = weight; }
void setStretch(FontSelectionRange stretch) { m_fontSelectionCapabilities.width = stretch; }
void setStyle(FontSelectionRange italic) { m_fontSelectionCapabilities.slope = italic; }
@@ -185,7 +177,6 @@
Vector<UnicodeRange> m_ranges;
FontFeatureSettings m_featureSettings;
- FontVariantSettings m_variantSettings;
FontLoadingBehavior m_loadingBehavior { FontLoadingBehavior::Auto };
Vector<std::unique_ptr<CSSFontFaceSource>, 0, CrashOnOverflow, 0> m_sources;
Modified: trunk/Source/WebCore/css/CSSFontFaceSource.cpp (252759 => 252760)
--- trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -179,7 +179,7 @@
fontDescription.setOneFamily(m_familyNameOrURI);
fontDescription.setComputedSize(1);
fontDescription.setShouldAllowUserInstalledFonts(m_face.allowUserInstalledFonts());
- success = FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, nullptr, nullptr, FontSelectionSpecifiedCapabilities(), true);
+ success = FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, nullptr, FontSelectionSpecifiedCapabilities(), true);
if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) {
if (auto* document = fontSelector->document())
ResourceLoadObserver::shared().logFontLoad(*document, m_familyNameOrURI.string(), success);
@@ -189,7 +189,7 @@
}
}
-RefPtr<Font> CSSFontFaceSource::font(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+RefPtr<Font> CSSFontFaceSource::font(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
ASSERT(status() == Status::Success);
@@ -203,12 +203,12 @@
if (m_immediateSource) {
if (!m_immediateFontCustomPlatformData)
return nullptr;
- return Font::create(CachedFont::platformDataFromCustomData(*m_immediateFontCustomPlatformData, fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities), Font::Origin::Remote);
+ return Font::create(CachedFont::platformDataFromCustomData(*m_immediateFontCustomPlatformData, fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities), Font::Origin::Remote);
}
// We're local. Just return a Font from the normal cache.
// We don't want to check alternate font family names here, so pass true as the checkingAlternateName parameter.
- return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, &fontFaceFeatures, &fontFaceVariantSettings, fontFaceCapabilities, true);
+ return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, &fontFaceFeatures, fontFaceCapabilities, true);
}
if (m_font) {
@@ -216,7 +216,7 @@
ASSERT_UNUSED(success, success);
ASSERT(status() == Status::Success);
- auto result = m_font->createFont(fontDescription, m_familyNameOrURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ auto result = m_font->createFont(fontDescription, m_familyNameOrURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities);
ASSERT(result);
return result;
}
@@ -229,7 +229,7 @@
return nullptr;
if (!m_inDocumentCustomPlatformData)
return nullptr;
- return Font::create(m_inDocumentCustomPlatformData->fontPlatformData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities), Font::Origin::Remote);
+ return Font::create(m_inDocumentCustomPlatformData->fontPlatformData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities), Font::Origin::Remote);
#endif
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebCore/css/CSSFontFaceSource.h (252759 => 252760)
--- trunk/Source/WebCore/css/CSSFontFaceSource.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -70,7 +70,7 @@
void opportunisticallyStartFontDataURLLoading(CSSFontSelector&);
void load(CSSFontSelector*);
- RefPtr<Font> font(const FontDescription&, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities);
+ RefPtr<Font> font(const FontDescription&, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
bool requiresExternalResource() const { return m_font; }
Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (252759 => 252760)
--- trunk/Source/WebCore/css/CSSFontSelector.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -162,12 +162,6 @@
RefPtr<CSSValue> src = ""
RefPtr<CSSValue> unicodeRange = style.getPropertyCSSValue(CSSPropertyUnicodeRange);
RefPtr<CSSValue> featureSettings = style.getPropertyCSSValue(CSSPropertyFontFeatureSettings);
- RefPtr<CSSValue> variantLigatures = style.getPropertyCSSValue(CSSPropertyFontVariantLigatures);
- RefPtr<CSSValue> variantPosition = style.getPropertyCSSValue(CSSPropertyFontVariantPosition);
- RefPtr<CSSValue> variantCaps = style.getPropertyCSSValue(CSSPropertyFontVariantCaps);
- RefPtr<CSSValue> variantNumeric = style.getPropertyCSSValue(CSSPropertyFontVariantNumeric);
- RefPtr<CSSValue> variantAlternates = style.getPropertyCSSValue(CSSPropertyFontVariantAlternates);
- RefPtr<CSSValue> variantEastAsian = style.getPropertyCSSValue(CSSPropertyFontVariantEastAsian);
RefPtr<CSSValue> loadingBehavior = style.getPropertyCSSValue(CSSPropertyFontDisplay);
if (!is<CSSValueList>(fontFamily) || !is<CSSValueList>(src) || (unicodeRange && !is<CSSValueList>(*unicodeRange)))
return;
@@ -195,18 +189,6 @@
fontFace->setStretch(*fontStretch);
if (rangeList && !fontFace->setUnicodeRange(*rangeList))
return;
- if (variantLigatures && !fontFace->setVariantLigatures(*variantLigatures))
- return;
- if (variantPosition && !fontFace->setVariantPosition(*variantPosition))
- return;
- if (variantCaps && !fontFace->setVariantCaps(*variantCaps))
- return;
- if (variantNumeric && !fontFace->setVariantNumeric(*variantNumeric))
- return;
- if (variantAlternates && !fontFace->setVariantAlternates(*variantAlternates))
- return;
- if (variantEastAsian && !fontFace->setVariantEastAsian(*variantEastAsian))
- return;
if (featureSettings)
fontFace->setFeatureSettings(*featureSettings);
if (loadingBehavior)
Modified: trunk/Source/WebCore/css/FontFace.cpp (252759 => 252760)
--- trunk/Source/WebCore/css/FontFace.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/FontFace.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -37,7 +37,6 @@
#include "CSSValuePool.h"
#include "DOMPromiseProxy.h"
#include "Document.h"
-#include "FontVariantBuilder.h"
#include "JSFontFace.h"
#include "Quirks.h"
#include "StyleProperties.h"
@@ -101,9 +100,6 @@
auto setUnicodeRangeResult = result->setUnicodeRange(descriptors.unicodeRange.isEmpty() ? "U+0-10FFFF"_s : descriptors.unicodeRange);
if (setUnicodeRangeResult.hasException())
return setUnicodeRangeResult.releaseException();
- auto setVariantResult = result->setVariant(descriptors.variant.isEmpty() ? "normal"_s : descriptors.variant);
- if (setVariantResult.hasException())
- return setVariantResult.releaseException();
auto setFeatureSettingsResult = result->setFeatureSettings(descriptors.featureSettings.isEmpty() ? "normal"_s : descriptors.featureSettings);
if (setFeatureSettingsResult.hasException())
return setFeatureSettingsResult.releaseException();
@@ -218,61 +214,6 @@
return { };
}
-ExceptionOr<void> FontFace::setVariant(const String& variant)
-{
- if (variant.isEmpty())
- return Exception { SyntaxError };
-
- auto style = MutableStyleProperties::create();
- auto result = CSSParser::parseValue(style, CSSPropertyFontVariant, variant, true, HTMLStandardMode);
- if (result == CSSParser::ParseResult::Error)
- return Exception { SyntaxError };
-
- // FIXME: Would be much better to stage the new settings and set them all at once
- // instead of this dance where we make a backup and revert to it if something fails.
- FontVariantSettings backup = m_backing->variantSettings();
-
- auto normal = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
- bool success = true;
-
- if (auto value = style->getPropertyCSSValue(CSSPropertyFontVariantLigatures))
- success &= m_backing->setVariantLigatures(*value);
- else
- m_backing->setVariantLigatures(normal);
-
- if (auto value = style->getPropertyCSSValue(CSSPropertyFontVariantPosition))
- success &= m_backing->setVariantPosition(*value);
- else
- m_backing->setVariantPosition(normal);
-
- if (auto value = style->getPropertyCSSValue(CSSPropertyFontVariantCaps))
- success &= m_backing->setVariantCaps(*value);
- else
- m_backing->setVariantCaps(normal);
-
- if (auto value = style->getPropertyCSSValue(CSSPropertyFontVariantNumeric))
- success &= m_backing->setVariantNumeric(*value);
- else
- m_backing->setVariantNumeric(normal);
-
- if (auto value = style->getPropertyCSSValue(CSSPropertyFontVariantAlternates))
- success &= m_backing->setVariantAlternates(*value);
- else
- m_backing->setVariantAlternates(normal);
-
- if (auto value = style->getPropertyCSSValue(CSSPropertyFontVariantEastAsian))
- success &= m_backing->setVariantEastAsian(*value);
- else
- m_backing->setVariantEastAsian(normal);
-
- if (!success) {
- m_backing->setVariantSettings(backup);
- return Exception { SyntaxError };
- }
-
- return { };
-}
-
ExceptionOr<void> FontFace::setFeatureSettings(const String& featureSettings)
{
if (featureSettings.isEmpty())
@@ -402,12 +343,6 @@
return values->cssText();
}
-String FontFace::variant() const
-{
- m_backing->updateStyleIfNeeded();
- return computeFontVariant(m_backing->variantSettings())->cssText();
-}
-
String FontFace::featureSettings() const
{
m_backing->updateStyleIfNeeded();
Modified: trunk/Source/WebCore/css/FontFace.h (252759 => 252760)
--- trunk/Source/WebCore/css/FontFace.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/FontFace.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -48,7 +48,6 @@
String weight;
String stretch;
String unicodeRange;
- String variant;
String featureSettings;
String display;
};
@@ -63,7 +62,6 @@
ExceptionOr<void> setWeight(const String&);
ExceptionOr<void> setStretch(const String&);
ExceptionOr<void> setUnicodeRange(const String&);
- ExceptionOr<void> setVariant(const String&);
ExceptionOr<void> setFeatureSettings(const String&);
ExceptionOr<void> setDisplay(const String&);
@@ -72,7 +70,6 @@
String weight() const;
String stretch() const;
String unicodeRange() const;
- String variant() const;
String featureSettings() const;
String display() const;
Modified: trunk/Source/WebCore/css/FontFace.idl (252759 => 252760)
--- trunk/Source/WebCore/css/FontFace.idl 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/css/FontFace.idl 2019-11-22 03:56:06 UTC (rev 252760)
@@ -37,7 +37,6 @@
DOMString weight = "normal";
DOMString stretch = "normal";
DOMString unicodeRange = "U+0-10FFFF";
- DOMString variant = "normal";
DOMString featureSettings = "normal";
DOMString display = "auto";
};
@@ -52,7 +51,6 @@
attribute DOMString weight;
attribute DOMString stretch;
attribute DOMString unicodeRange;
- attribute DOMString variant;
attribute DOMString featureSettings;
attribute DOMString display;
Modified: trunk/Source/WebCore/loader/cache/CachedFont.cpp (252759 => 252760)
--- trunk/Source/WebCore/loader/cache/CachedFont.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/loader/cache/CachedFont.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -124,20 +124,20 @@
return createFontCustomPlatformData(bytes, itemInCollection);
}
-RefPtr<Font> CachedFont::createFont(const FontDescription& fontDescription, const AtomString&, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+RefPtr<Font> CachedFont::createFont(const FontDescription& fontDescription, const AtomString&, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
- return Font::create(platformDataFromCustomData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities), Font::Origin::Remote);
+ return Font::create(platformDataFromCustomData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities), Font::Origin::Remote);
}
-FontPlatformData CachedFont::platformDataFromCustomData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+FontPlatformData CachedFont::platformDataFromCustomData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
ASSERT(m_fontCustomPlatformData);
- return platformDataFromCustomData(*m_fontCustomPlatformData, fontDescription, bold, italic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ return platformDataFromCustomData(*m_fontCustomPlatformData, fontDescription, bold, italic, fontFaceFeatures, fontFaceCapabilities);
}
-FontPlatformData CachedFont::platformDataFromCustomData(FontCustomPlatformData& fontCustomPlatformData, const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+FontPlatformData CachedFont::platformDataFromCustomData(FontCustomPlatformData& fontCustomPlatformData, const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
- return fontCustomPlatformData.fontPlatformData(fontDescription, bold, italic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ return fontCustomPlatformData.fontPlatformData(fontDescription, bold, italic, fontFaceFeatures, fontFaceCapabilities);
}
void CachedFont::allClientsRemoved()
Modified: trunk/Source/WebCore/loader/cache/CachedFont.h (252759 => 252760)
--- trunk/Source/WebCore/loader/cache/CachedFont.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/loader/cache/CachedFont.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -53,12 +53,12 @@
virtual bool ensureCustomFontData(const AtomString& remoteURI);
static std::unique_ptr<FontCustomPlatformData> createCustomFontData(SharedBuffer&, const String& itemInCollection, bool& wrapping);
- static FontPlatformData platformDataFromCustomData(FontCustomPlatformData&, const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities);
+ static FontPlatformData platformDataFromCustomData(FontCustomPlatformData&, const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
- virtual RefPtr<Font> createFont(const FontDescription&, const AtomString& remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities);
+ virtual RefPtr<Font> createFont(const FontDescription&, const AtomString& remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
protected:
- FontPlatformData platformDataFromCustomData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities);
+ FontPlatformData platformDataFromCustomData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
bool ensureCustomFontData(SharedBuffer* data);
Modified: trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp (252759 => 252760)
--- trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -48,17 +48,17 @@
{
}
-RefPtr<Font> CachedSVGFont::createFont(const FontDescription& fontDescription, const AtomString& remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+RefPtr<Font> CachedSVGFont::createFont(const FontDescription& fontDescription, const AtomString& remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
ASSERT(firstFontFace(remoteURI));
- return CachedFont::createFont(fontDescription, remoteURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ return CachedFont::createFont(fontDescription, remoteURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities);
}
-FontPlatformData CachedSVGFont::platformDataFromCustomData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+FontPlatformData CachedSVGFont::platformDataFromCustomData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
if (m_externalSVGDocument)
return FontPlatformData(fontDescription.computedPixelSize(), bold, italic);
- return CachedFont::platformDataFromCustomData(fontDescription, bold, italic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ return CachedFont::platformDataFromCustomData(fontDescription, bold, italic, fontFaceFeatures, fontFaceCapabilities);
}
bool CachedSVGFont::ensureCustomFontData(const AtomString& remoteURI)
Modified: trunk/Source/WebCore/loader/cache/CachedSVGFont.h (252759 => 252760)
--- trunk/Source/WebCore/loader/cache/CachedSVGFont.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/loader/cache/CachedSVGFont.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -39,10 +39,10 @@
bool ensureCustomFontData(const AtomString& remoteURI) override;
- RefPtr<Font> createFont(const FontDescription&, const AtomString& remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities) override;
+ RefPtr<Font> createFont(const FontDescription&, const AtomString& remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities) override;
private:
- FontPlatformData platformDataFromCustomData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities);
+ FontPlatformData platformDataFromCustomData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
SVGFontElement* getSVGFontById(const String&) const;
Modified: trunk/Source/WebCore/platform/graphics/FontCache.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/FontCache.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/FontCache.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -73,11 +73,10 @@
WTF_MAKE_FAST_ALLOCATED;
public:
FontPlatformDataCacheKey() { }
- FontPlatformDataCacheKey(const AtomString& family, const FontDescription& description, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+ FontPlatformDataCacheKey(const AtomString& family, const FontDescription& description, const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
: m_fontDescriptionKey(description)
, m_family(family)
, m_fontFaceFeatures(fontFaceFeatures ? *fontFaceFeatures : FontFeatureSettings())
- , m_fontFaceVariantSettings(fontFaceVariantSettings ? *fontFaceVariantSettings : FontVariantSettings())
, m_fontFaceCapabilities(fontFaceCapabilities)
{ }
@@ -91,7 +90,6 @@
{
if (m_fontDescriptionKey != other.m_fontDescriptionKey
|| m_fontFaceFeatures != other.m_fontFaceFeatures
- || m_fontFaceVariantSettings != other.m_fontFaceVariantSettings
|| m_fontFaceCapabilities != other.m_fontFaceCapabilities)
return false;
if (m_family.impl() == other.m_family.impl())
@@ -104,7 +102,6 @@
FontDescriptionKey m_fontDescriptionKey;
AtomString m_family;
FontFeatureSettings m_fontFaceFeatures;
- FontVariantSettings m_fontFaceVariantSettings;
FontSelectionSpecifiedCapabilities m_fontFaceCapabilities;
};
@@ -115,7 +112,6 @@
hasher.add(FontCascadeDescription::familyNameHash(fontKey.m_family));
hasher.add(fontKey.m_fontDescriptionKey.computeHash());
hasher.add(fontKey.m_fontFaceFeatures.hash());
- hasher.add(fontKey.m_fontFaceVariantSettings.uniqueValue());
if (auto weight = fontKey.m_fontFaceCapabilities.weight)
hasher.add(weight->uniqueValue());
else
@@ -200,7 +196,7 @@
}
FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& fontDescription, const AtomString& passedFamilyName,
- const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool checkingAlternateName)
+ const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool checkingAlternateName)
{
#if PLATFORM(IOS_FAMILY)
auto locker = holdLock(fontLock);
@@ -222,12 +218,12 @@
initialized = true;
}
- FontPlatformDataCacheKey key(familyName, fontDescription, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ FontPlatformDataCacheKey key(familyName, fontDescription, fontFaceFeatures, fontFaceCapabilities);
auto addResult = fontPlatformDataCache().add(key, nullptr);
FontPlatformDataCache::iterator it = addResult.iterator;
if (addResult.isNewEntry) {
- it->value = createFontPlatformData(fontDescription, familyName, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ it->value = createFontPlatformData(fontDescription, familyName, fontFaceFeatures, fontFaceCapabilities);
if (!it->value && !checkingAlternateName) {
// We were unable to find a font. We have a small set of fonts that we alias to other names,
@@ -234,7 +230,7 @@
// e.g., Arial/Helvetica, Courier/Courier New, etc. Try looking up the font under the aliased name.
const AtomString& alternateName = alternateFamilyName(familyName);
if (!alternateName.isNull()) {
- FontPlatformData* fontPlatformDataForAlternateName = getCachedFontPlatformData(fontDescription, alternateName, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, true);
+ FontPlatformData* fontPlatformDataForAlternateName = getCachedFontPlatformData(fontDescription, alternateName, fontFaceFeatures, fontFaceCapabilities, true);
// Lookup the key in the hash table again as the previous iterator may have
// been invalidated by the recursive call to getCachedFontPlatformData().
it = fontPlatformDataCache().find(key);
@@ -316,12 +312,12 @@
const unsigned cMaxUnderMemoryPressureInactiveFontData = 50;
const unsigned cTargetUnderMemoryPressureInactiveFontData = 30;
-RefPtr<Font> FontCache::fontForFamily(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool checkingAlternateName)
+RefPtr<Font> FontCache::fontForFamily(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool checkingAlternateName)
{
if (!m_purgeTimer.isActive())
m_purgeTimer.startOneShot(0_s);
- if (auto* platformData = getCachedFontPlatformData(fontDescription, family, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, checkingAlternateName))
+ if (auto* platformData = getCachedFontPlatformData(fontDescription, family, fontFaceFeatures, fontFaceCapabilities, checkingAlternateName))
return fontForPlatformData(*platformData);
return nullptr;
Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/FontCache.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -212,7 +212,7 @@
// It comes into play when you create an @font-face which shares a family name as a preinstalled font.
Vector<FontSelectionCapabilities> getFontSelectionCapabilitiesInFamily(const AtomString&, AllowUserInstalledFonts);
- WEBCORE_EXPORT RefPtr<Font> fontForFamily(const FontDescription&, const AtomString&, const FontFeatureSettings* fontFaceFeatures = nullptr, const FontVariantSettings* fontFaceVariantSettings = nullptr, FontSelectionSpecifiedCapabilities fontFaceCapabilities = { }, bool checkingAlternateName = false);
+ WEBCORE_EXPORT RefPtr<Font> fontForFamily(const FontDescription&, const AtomString&, const FontFeatureSettings* fontFaceFeatures = nullptr, FontSelectionSpecifiedCapabilities fontFaceCapabilities = { }, bool checkingAlternateName = false);
WEBCORE_EXPORT Ref<Font> lastResortFallbackFont(const FontDescription&);
WEBCORE_EXPORT Ref<Font> fontForPlatformData(const FontPlatformData&);
RefPtr<Font> similarFont(const FontDescription&, const AtomString& family);
@@ -262,13 +262,13 @@
WEBCORE_EXPORT void purgeInactiveFontDataIfNeeded();
// FIXME: This method should eventually be removed.
- FontPlatformData* getCachedFontPlatformData(const FontDescription&, const AtomString& family, const FontFeatureSettings* fontFaceFeatures = nullptr, const FontVariantSettings* fontFaceVariantSettings = nullptr, FontSelectionSpecifiedCapabilities fontFaceCapabilities = { }, bool checkingAlternateName = false);
+ FontPlatformData* getCachedFontPlatformData(const FontDescription&, const AtomString& family, const FontFeatureSettings* fontFaceFeatures = nullptr, FontSelectionSpecifiedCapabilities fontFaceCapabilities = { }, bool checkingAlternateName = false);
// These methods are implemented by each platform.
#if PLATFORM(COCOA)
FontPlatformData* getCustomFallbackFont(const UInt32, const FontDescription&);
#endif
- WEBCORE_EXPORT std::unique_ptr<FontPlatformData> createFontPlatformData(const FontDescription&, const AtomString& family, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities);
+ WEBCORE_EXPORT std::unique_ptr<FontPlatformData> createFontPlatformData(const FontDescription&, const AtomString& family, const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities);
static const AtomString& alternateFamilyName(const AtomString&);
static const AtomString& platformAlternateFamilyName(const AtomString&);
@@ -289,7 +289,7 @@
inline std::unique_ptr<FontPlatformData> FontCache::createFontPlatformDataForTesting(const FontDescription& fontDescription, const AtomString& family)
{
- return createFontPlatformData(fontDescription, family, nullptr, nullptr, { });
+ return createFontPlatformData(fontDescription, family, nullptr, { });
}
#if !PLATFORM(COCOA) && !USE(FREETYPE)
Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -46,7 +46,7 @@
public:
FontCustomPlatformData(FT_Face, SharedBuffer&);
~FontCustomPlatformData() = default;
- FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities);
+ FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
static bool supportsFormat(const String&);
private:
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -530,7 +530,7 @@
bool aatShaping { false };
};
-RetainPtr<CTFontRef> preparePlatformFont(CTFontRef originalFont, const FontDescription& fontDescription, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool applyWeightWidthSlopeVariations)
+RetainPtr<CTFontRef> preparePlatformFont(CTFontRef originalFont, const FontDescription& fontDescription, const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool applyWeightWidthSlopeVariations)
{
if (!originalFont)
return originalFont;
@@ -569,8 +569,7 @@
bool variantSettingsIsNormal = variantSettings.isAllNormal();
bool dontNeedToApplyOpticalSizing = fontOpticalSizing == FontOpticalSizing::Enabled && !forceOpticalSizingOn;
bool fontFaceDoesntSpecifyFeatures = !fontFaceFeatures || fontFaceFeatures->isEmpty();
- bool fontFaceDoesntSpecifyVariations = !fontFaceVariantSettings || fontFaceVariantSettings->isAllNormal();
- if (noFontFeatureSettings && noFontVariationSettings && textRenderingModeIsAuto && variantSettingsIsNormal && dontNeedToApplyOpticalSizing && fontFaceDoesntSpecifyFeatures && fontFaceDoesntSpecifyVariations) {
+ if (noFontFeatureSettings && noFontVariationSettings && textRenderingModeIsAuto && variantSettingsIsNormal && dontNeedToApplyOpticalSizing && fontFaceDoesntSpecifyFeatures) {
#if HAVE(CTFONTCREATEFORCHARACTERSWITHLANGUAGEANDOPTION)
return originalFont;
#else
@@ -584,8 +583,7 @@
// Step 1: CoreText handles default features (such as required ligatures).
// Step 2: Consult with font-variant-* inside @font-face
- if (fontFaceVariantSettings)
- featuresToBeApplied = computeFeatureSettingsFromVariants(*fontFaceVariantSettings);
+ // This no longer happens any more: https://github.com/w3c/csswg-drafts/issues/2531
// Step 3: Consult with font-feature-settings inside @font-face
if (fontFaceFeatures) {
@@ -1294,7 +1292,7 @@
return nullptr;
}
-static RetainPtr<CTFontRef> fontWithFamily(const AtomString& family, const FontDescription& fontDescription, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, float size)
+static RetainPtr<CTFontRef> fontWithFamily(const AtomString& family, const FontDescription& fontDescription, const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities, float size)
{
if (family.isEmpty())
return nullptr;
@@ -1306,7 +1304,7 @@
if (!fontLookup.result)
fontLookup = platformFontLookupWithFamily(family, fontDescription.fontSelectionRequest(), size, fontDescription.shouldAllowUserInstalledFonts());
}
- return preparePlatformFont(fontLookup.result.get(), fontDescription, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, !fontLookup.createdFromPostScriptName);
+ return preparePlatformFont(fontLookup.result.get(), fontDescription, fontFaceFeatures, fontFaceCapabilities, !fontLookup.createdFromPostScriptName);
}
#if PLATFORM(MAC)
@@ -1341,11 +1339,11 @@
}
#endif
-std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
float size = fontDescription.computedPixelSize();
- auto font = fontWithFamily(family, fontDescription, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, size);
+ auto font = fontWithFamily(family, fontDescription, fontFaceFeatures, fontFaceCapabilities, size);
#if PLATFORM(MAC)
if (!font) {
@@ -1356,7 +1354,7 @@
// Ignore the result because we want to use our own algorithm to actually find the font.
autoActivateFont(family.string(), size);
- font = fontWithFamily(family, fontDescription, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, size);
+ font = fontWithFamily(family, fontDescription, fontFaceFeatures, fontFaceCapabilities, size);
}
#endif
@@ -1485,7 +1483,7 @@
m_fontNamesRequiringSystemFallbackForPrewarming.add(fullName);
auto result = lookupFallbackFont(platformData.font(), description.weight(), description.locale(), description.shouldAllowUserInstalledFonts(), characters, length);
- result = preparePlatformFont(result.get(), description, nullptr, nullptr, { });
+ result = preparePlatformFont(result.get(), description, nullptr, { });
if (!result)
return lastResortFallbackFont(description);
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -50,7 +50,7 @@
bool needsSyntheticOblique;
};
-RetainPtr<CTFontRef> preparePlatformFont(CTFontRef, const FontDescription&, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool applyWeightWidthSlopeVariations = true);
+RetainPtr<CTFontRef> preparePlatformFont(CTFontRef, const FontDescription&, const FontFeatureSettings* fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool applyWeightWidthSlopeVariations = true);
SynthesisPair computeNecessarySynthesis(CTFontRef, const FontDescription&, bool isPlatformFont = false);
RetainPtr<CTFontRef> platformFontWithFamilySpecialCase(const AtomString& family, const FontDescription&, float size, AllowUserInstalledFonts);
RetainPtr<CTFontRef> platformFontWithFamily(const AtomString& family, FontSelectionRequest, TextRenderingMode, float size);
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -108,7 +108,7 @@
fontForSynthesisComputation = physicalFont;
#endif
- font = preparePlatformFont(font.get(), fontDescription, nullptr, nullptr, { });
+ font = preparePlatformFont(font.get(), fontDescription, nullptr, { });
auto [syntheticBold, syntheticOblique] = computeNecessarySynthesis(fontForSynthesisComputation.get(), fontDescription).boldObliquePair();
Modified: trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -500,7 +500,7 @@
|| equalLettersIgnoringASCIICase(familyNameString, "cursive");
}
-std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings*, const FontVariantSettings*, FontSelectionSpecifiedCapabilities)
+std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings*, FontSelectionSpecifiedCapabilities)
{
// The CSS font matching algorithm (http://www.w3.org/TR/css3-fonts/#font-matching-algorithm)
// says that we must find an exact match for font family, slant (italic or oblique can be used)
Modified: trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -75,7 +75,7 @@
return pattern;
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& description, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities)
+FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& description, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities)
{
auto* freeTypeFace = static_cast<FT_Face>(cairo_font_face_get_user_data(m_fontFace.get(), &freeTypeFaceKey));
ASSERT(freeTypeFace);
Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -35,7 +35,7 @@
FontCustomPlatformData::~FontCustomPlatformData() = default;
-FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
+FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
auto attributes = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
addAttributesForWebFonts(attributes.get(), fontDescription.shouldAllowUserInstalledFonts());
@@ -46,7 +46,7 @@
FontOrientation orientation = fontDescription.orientation();
FontWidthVariant widthVariant = fontDescription.widthVariant();
RetainPtr<CTFontRef> font = adoptCF(CTFontCreateWithFontDescriptor(modifiedFontDescriptor.get(), size, nullptr));
- font = preparePlatformFont(font.get(), fontDescription, &fontFaceFeatures, &fontFaceVariantSettings, fontFaceCapabilities);
+ font = preparePlatformFont(font.get(), fontDescription, &fontFaceFeatures, fontFaceCapabilities);
ASSERT(font);
return FontPlatformData(font.get(), size, bold, italic, orientation, widthVariant, fontDescription.textRenderingMode());
}
Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -50,7 +50,7 @@
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities);
+ FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities);
static bool supportsFormat(const String&);
Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -617,7 +617,7 @@
return result;
}
-std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings*, const FontVariantSettings*, FontSelectionSpecifiedCapabilities)
+std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomString& family, const FontFeatureSettings*, FontSelectionSpecifiedCapabilities)
{
bool isLucidaGrande = equalLettersIgnoringASCIICase(family, "lucida grande");
Modified: trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -46,7 +46,7 @@
RemoveFontMemResourceEx(m_fontReference);
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities)
+FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities)
{
int size = fontDescription.computedPixelSize();
FontRenderingMode renderingMode = fontDescription.renderingMode();
Modified: trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h 2019-11-22 03:56:06 UTC (rev 252760)
@@ -52,7 +52,7 @@
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities);
+ FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities);
static bool supportsFormat(const String&);
Modified: trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp (252759 => 252760)
--- trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp 2019-11-22 03:01:49 UTC (rev 252759)
+++ trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp 2019-11-22 03:56:06 UTC (rev 252760)
@@ -38,7 +38,7 @@
RemoveFontMemResourceEx(m_fontReference);
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings&, const FontVariantSettings&, FontSelectionSpecifiedCapabilities)
+FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings&, FontSelectionSpecifiedCapabilities)
{
int size = fontDescription.computedPixelSize();
FontRenderingMode renderingMode = fontDescription.renderingMode();