Title: [283279] trunk
Revision
283279
Author
[email protected]
Date
2021-09-29 16:31:34 -0700 (Wed, 29 Sep 2021)

Log Message

Implement the 'ic' unit from CSS Values 4
https://bugs.webkit.org/show_bug.cgi?id=204276
<rdar://problem/57256127>

Patch by Kiet Ho <[email protected]> on 2021-09-29
Reviewed by Myles C. Maxfield.

LayoutTests/imported/w3c:

Fix ic-unit-{001..012} tests and references to use the IcTestFullWidth font,
which includes the CJK water glyph as a full width character. This avoids an
issue on macOS Catalina where the chosen fallback font renders the glyph
outside of the em box.

Fix ic-unit-{001..004} references to not use the ic unit.

Add two new tests where the CJK water glyph is half-width (ic-unit-013) and zero-width
(ic-unit-014).

* web-platform-tests/css/css-values/ic-unit-001-expected.html:
* web-platform-tests/css/css-values/ic-unit-001.html:
* web-platform-tests/css/css-values/ic-unit-002-expected.html:
* web-platform-tests/css/css-values/ic-unit-002.html:
* web-platform-tests/css/css-values/ic-unit-003-expected.html:
* web-platform-tests/css/css-values/ic-unit-003.html:
* web-platform-tests/css/css-values/ic-unit-004-expected.html:
* web-platform-tests/css/css-values/ic-unit-004.html:
* web-platform-tests/css/css-values/ic-unit-008-expected.html:
* web-platform-tests/css/css-values/ic-unit-008.html:
* web-platform-tests/css/css-values/ic-unit-009-expected.html:
* web-platform-tests/css/css-values/ic-unit-009.html:
* web-platform-tests/css/css-values/ic-unit-010-expected.html:
* web-platform-tests/css/css-values/ic-unit-010.html:
* web-platform-tests/css/css-values/ic-unit-011-expected.html:
* web-platform-tests/css/css-values/ic-unit-011.html:
* web-platform-tests/css/css-values/ic-unit-012-expected.html:
* web-platform-tests/css/css-values/ic-unit-012.html:
* web-platform-tests/css/css-values/ic-unit-013-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-013.html: Added.
* web-platform-tests/css/css-values/ic-unit-014-expected.html: Added.
* web-platform-tests/css/css-values/ic-unit-014.html: Added.
* web-platform-tests/css/css-values/resources/IcTestFullWidth.woff2: Added.
* web-platform-tests/css/css-values/resources/IcTestHalfWidth.woff2: Added.
* web-platform-tests/css/css-values/resources/IcTestZeroWidth.woff2: Added.

Source/WebCore:

Tests: fast/css/CSSPrimitiveValue-ic.html
       imported/w3c/web-platform-tests/css/css-values/ic-unit-013.html
       imported/w3c/web-platform-tests/css/css-values/ic-unit-014.html

* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):
(WebCore::CSSPrimitiveValue::collectDirectComputationalDependencies const):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isLength):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):
* css/CSSUnits.cpp:
(WebCore::unitCategory):
(WebCore::operator<<):
* css/CSSUnits.h:
* css/DeprecatedCSSOMPrimitiveValue.cpp:
(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):
* css/calc/CSSCalcCategoryMapping.cpp:
(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):
* css/parser/CSSParserToken.cpp:
(WebCore::cssPrimitiveValueUnitFromTrie):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeDimension):
* css/parser/SizesAttributeParser.cpp:
(WebCore::SizesAttributeParser::computeLength):
* platform/graphics/Font.cpp:
(WebCore::Font::platformGlyphInit): simplyfy logic, reorder misplaced comment.
* platform/graphics/Font.h: remove property `m_zeroGlyph` only used once in
WebCore::Font::platformGlyphInit. Remove unused getters adjustedSpaceWidth(),
setSpaceWidths(), setSpaceGlyph(), setZeroWidthSpaceGlyph(), zeroGlyph(), setZeroGlyph().
(WebCore::Font::spaceWidth const):
(WebCore::Font::spaceGlyph const):
(WebCore::Font::zeroWidthSpaceGlyph const):
(WebCore::Font::isZeroWidthSpaceGlyph const):
* platform/graphics/FontMetrics.h:
(WebCore::FontMetrics::ideogramWidth const): add metric containing the width of an ideogram
glyph in the font. This width is approximated from the width of the CJK water glyph (U+6C34).
(WebCore::FontMetrics::setIdeogramWidth):
(WebCore::FontMetrics::reset):

Source/WTF:

* wtf/unicode/CharacterNames.h: add CJK water glyph (U+6C34) constant.

LayoutTests:

Added tests for behavior of CSSPrimitiveValue on ic unit.

* TestExpectations: remove ImageOnlyFailure expectations for ic-unit-* tests, now that they should pass.
* fast/css/CSSPrimitiveValue-ic-expected.txt: Added.
* fast/css/CSSPrimitiveValue-ic.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (283278 => 283279)


--- trunk/LayoutTests/ChangeLog	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/ChangeLog	2021-09-29 23:31:34 UTC (rev 283279)
@@ -1,3 +1,17 @@
+2021-09-29  Kiet Ho  <[email protected]>
+
+        Implement the 'ic' unit from CSS Values 4
+        https://bugs.webkit.org/show_bug.cgi?id=204276
+        <rdar://problem/57256127>
+
+        Reviewed by Myles C. Maxfield.
+
+        Added tests for behavior of CSSPrimitiveValue on ic unit.
+
+        * TestExpectations: remove ImageOnlyFailure expectations for ic-unit-* tests, now that they should pass.
+        * fast/css/CSSPrimitiveValue-ic-expected.txt: Added.
+        * fast/css/CSSPrimitiveValue-ic.html: Added.
+
 2021-09-29  Chris Dumez  <[email protected]>
 
         Use isolated NSURLSessions for each first party registrable domain

Modified: trunk/LayoutTests/TestExpectations (283278 => 283279)


--- trunk/LayoutTests/TestExpectations	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/TestExpectations	2021-09-29 23:31:34 UTC (rev 283279)
@@ -3273,15 +3273,6 @@
 webkit.org/b/203331 imported/w3c/web-platform-tests/css/css-values/attr-px-valid.html [ ImageOnlyFailure ]
 webkit.org/b/203333 imported/w3c/web-platform-tests/css/css-values/ch-unit-003.html [ ImageOnlyFailure ]
 webkit.org/b/203333 imported/w3c/web-platform-tests/css/css-values/ch-unit-010.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-001.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-002.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-003.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-004.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-008.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-009.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-010.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-011.html [ ImageOnlyFailure ]
-webkit.org/b/203334 imported/w3c/web-platform-tests/css/css-values/ic-unit-012.html [ ImageOnlyFailure ]
 webkit.org/b/203336 imported/w3c/web-platform-tests/css/css-values/lh-unit-001.html [ Pass ]
 webkit.org/b/203336 imported/w3c/web-platform-tests/css/css-values/lh-unit-002.html [ Pass ]
 webkit.org/b/203338 imported/w3c/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html [ ImageOnlyFailure ]

Added: trunk/LayoutTests/fast/css/CSSPrimitiveValue-ic-expected.txt (0 => 283279)


--- trunk/LayoutTests/fast/css/CSSPrimitiveValue-ic-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/CSSPrimitiveValue-ic-expected.txt	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,15 @@
+Testing behaviors of CSSPrimitiveValue on the ic unit.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS divWidth.primitiveType is CSSPrimitiveValue.CSS_UNKNOWN
+PASS divWidth.getFloatValue(CSSPrimitiveValue.CSS_S) threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS divWidth.getCounterValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS divWidth.getRGBColorValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS divWidth.getRectValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS divWidth.getStringValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/css/CSSPrimitiveValue-ic.html (0 => 283279)


--- trunk/LayoutTests/fast/css/CSSPrimitiveValue-ic.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/CSSPrimitiveValue-ic.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<div id="test-div" style="width: 1ic;"></div>
+<script>
+description("Testing behaviors of CSSPrimitiveValue on the ic unit.");
+
+var divWidth = document.getElementById("test-div").style.getPropertyCSSValue("width");
+
+shouldBe("divWidth.primitiveType", "CSSPrimitiveValue.CSS_UNKNOWN");
+
+shouldThrowErrorName("divWidth.getFloatValue(CSSPrimitiveValue.CSS_S)", "InvalidAccessError");
+shouldThrowErrorName("divWidth.getCounterValue()", "InvalidAccessError");
+shouldThrowErrorName("divWidth.getRGBColorValue()", "InvalidAccessError");
+shouldThrowErrorName("divWidth.getRectValue()", "InvalidAccessError");
+shouldThrowErrorName("divWidth.getStringValue()", "InvalidAccessError");
+</script>
+<script src=""
+</body>

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-29 23:31:34 UTC (rev 283279)
@@ -1,3 +1,47 @@
+2021-09-29  Kiet Ho  <[email protected]>
+
+        Implement the 'ic' unit from CSS Values 4
+        https://bugs.webkit.org/show_bug.cgi?id=204276
+        <rdar://problem/57256127>
+
+        Reviewed by Myles C. Maxfield.
+
+        Fix ic-unit-{001..012} tests and references to use the IcTestFullWidth font,
+        which includes the CJK water glyph as a full width character. This avoids an
+        issue on macOS Catalina where the chosen fallback font renders the glyph
+        outside of the em box.
+
+        Fix ic-unit-{001..004} references to not use the ic unit.
+
+        Add two new tests where the CJK water glyph is half-width (ic-unit-013) and zero-width
+        (ic-unit-014).
+
+        * web-platform-tests/css/css-values/ic-unit-001-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-001.html:
+        * web-platform-tests/css/css-values/ic-unit-002-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-002.html:
+        * web-platform-tests/css/css-values/ic-unit-003-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-003.html:
+        * web-platform-tests/css/css-values/ic-unit-004-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-004.html:
+        * web-platform-tests/css/css-values/ic-unit-008-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-008.html:
+        * web-platform-tests/css/css-values/ic-unit-009-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-009.html:
+        * web-platform-tests/css/css-values/ic-unit-010-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-010.html:
+        * web-platform-tests/css/css-values/ic-unit-011-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-011.html:
+        * web-platform-tests/css/css-values/ic-unit-012-expected.html:
+        * web-platform-tests/css/css-values/ic-unit-012.html:
+        * web-platform-tests/css/css-values/ic-unit-013-expected.html: Added.
+        * web-platform-tests/css/css-values/ic-unit-013.html: Added.
+        * web-platform-tests/css/css-values/ic-unit-014-expected.html: Added.
+        * web-platform-tests/css/css-values/ic-unit-014.html: Added.
+        * web-platform-tests/css/css-values/resources/IcTestFullWidth.woff2: Added.
+        * web-platform-tests/css/css-values/resources/IcTestHalfWidth.woff2: Added.
+        * web-platform-tests/css/css-values/resources/IcTestZeroWidth.woff2: Added.
+
 2021-09-29  Chris Dumez  <[email protected]>
 
         Use isolated NSURLSessions for each first party registrable domain

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-001-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-001-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-001-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -3,9 +3,13 @@
 <title>CSS Values and Units Test Reference File</title>
 <link rel="author" title="Florian Rivoal" href=""
 <style>
-svg { width: 10ic; }
+.ref {
+    width: 200px;
+    height: 200px;
+    background: green;
+}
 </style>
 <body>
     <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
-    <svg viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="green"></svg>
+    <div class="ref"></div>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-001.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-001.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-001.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -6,7 +6,13 @@
 <link rel="match" href=""
 <meta name="assert" content="The ic unit is equal to the used advance measure of the 水 (CJK water ideograph, U+6C34) glyph found in the font used to render it.">
 <style>
+@font-face {
+    font-family: IcTestFullWidth;
+    src: url(resources/IcTestFullWidth.woff2);
+}
+
 span {
+    font: 20px IcTestFullWidth;
     background: green;
     color: green;
     top: 0; bottom: 0;
@@ -13,6 +19,7 @@
     position: absolute;
 }
 div {
+    font: 20px IcTestFullWidth;
     background: red;
     color: red;
     position: relative;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-002-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-002-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-002-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -3,13 +3,13 @@
 <title>CSS Values and Units Test Reference File</title>
 <link rel="author" title="Florian Rivoal" href=""
 <style>
-svg {
-    width: 10ic;
-    writing-mode: vertical-rl;
-    text-orientation: upright;
+.ref {
+    width: 200px;
+    height: 200px;
+    background: green;
 }
 </style>
 <body>
     <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
-    <svg viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="green"></svg>
+    <div class="ref"></div>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-002.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-002.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-002.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -8,13 +8,21 @@
 <link rel="match" href=""
 <meta name="assert" content="In vertical upright, the ic unit is equal to the used vertical advance measure of the 水 (CJK water ideograph, U+6C34) glyph found in the font used to render it.">
 <style>
+@font-face {
+    font-family: IcTestFullWidth;
+    src: url(resources/IcTestFullWidth.woff2);
+}
+
 span {
+    font: 20px IcTestFullWidth;
     background: green;
     color: green;
     left: 0; right: 0;
     position: absolute;
 }
+
 div {
+    font: 20px IcTestFullWidth;
     background: red;
     color: red;
     position: relative;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-003-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-003-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-003-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -3,13 +3,13 @@
 <title>CSS Values and Units Test Reference File</title>
 <link rel="author" title="Florian Rivoal" href=""
 <style>
-svg {
-    width: 10ic;
-    writing-mode: vertical-rl;
-    text-orientation: upright;
+.ref {
+    width: 200px;
+    height: 200px;
+    background: green;
 }
 </style>
 <body>
     <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
-    <svg viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="green"></svg>
+    <div class="ref"></div>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-003.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-003.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-003.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -8,13 +8,21 @@
 <link rel="match" href=""
 <meta name="assert" content="In vertical mixed, the ic unit is equal to the used vertical advance measure of the 水 (CJK water ideograph, U+6C34) glyph found in the font used to render it.">
 <style>
+@font-face {
+    font-family: IcTestFullWidth;
+    src: url(resources/IcTestFullWidth.woff2);
+}
+
 span {
+    font: 20px IcTestFullWidth;
     background: green;
     color: green;
     left: 0; right: 0;
     position: absolute;
 }
+
 div {
+    font: 20px IcTestFullWidth;
     background: red;
     color: red;
     position: relative;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-004-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-004-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-004-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -3,9 +3,13 @@
 <title>CSS Values and Units Test Reference File</title>
 <link rel="author" title="Florian Rivoal" href=""
 <style>
-svg { width: 10ic; }
+.ref {
+    width: 200px;
+    height: 200px;
+    background: green;
+}
 </style>
 <body>
     <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
-    <svg viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="green"></svg>
+    <div class="ref"></div>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-004.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-004.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-004.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -8,13 +8,21 @@
 <link rel="match" href=""
 <meta name="assert" content="In vertical sideways, the ic unit is equal to the used horizontal advance measure of the 水 (CJK water ideograph, U+6C34) glyph found in the font used to render it.">
 <style>
+@font-face {
+    font-family: IcTestFullWidth;
+    src: url(resources/IcTestFullWidth.woff2);
+}
+
 span {
+    font: 20px IcTestFullWidth;
     background: green;
     color: green;
     left: 0; right: 0;
     position: absolute;
 }
+
 div {
+    font: 20px IcTestFullWidth;
     background: red;
     color: red;
     position: relative;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-008-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-008-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-008-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -7,9 +7,16 @@
   <link rel="author" title="Gérard Talbot" href=""
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       line-height: 1.8; /* arbitrary line-height */
     }

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-008.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-008.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-008.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -12,9 +12,16 @@
   <meta name="assert" content="In this test, the ic unit is the advance width measure of the 水 (CJK water ideograph, U+6C34) glyph.">
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
     }
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-009-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-009-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-009-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -7,9 +7,16 @@
   <link rel="author" title="Gérard Talbot" href=""
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       line-height: 1.8; /* arbitrary line-height */
       writing-mode: vertical-rl;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-009.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-009.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-009.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -12,9 +12,16 @@
   <meta name="assert" content="In this test, the ic unit is the advance height measure of the 水 (CJK water ideograph, U+6C34) glyph.">
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       writing-mode: vertical-rl;
     }

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-010-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-010-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-010-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -7,9 +7,16 @@
   <link rel="author" title="Gérard Talbot" href=""
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       line-height: 1.8; /* arbitrary line-height */
       writing-mode: vertical-rl;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-010.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-010.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-010.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -12,9 +12,16 @@
   <meta name="assert" content="In this test, the ic unit is the advance height measure of the 水 (CJK water ideograph, U+6C34) glyph.">
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       text-orientation: mixed;
       writing-mode: vertical-rl;
@@ -47,4 +54,4 @@
 
   水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
 
-  -->
\ No newline at end of file
+  -->

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-011-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-011-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-011-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -7,9 +7,16 @@
   <link rel="author" title="Gérard Talbot" href=""
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       line-height: 1.8; /* arbitrary line-height */
       writing-mode: vertical-rl;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-011.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-011.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-011.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -12,9 +12,16 @@
   <meta name="assert" content="In this test, the ic unit is the advance height measure of the 水 (CJK water ideograph, U+6C34) glyph.">
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       text-orientation: upright;
       writing-mode: vertical-rl;
@@ -47,4 +54,4 @@
 
   水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
 
-  -->
\ No newline at end of file
+  -->

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012-expected.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012-expected.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -7,9 +7,16 @@
   <link rel="author" title="Gérard Talbot" href=""
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       line-height: 1.8; /* arbitrary line-height */
       writing-mode: vertical-rl;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012.html (283278 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012.html	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -12,9 +12,16 @@
   <meta name="assert" content="In this test, the ic unit is the advance width measure of the 水 (CJK water ideograph, U+6C34) glyph.">
 
   <style>
+  @font-face
+    {
+      font-family: IcTestFullWidth;
+      src: url(resources/IcTestFullWidth.woff2);
+    }
+
   div
     {
       float: left;
+      font-family: IcTestFullWidth;
       font-size: 80px; /* arbitrary font size */
       text-orientation: sideways;
       writing-mode: vertical-rl;
@@ -47,4 +54,4 @@
 
   水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
 
-  -->
\ No newline at end of file
+  -->

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-013-expected.html (0 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-013-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-013-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+
+<meta charset="utf-8">
+<title>CSS Values and Units Test: support for the ic unit</title>
+<style>
+.test, .ref {
+    width: 100px;
+    height: 20px;
+    background: green;
+}
+
+.test {
+    margin-bottom: 10px;
+}
+</style>
+
+<p>The test passes if there are two green rectangles of equal length.</p>
+<div class="test"></div>
+<div class="ref"></div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-013.html (0 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-013.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-013.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+
+<meta charset="utf-8">
+<title>CSS Values and Units Test: support for the ic unit</title>
+<link rel="author" title="Kiet Ho" href=""
+<link rel="help" href=""
+<link rel="match" href=""
+<meta name="assert" content="The ic unit is equal to 0em if the CJK water glyph's advance is 0.">
+<style>
+/* The following font contains the CJK water (U+6C34) glyph as a zero-width character. */
+@font-face {
+  font-family: IcTestZeroWidth;
+  src: url(resources/IcTestZeroWidth.woff2);
+}
+
+.test {
+    font: 20px IcTestZeroWidth;
+    width: calc(100px + 10ic);
+    height: 20px;
+    background: green;
+    margin-bottom: 10px;
+}
+
+.ref {
+    /* Each ic should be equal to 0px because the CJK water glyph in the font is zero-width. */
+    width: 100px;
+    height: 20px;
+    background: green;
+}
+</style>
+
+<p>The test passes if there are two green rectangles of equal length.</p>
+<div class="test"></div>
+<div class="ref"></div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-014-expected.html (0 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-014-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-014-expected.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+
+<meta charset="utf-8">
+<title>CSS Values and Units Test: support for the ic unit</title>
+<style>
+.test, .ref {
+    width: 200px;
+    height: 20px;
+    background: green;
+}
+
+.test {
+    margin-bottom: 10px;
+}
+</style>
+
+<p>The test passes if there are two green rectangles of equal length.</p>
+<div class="test"></div>
+<div class="ref"></div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-014.html (0 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-014.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-014.html	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+
+<meta charset="utf-8">
+<title>CSS Values and Units Test: support for the ic unit</title>
+<link rel="author" title="Kiet Ho" href=""
+<link rel="help" href=""
+<link rel="match" href=""
+<meta name="assert" content="The ic unit is equal to 0.5em if the CJK water glyph's advance is 0.5em.">
+<style>
+/* The following font contains the CJK water (U+6C34) glyph as a rectangle box,
+   with the width being exactly half of its height. */
+@font-face {
+  font-family: IcTestHalfWidth;
+  src: url(resources/IcTestHalfWidth.woff2);
+}
+
+.test {
+    font-family: IcTestHalfWidth;
+    font-size: 20px;
+    width: calc(100px + 10ic);
+    height: 20px;
+    background: green;
+    margin-bottom: 10px;
+}
+
+.ref {
+    /*
+    Each ic is equal to 10px, the width of a CJK water glyph.
+    (its height is 20px, and its width is half the height).
+    The width of .test is then:
+        100px + (10ic * 10px / ic) = 200px
+    */
+    width: 200px;
+    height: 20px;
+    background: green;
+}
+</style>
+
+<p>The test passes if there are two green rectangles of equal length.</p>
+<div class="test"></div>
+<div class="ref"></div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestFullWidth.woff2 (0 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestFullWidth.woff2	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestFullWidth.woff2	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,12 @@
+wOF2����������d���������� ��������������������������������������������������?FFTM`��\x82B
+p}
+��6$ \x842.��\x8E¶ys\xE4#\x89d\xCB"\x86e\x8A\x87\x87\xFB\xF1\x9E{\xDF\xFD\x85\xD1X\xB5Y\xA5M>Kh%p\x82mhE\xB3\xF2\xFB\xD6\xF4O6\x85\x9D\x9D\xDB#\xB0\xB2L%\xF4U
+HU\xAB:@)\xCF\xE7\xBD5=\x80&\xF0|\x97\xC0ހ\xAE\xBAq\xA6a\xC0Q/
+\xF0\xC5@(\xF3\xD6oF\xA4\xAE:\xB6\x88\xC4iC\xF8\xF2\xF3\xBApԽ~\x83\xA3ݧ]\xA0۰(\x81@\x95\xB8\xAB\x85|\x98\x9Fq4\xBEY\x89RK��\xED��8q#?\xC3ц\xB5a\x89\x95\xFF\xA6^>\x80	\x84+FX#FDM\x80R\x82\x9B\xABah\xFFr\xFC Z	@$��\x9A=N\xE5m\xC4\xFFP\x82\xEDhЍ~��\x85yU\xD5\xD5\xD2S\xE7b-\x9D\xE7E_N=\xEA\xF4c\xF2g\xF1#\xDF\xDF3\xAD\x80\x97da\x{DDAD}\xFC0nZ[\xBE\xAE\xDD6釁\xB1\xC4Z$\xC1\xB5Ɵ\xC2\xE3ʄ\xE0\xDD\xD5qa\x98Z\xFB\xDD+\xC7\xEDK\xA4\xA1\x99\xC8Gh\x97 \xC8G\xB8R\xA0\x99@��\x80*\xA6\x80B\xF1\x81\xD2.A"\xB6H��\xBD\x9E!��\xA4��\xA1\xCF4\xA9\xCD.\x8DP\xFA\xFCB\x80\xFD1\x89@\xAB\xBE8!\xAA#\x8CH\xBDV\xD08\xA7\x8A2\xE6-&\x84+\xB6\x8Beษ\x9A\xB9}
+m\xD8дj\xE6\xC0
+\xBF\xAAl\xD4j?\xA3 \xA7\xCC-\xB9\xF5\xD8\xFCDV\xB6m9\xC0o\xB2gi\x8E$+p,\xCB\xEBL
+\xBF\xCD\xEB \xAE$'\xED-\xE7lH\x8D\xCEI\xCD&\xC3T|\xE5*\x9Ex?\xF4\޳o5\xFF\x92i4:\x89k+\xC3[*h\x9A.5\x9F\x97\xC3\	\xFC\xBF\xC7
+j(s!\xB2\xED\xD6֪\x935-
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestHalfWidth.woff2 (0 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestHalfWidth.woff2	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestHalfWidth.woff2	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,11 @@
+wOF2����������d���������� ����+����������������������������������������������?FFTM`��\x82B
+p|
+��6$ \x84+2*��\x9E\x83qC_\xCARZ\x88J].\xEF\xC5\x8B\xF5\xF1\xF0\xFDطs\xEF{_%\xEEz3<\x9A'\xB1D\xB3\xB4C#t\xBF2\x84&\xD62l(I\xEA\xF7\xAD\xED\xCFY\xC9\xF3\xC8\xDCfͤ\x99H"U2	J\xDE\x91.\xA4\xD5\x96��\x93\xCF>\xEF\xAD\xE94\x81\xE0\xBBt\xBEF7\xD0<L!v\x83\x8CzQ\x80\xA5\xDEB1u\xEF\xFA#SB\xF8![\xFB\xF5\xE7\xB0߼\xE5A\x80\xBE9+\x89@\xA0\xA6X\xD0\xC9w)\xF1'\x8DCg\xA3Cjt��h\xE0\xDE\xCB\xF8��\xF7\xBDs\x8Fz\xF6\xFFY\x8D\xE2��\xD6
+
+\x968OX\xA2YU\xEC\x9D\xFB\xFF/\xFFrZ��\xD1$��\x91H��@\xE8\xB8\x91o@\xFC\xFF/Am\xF41T\x9C\xA0\x80\xA8\xB5\xF6\x83\xFA\xA4\xA7w{\xADAs\xE3\xC3\xF8\xC3\xF1\xBAI1\xF0\xD9}��\xBEN\x9E\xB74ǮWS\xFFy\xFE]\xC7.\xBC\xCAkHoğ\xC6\xE3΄\xE0\xFD\xEFڣȯv\xAF:m\xE3l\x8B\xE2m	\x9D{\x9A\xF7[ ��@M6\x80D\xF2\xA1\xAE\x92L".��\x86\xBE ��)@\xD9D \xB5\C\xA0\xD8\xF2��T#Gh\xC7J\xBCiw\xA9\xA2v\x80\x84\xB0BE:\x8B\xE2\x91,\xAA+k>6\xAD\xC4I\xE0\x8E\xBE\x82\xA1\xBD\x83\x94\xAE\x85\x91\xB2\xA9\x81\x83	\xDCyFlԔBC \x8C\x8D-t\xED\xE0#\xB2\xB8im\xE5 \xC9\xCE\xD8sX\xFB\xB2v\xA5\x9F)8
+G\xE6f%\xB9h7\xB2K88\xC4)m\xEE7\x83\xE65\xDC\xF1f\xE8\x93zgo|\xC8\x9C\x84\xDC:0\xBC\xA3
+\x87\xC3)\xB5_vs#$\xF0_n\xA0\xA8ˁ\xC8\xD6\xEBWS_\xD4\xED������
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestZeroWidth.woff2 (0 => 283279)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestZeroWidth.woff2	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/resources/IcTestZeroWidth.woff2	2021-09-29 23:31:34 UTC (rev 283279)
@@ -0,0 +1,8 @@
+wOF2����������h���������� ��������������������������������������������������?FFTM`��\x82B
+p~
+��6$ \x84+2,U\x9B\xC9��\xBE8\xB0\x9B}\xE6\xE1"\x80{uDm^,j)+3\xB1(\x8E\xE6w\xFF\xED\x97\xDE73\xBB\x9C\xB0L\x99\xFE\xF6T+E*\xBA\xA4��\xAA\xCAZ#\xB7B\xE1\xF1m\\xEB\x8B\xDBƱR_!ZmvS \xF4\xD4\xE6L\xF1C\xF19U[]g\xFF\xCF��\xEF/7\xDDgG7\xE3\xB6&pL\x89L\xB0\xB9\xE8\xCE\xC3\xF2(\x81\xA9ј\x80\x8B\x80\xF1&D^\xBD\xE9E$\xAE!\xE0{??Ͽ9\xFC\xBCx\xAB#��]\xE3
+\x81\xFF\xE2\xA9\xE9e\xEA\xE3IYh\xFCыI-\xD0\xC0\x91\xAB\xFB.\xBB=\xB9\x93\x9B{ss!W ��\xB0P #cB\x80\xAD\xB2\xC0\x84b!\x8A"\x98\xDC<W\xFA\x97\xF3bD\x9D��DB��1\xC9\xC5\xE91b.\xD0DF#\x80\x82\xF5\x88RJ\xA76PNuj\xEDv\xA3sc\xF1\xEB\xE1\xD7S\x8B\xFA\xB4\xEFա\xE8U\xE0Sذ\xF5s\xA3\x98\xAA>\xD5k?\xB6~\xCE\xC9T\xE5S\xC2k`\xD5c:q\xC7@\xB0\xE5\xC1\xB7\xDFm\xFD\xDF\xEC\xE7\xAD\xE6\xA2\xCA\x9At\xD6vNc��P\xE2\x9A\xC5'a\x8E@\x99e\xAD	!\xB0\xD3z\xC0\xA0\xF7@ Y"@ҰG\x80l\xB5WC\xFE
+P3\xF3\xA8\x8Aò(-\xA0a\xBEɠd'\xEC\x87b\xBE>\xD4,4=@\xDD\xFC\xD8��d\xE72"\xAF9\xE1\xF6⠻4\x92\xE7\xDDIt.\x84\xD5��=\x82\xF9h\x87\xBE"\xCB\xD4\xEBmI\xC4X3\xC8#[
+\x97\xE9\xD6\\xC3)\xE1[\x89]\xC1m\xF4\xB4"Q\x9B\x9C\xBCy\xE7\xBBf\xAE\xCECp,(\x86\xF4%^R\xCAĂeFE\xEF\xFF\xD5@\x90\x90%\x81\xCAOQ\xFDY��
\ No newline at end of file

Modified: trunk/Source/WTF/ChangeLog (283278 => 283279)


--- trunk/Source/WTF/ChangeLog	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WTF/ChangeLog	2021-09-29 23:31:34 UTC (rev 283279)
@@ -1,3 +1,13 @@
+2021-09-29  Kiet Ho  <[email protected]>
+
+        Implement the 'ic' unit from CSS Values 4
+        https://bugs.webkit.org/show_bug.cgi?id=204276
+        <rdar://problem/57256127>
+
+        Reviewed by Myles C. Maxfield.
+
+        * wtf/unicode/CharacterNames.h: add CJK water glyph (U+6C34) constant.
+
 2021-09-29  Antti Koivisto  <[email protected]>
 
         [CSS Cascade Layers] Enable by default

Modified: trunk/Source/WTF/wtf/unicode/CharacterNames.h (283278 => 283279)


--- trunk/Source/WTF/wtf/unicode/CharacterNames.h	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WTF/wtf/unicode/CharacterNames.h	2021-09-29 23:31:34 UTC (rev 283279)
@@ -50,6 +50,7 @@
 constexpr UChar bullseye = 0x25CE;
 constexpr UChar byteOrderMark = 0xFEFF;
 constexpr UChar carriageReturn = 0x000D;
+constexpr UChar cjkWater = 0x6C34;
 constexpr UChar combiningEnclosingKeycap = 0x20E3;
 constexpr UChar deleteCharacter = 0x007F;
 constexpr UChar ethiopicPrefaceColon = 0x1366;
@@ -129,6 +130,7 @@
 using WTF::Unicode::bullseye;
 using WTF::Unicode::byteOrderMark;
 using WTF::Unicode::carriageReturn;
+using WTF::Unicode::cjkWater;
 using WTF::Unicode::combiningEnclosingKeycap;
 using WTF::Unicode::deleteCharacter;
 using WTF::Unicode::ethiopicPrefaceColon;

Modified: trunk/Source/WebCore/ChangeLog (283278 => 283279)


--- trunk/Source/WebCore/ChangeLog	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/ChangeLog	2021-09-29 23:31:34 UTC (rev 283279)
@@ -1,3 +1,61 @@
+2021-09-29  Kiet Ho  <[email protected]>
+
+        Implement the 'ic' unit from CSS Values 4
+        https://bugs.webkit.org/show_bug.cgi?id=204276
+        <rdar://problem/57256127>
+
+        Reviewed by Myles C. Maxfield.
+
+        Tests: fast/css/CSSPrimitiveValue-ic.html
+               imported/w3c/web-platform-tests/css/css-values/ic-unit-013.html
+               imported/w3c/web-platform-tests/css/css-values/ic-unit-014.html
+
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::isValidCSSUnitTypeForDoubleConversion):
+        (WebCore::isStringType):
+        (WebCore::CSSPrimitiveValue::cleanup):
+        (WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
+        (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
+        (WebCore::CSSPrimitiveValue::unitTypeString):
+        (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
+        (WebCore::CSSPrimitiveValue::equals const):
+        (WebCore::CSSPrimitiveValue::collectDirectComputationalDependencies const):
+        * css/CSSPrimitiveValue.h:
+        (WebCore::CSSPrimitiveValue::isFontRelativeLength):
+        (WebCore::CSSPrimitiveValue::isLength):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):
+        * css/CSSUnits.cpp:
+        (WebCore::unitCategory):
+        (WebCore::operator<<):
+        * css/CSSUnits.h:
+        * css/DeprecatedCSSOMPrimitiveValue.cpp:
+        (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):
+        * css/calc/CSSCalcCategoryMapping.cpp:
+        (WebCore::calcUnitCategory):
+        (WebCore::calculationCategoryForCombination):
+        (WebCore::hasDoubleValue):
+        * css/parser/CSSParserToken.cpp:
+        (WebCore::cssPrimitiveValueUnitFromTrie):
+        * css/parser/CSSPropertyParserHelpers.cpp:
+        (WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeDimension):
+        * css/parser/SizesAttributeParser.cpp:
+        (WebCore::SizesAttributeParser::computeLength):
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::platformGlyphInit): simplyfy logic, reorder misplaced comment.
+        * platform/graphics/Font.h: remove property `m_zeroGlyph` only used once in
+        WebCore::Font::platformGlyphInit. Remove unused getters adjustedSpaceWidth(),
+        setSpaceWidths(), setSpaceGlyph(), setZeroWidthSpaceGlyph(), zeroGlyph(), setZeroGlyph().
+        (WebCore::Font::spaceWidth const):
+        (WebCore::Font::spaceGlyph const):
+        (WebCore::Font::zeroWidthSpaceGlyph const):
+        (WebCore::Font::isZeroWidthSpaceGlyph const):
+        * platform/graphics/FontMetrics.h:
+        (WebCore::FontMetrics::ideogramWidth const): add metric containing the width of an ideogram
+        glyph in the font. This width is approximated from the width of the CJK water glyph (U+6C34).
+        (WebCore::FontMetrics::setIdeogramWidth):
+        (WebCore::FontMetrics::reset):
+
 2021-09-29  BJ Burg  <[email protected]>
 
         [Cocoa] add _WKInspectorExtension SPI to evaluate script on an extension tab

Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (283278 => 283279)


--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -56,6 +56,7 @@
     case CSSUnitType::CSS_CALC_PERCENTAGE_WITH_LENGTH:
     case CSSUnitType::CSS_CALC_PERCENTAGE_WITH_NUMBER:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_CM:
     case CSSUnitType::CSS_DEG:
     case CSSUnitType::CSS_DIMENSION:
@@ -130,6 +131,7 @@
     case CSSUnitType::CSS_CALC_PERCENTAGE_WITH_LENGTH:
     case CSSUnitType::CSS_CALC_PERCENTAGE_WITH_NUMBER:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_CM:
     case CSSUnitType::CSS_COUNTER:
     case CSSUnitType::CSS_DEG:
@@ -493,6 +495,7 @@
     case CSSUnitType::CSS_EXS:
     case CSSUnitType::CSS_REMS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_PX:
     case CSSUnitType::CSS_CM:
     case CSSUnitType::CSS_MM:
@@ -613,6 +616,9 @@
     case CSSUnitType::CSS_CHS:
         ASSERT(fontMetrics);
         return fontMetrics->zeroWidth() * value;
+    case CSSUnitType::CSS_IC:
+        ASSERT(fontMetrics);
+        return fontMetrics->ideogramWidth() * value;
     case CSSUnitType::CSS_PX:
         return value;
     case CSSUnitType::CSS_CM:
@@ -680,6 +686,7 @@
         break;
 
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
         ASSERT(conversionData.style());
         value = computeUnzoomedNonCalcLengthDouble(primitiveType, value, conversionData.propertyToCompute(), &conversionData.style()->fontMetrics());
         break;
@@ -982,6 +989,7 @@
         case CSSUnitType::CSS_TURN: return "turn";
         case CSSUnitType::CSS_REMS: return "rem";
         case CSSUnitType::CSS_CHS: return "ch";
+        case CSSUnitType::CSS_IC: return "ic";
 
         case CSSUnitType::CSS_UNKNOWN:
         case CSSUnitType::CSS_NUMBER:
@@ -1030,6 +1038,8 @@
         return formatNumberValue("rem");
     case CSSUnitType::CSS_CHS:
         return formatNumberValue("ch");
+    case CSSUnitType::CSS_IC:
+        return formatNumberValue("ic");
     case CSSUnitType::CSS_PX:
         return formatNumberValue("px");
     case CSSUnitType::CSS_CM:
@@ -1174,6 +1184,7 @@
     case CSSUnitType::CSS_EXS:
     case CSSUnitType::CSS_REMS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_PX:
     case CSSUnitType::CSS_CM:
     case CSSUnitType::CSS_DPPX:
@@ -1252,6 +1263,7 @@
     case CSSUnitType::CSS_QUIRKY_EMS:
     case CSSUnitType::CSS_EXS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
         values.add(CSSPropertyFontSize);
         break;
     case CSSUnitType::CSS_LHS:

Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (283278 => 283279)


--- trunk/Source/WebCore/css/CSSPrimitiveValue.h	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h	2021-09-29 23:31:34 UTC (rev 283279)
@@ -282,6 +282,7 @@
         || type == CSSUnitType::CSS_RLHS
         || type == CSSUnitType::CSS_REMS
         || type == CSSUnitType::CSS_CHS
+        || type == CSSUnitType::CSS_IC
         || type == CSSUnitType::CSS_QUIRKY_EMS;
 }
 
@@ -297,6 +298,7 @@
         || type == CSSUnitType::CSS_PC
         || type == CSSUnitType::CSS_REMS
         || type == CSSUnitType::CSS_CHS
+        || type == CSSUnitType::CSS_IC
         || type == CSSUnitType::CSS_Q
         || type == CSSUnitType::CSS_LHS
         || type == CSSUnitType::CSS_RLHS

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (283278 => 283279)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-09-29 23:31:34 UTC (rev 283279)
@@ -4408,6 +4408,7 @@
     case CSSUnitType::CSS_EMS:
     case CSSUnitType::CSS_EXS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_LHS:
         return lengthConversion & (FixedIntegerConversion | FixedFloatConversion);
     default:

Modified: trunk/Source/WebCore/css/CSSUnits.cpp (283278 => 283279)


--- trunk/Source/WebCore/css/CSSUnits.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/CSSUnits.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -39,6 +39,7 @@
     case CSSUnitType::CSS_PT:
     case CSSUnitType::CSS_PC:
     case CSSUnitType::CSS_Q:
+    case CSSUnitType::CSS_IC:
         return CSSUnitCategory::Length;
     case CSSUnitType::CSS_MS:
     case CSSUnitType::CSS_S:
@@ -150,6 +151,7 @@
     case CSSUnitType::CSS_TURN: ts << "turn"; break;
     case CSSUnitType::CSS_REMS: ts << "rems"; break;
     case CSSUnitType::CSS_CHS: ts << "chs"; break;
+    case CSSUnitType::CSS_IC: ts << "ics"; break;
     case CSSUnitType::CSS_COUNTER_NAME: ts << "counter_name"; break;
     case CSSUnitType::CSS_SHAPE: ts << "shape"; break;
     case CSSUnitType::CSS_QUAD: ts << "quad"; break;

Modified: trunk/Source/WebCore/css/CSSUnits.h (283278 => 283279)


--- trunk/Source/WebCore/css/CSSUnits.h	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/CSSUnits.h	2021-09-29 23:31:34 UTC (rev 283279)
@@ -75,6 +75,7 @@
     CSS_TURN,
     CSS_REMS,
     CSS_CHS,
+    CSS_IC,
 
     CSS_COUNTER_NAME,
 

Modified: trunk/Source/WebCore/css/DeprecatedCSSOMPrimitiveValue.cpp (283278 => 283279)


--- trunk/Source/WebCore/css/DeprecatedCSSOMPrimitiveValue.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/DeprecatedCSSOMPrimitiveValue.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -43,6 +43,7 @@
     case CSSUnitType::CSS_CALC_PERCENTAGE_WITH_LENGTH:  return 115;
     case CSSUnitType::CSS_CALC_PERCENTAGE_WITH_NUMBER:  return 114;
     case CSSUnitType::CSS_CHS:                          return 109;
+    case CSSUnitType::CSS_IC:                           return CSS_UNKNOWN;
     case CSSUnitType::CSS_CM:                           return CSS_CM;
     case CSSUnitType::CSS_COUNTER:                      return CSS_COUNTER;
     case CSSUnitType::CSS_COUNTER_NAME:                 return 110;

Modified: trunk/Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp (283278 => 283279)


--- trunk/Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -49,6 +49,7 @@
     case CSSUnitType::CSS_RLHS:
     case CSSUnitType::CSS_REMS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_VW:
     case CSSUnitType::CSS_VH:
     case CSSUnitType::CSS_VMIN:
@@ -104,6 +105,7 @@
     case CSSUnitType::CSS_REMS:
     case CSSUnitType::CSS_RLHS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_VW:
     case CSSUnitType::CSS_VH:
     case CSSUnitType::CSS_VMIN:
@@ -139,6 +141,7 @@
     case CSSUnitType::CSS_EMS:
     case CSSUnitType::CSS_EXS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_REMS:
     case CSSUnitType::CSS_PX:
     case CSSUnitType::CSS_CM:

Modified: trunk/Source/WebCore/css/parser/CSSParserToken.cpp (283278 => 283279)


--- trunk/Source/WebCore/css/parser/CSSParserToken.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/parser/CSSParserToken.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -83,8 +83,12 @@
                 return CSSUnitType::CSS_HZ;
             break;
         case 'i':
-            if (toASCIILower(data[1]) == 'n')
+            switch (toASCIILower(data[1])) {
+            case 'c':
+                return CSSUnitType::CSS_IC;
+            case 'n':
                 return CSSUnitType::CSS_IN;
+            }
             break;
         case 'l':
             if (toASCIILower(data[1]) == 'h' && RuntimeEnabledFeatures::sharedFeatures().lineHeightUnitsEnabled())

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (283278 => 283279)


--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -473,6 +473,7 @@
     case CSSUnitType::CSS_LHS:
     case CSSUnitType::CSS_RLHS:
     case CSSUnitType::CSS_CHS:
+    case CSSUnitType::CSS_IC:
     case CSSUnitType::CSS_EXS:
     case CSSUnitType::CSS_PX:
     case CSSUnitType::CSS_CM:

Modified: trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp (283278 => 283279)


--- trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -57,7 +57,7 @@
     // the pointer to it for the duration of the unit evaluation. This is acceptible because the style always comes from the
     // RenderView, which has its font information hardcoded in resolveForDocument() to be -webkit-standard, whose operations
     // don't require a font selector.
-    if (type == CSSUnitType::CSS_EXS || type == CSSUnitType::CSS_CHS) {
+    if (type == CSSUnitType::CSS_EXS || type == CSSUnitType::CSS_CHS || type == CSSUnitType::CSS_IC) {
         RefPtr<FontSelector> fontSelector = style.fontCascade().fontSelector();
         style.fontCascade().update(nullptr);
         float result = CSSPrimitiveValue::computeNonCalcLengthDouble(conversionData, type, value);

Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (283278 => 283279)


--- trunk/Source/WebCore/platform/graphics/Font.cpp	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp	2021-09-29 23:31:34 UTC (rev 283279)
@@ -139,19 +139,12 @@
     auto* glyphPageZeroWidthSpace = glyphPage(0);
     UChar32 zeroWidthSpaceCharacter = 0;
 #endif
-    auto* glyphPageCharacterZero = glyphPage(GlyphPage::pageNumberForCodePoint('0'));
-    auto* glyphPageSpace = glyphPage(GlyphPage::pageNumberForCodePoint(space));
 
     if (glyphPageZeroWidthSpace)
         m_zeroWidthSpaceGlyph = glyphPageZeroWidthSpace->glyphDataForCharacter(zeroWidthSpaceCharacter).glyph;
 
-    // Nasty hack to determine if we should round or ceil space widths.
-    // If the font is monospace or fake monospace we ceil to ensure that 
-    // every character and the space are the same width. Otherwise we round.
-    if (glyphPageSpace)
-        m_spaceGlyph = glyphPageSpace->glyphDataForCharacter(space).glyph;
-    if (glyphPageCharacterZero)
-        m_zeroGlyph = glyphPageCharacterZero->glyphDataForCharacter('0').glyph;
+    if (auto* page = glyphPage(GlyphPage::pageNumberForCodePoint(space)))
+        m_spaceGlyph = page->glyphDataForCharacter(space).glyph;
 
     // Force the glyph for ZERO WIDTH SPACE to have zero width, unless it is shared with SPACE.
     // Helvetica is an example of a non-zero width ZERO WIDTH SPACE glyph.
@@ -159,14 +152,34 @@
     if (m_zeroWidthSpaceGlyph == m_spaceGlyph)
         m_zeroWidthSpaceGlyph = 0;
 
-    float width = widthForGlyph(m_spaceGlyph);
-    m_spaceWidth = width;
-    m_fontMetrics.setZeroWidth(widthForGlyph(m_zeroGlyph));
+    // widthForGlyph depends on m_zeroWidthSpaceGlyph having the correct value.
+    // Therefore all calls to widthForGlyph must happen after this point.
+
+    Glyph zeroGlyph = { 0 };
+    if (auto* page = glyphPage(GlyphPage::pageNumberForCodePoint('0')))
+        zeroGlyph = page->glyphDataForCharacter('0').glyph;
+    m_fontMetrics.setZeroWidth(widthForGlyph(zeroGlyph));
+
+    // Use the width of the CJK water ideogram (U+6C34) as the
+    // approximated width of ideograms in the font, as mentioned in
+    // https://www.w3.org/TR/css-values-4/#ic. This is currently only used
+    // to support the ic unit. If the width is not available, falls back to
+    // 1em as specified.
+    if (auto* page = glyphPage(GlyphPage::pageNumberForCodePoint(cjkWater))) {
+        auto glyph = page->glyphDataForCharacter(cjkWater).glyph;
+        m_fontMetrics.setIdeogramWidth(widthForGlyph(glyph));
+    } else
+        m_fontMetrics.setIdeogramWidth(platformData().size());
+
+    m_spaceWidth = widthForGlyph(m_spaceGlyph);
     auto amountToAdjustLineGap = std::min(m_fontMetrics.floatLineGap(), 0.0f);
     m_fontMetrics.setLineGap(m_fontMetrics.floatLineGap() - amountToAdjustLineGap);
     m_fontMetrics.setLineSpacing(m_fontMetrics.floatLineSpacing() - amountToAdjustLineGap);
     determinePitch();
-    m_adjustedSpaceWidth = m_treatAsFixedPitch ? ceilf(width) : roundf(width);
+    // Nasty hack to determine if we should round or ceil space widths.
+    // If the font is monospace or fake monospace we ceil to ensure that
+    // every character and the space are the same width. Otherwise we round.
+    m_adjustedSpaceWidth = m_treatAsFixedPitch ? ceilf(m_spaceWidth) : roundf(m_spaceWidth);
 }
 
 Font::~Font()

Modified: trunk/Source/WebCore/platform/graphics/Font.h (283278 => 283279)


--- trunk/Source/WebCore/platform/graphics/Font.h	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/platform/graphics/Font.h	2021-09-29 23:31:34 UTC (rev 283279)
@@ -135,7 +135,6 @@
     bool hasVerticalGlyphs() const { return m_hasVerticalGlyphs; }
     bool isTextOrientationFallback() const { return m_isTextOrientationFallback; }
 
-    FontMetrics& fontMetrics() { return m_fontMetrics; }
     const FontMetrics& fontMetrics() const { return m_fontMetrics; }
     float sizePerUnit() const { return platformData().size() / (fontMetrics().unitsPerEm() ? fontMetrics().unitsPerEm() : 1); }
 
@@ -153,22 +152,12 @@
     Path platformPathForGlyph(Glyph) const;
 
     float spaceWidth() const { return m_spaceWidth; }
-    float adjustedSpaceWidth() const { return m_adjustedSpaceWidth; }
-    void setSpaceWidths(float spaceWidth)
-    {
-        m_spaceWidth = spaceWidth;
-        m_adjustedSpaceWidth = spaceWidth;
-    }
 
     float syntheticBoldOffset() const { return m_syntheticBoldOffset; }
 
     Glyph spaceGlyph() const { return m_spaceGlyph; }
-    void setSpaceGlyph(Glyph spaceGlyph) { m_spaceGlyph = spaceGlyph; }
     Glyph zeroWidthSpaceGlyph() const { return m_zeroWidthSpaceGlyph; }
-    void setZeroWidthSpaceGlyph(Glyph spaceGlyph) { m_zeroWidthSpaceGlyph = spaceGlyph; }
     bool isZeroWidthSpaceGlyph(Glyph glyph) const { return glyph == m_zeroWidthSpaceGlyph && glyph; }
-    Glyph zeroGlyph() const { return m_zeroGlyph; }
-    void setZeroGlyph(Glyph zeroGlyph) { m_zeroGlyph = zeroGlyph; }
 
     GlyphData glyphDataForCharacter(UChar32) const;
     Glyph glyphForCharacter(UChar32) const;
@@ -327,7 +316,6 @@
 #endif
 
     Glyph m_spaceGlyph { 0 };
-    Glyph m_zeroGlyph { 0 };
     Glyph m_zeroWidthSpaceGlyph { 0 };
 
     Origin m_origin; // Whether or not we are custom font loaded via @font-face

Modified: trunk/Source/WebCore/platform/graphics/FontMetrics.h (283278 => 283279)


--- trunk/Source/WebCore/platform/graphics/FontMetrics.h	2021-09-29 23:30:49 UTC (rev 283278)
+++ trunk/Source/WebCore/platform/graphics/FontMetrics.h	2021-09-29 23:31:34 UTC (rev 283279)
@@ -122,6 +122,9 @@
     float zeroWidth() const { return m_zeroWidth; }
     void setZeroWidth(float zeroWidth) { m_zeroWidth = zeroWidth; }
 
+    float ideogramWidth() const { return m_ideogramWidth; }
+    void setIdeogramWidth(float ideogramWidth) { m_ideogramWidth = ideogramWidth; }
+
     float underlinePosition() const { return m_underlinePosition; }
     void setUnderlinePosition(float underlinePosition) { m_underlinePosition = underlinePosition; }
 
@@ -146,6 +149,7 @@
         m_intCapHeight = 0;
         m_xHeight = 0;
         m_zeroWidth = 0;
+        m_ideogramWidth = 0;
         m_underlinePosition = 0;
         m_underlineThickness = 0;
     }
@@ -166,6 +170,7 @@
     int m_intCapHeight { 0 };
 
     float m_zeroWidth { 0 };
+    float m_ideogramWidth { 0 };
     float m_xHeight { 0 };
     float m_underlinePosition { 0 };
     float m_underlineThickness { 0 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to