CSS font-variation-settings does not handle uppercase axis names in variable fonts
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 00:39:09 +0000 (00:39 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 00:39:09 +0000 (00:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163546

Reviewed by Dean Jackson.

Source/WebCore:

Remove the extra toASCIILower() call.

Test: fast/text/variations/case-axis-names.html

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseFontVariationTag):

LayoutTests:

* fast/text/variations/case-axis-names-expected.html: Added.
* fast/text/variations/case-axis-names.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207581 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/text/variations/case-axis-names-expected.html [new file with mode: 0644]
LayoutTests/fast/text/variations/case-axis-names.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSParser.cpp

index 170ed45..4057bf6 100644 (file)
@@ -1,3 +1,13 @@
+2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        CSS font-variation-settings does not handle uppercase axis names in variable fonts
+        https://bugs.webkit.org/show_bug.cgi?id=163546
+
+        Reviewed by Dean Jackson.
+
+        * fast/text/variations/case-axis-names-expected.html: Added.
+        * fast/text/variations/case-axis-names.html: Added.
+
 2016-10-19  Joone Hur  <joone.hur@intel.com>
 
         Add a plain space instead of &nbsp; between text nodes
diff --git a/LayoutTests/fast/text/variations/case-axis-names-expected.html b/LayoutTests/fast/text/variations/case-axis-names-expected.html
new file mode 100644 (file)
index 0000000..7c0a0bd
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test passes if capitalized and lowercased axis names are distinct.
+<div style="font: 100px '-apple-system';">Hello</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/text/variations/case-axis-names.html b/LayoutTests/fast/text/variations/case-axis-names.html
new file mode 100644 (file)
index 0000000..692e39f
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test passes if capitalized and lowercased axis names are distinct.
+<div style="font: 100px '-apple-system'; font-variation-settings: 'WGHT' 1.8;">Hello</div>
+</body>
+</html>
\ No newline at end of file
index df08fd8..ca1bd17 100644 (file)
@@ -1,3 +1,17 @@
+2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        CSS font-variation-settings does not handle uppercase axis names in variable fonts
+        https://bugs.webkit.org/show_bug.cgi?id=163546
+
+        Reviewed by Dean Jackson.
+
+        Remove the extra toASCIILower() call.
+
+        Test: fast/text/variations/case-axis-names.html
+
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParser::parseFontVariationTag):
+
 2016-10-19  Anders Carlsson  <andersca@apple.com>
 
         Remove m_redirectURLs from HistoryItem
index 94c5e9e..0bfede3 100644 (file)
@@ -10593,7 +10593,7 @@ bool CSSParser::parseFontVariationTag(CSSValueList& settings)
         UChar character = value->string[i];
         if (character < 0x20 || character > 0x7E)
             return false;
-        tag[i] = toASCIILower(character);
+        tag[i] = character;
     }
 
     value = m_valueList->next();