Diff
Modified: trunk/LayoutTests/ChangeLog (289996 => 289997)
--- trunk/LayoutTests/ChangeLog 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/ChangeLog 2022-02-17 06:05:05 UTC (rev 289997)
@@ -1,3 +1,20 @@
+2022-02-16 Joonghun Park <jh718.p...@samsung.com>
+
+ Change the canonical unit for time category from ms to s.
+ https://bugs.webkit.org/show_bug.cgi?id=236631
+
+ Reviewed by Darin Adler.
+
+ According to the spec, https://drafts.csswg.org/css-values-4/#time,
+ the canonical unit for <time> is Seconds.
+
+ * fast/css/calc-with-angle-time-frequency-expected.txt:
+ * fast/css/calc-with-angle-time-frequency.html:
+ * fast/css/getFloatValueForUnit-expected.txt:
+ * fast/css/getFloatValueForUnit.html:
+ * fast/css/transition-delay-calculated-value-expected.txt:
+ * fast/css/transition-delay-calculated-value.html:
+
2022-02-16 Alan Bujtas <za...@apple.com>
REGRESSION(r285885) Unable to exit Trip Details in Amtrak app
Modified: trunk/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt (289996 => 289997)
--- trunk/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt 2022-02-17 06:05:05 UTC (rev 289997)
@@ -25,22 +25,22 @@
PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(1080deg))"
PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(1080deg)"
testDiv.style['transition-delay'] = 'calc(300ms/2)'
-PASS testDiv.style['transition-delay'] is "calc(150ms)"
+PASS testDiv.style['transition-delay'] is "calc(0.15s)"
PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "0.15s"
testDiv.style['transition-delay'] = 'calc(300s/2)'
-PASS testDiv.style['transition-delay'] is "calc(150000ms)"
+PASS testDiv.style['transition-delay'] is "calc(150s)"
PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "150s"
testDiv.style['transition-delay'] = 'calc(10s + 100ms)'
-PASS testDiv.style['transition-delay'] is "calc(10100ms)"
+PASS testDiv.style['transition-delay'] is "calc(10.1s)"
PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "10.1s"
testDiv.style['transition-delay'] = 'calc(100ms + 10s)'
-PASS testDiv.style['transition-delay'] is "calc(10100ms)"
+PASS testDiv.style['transition-delay'] is "calc(10.1s)"
PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "10.1s"
testDiv.style['transition-delay'] = 'calc(4s + 1s)'
-PASS testDiv.style['transition-delay'] is "calc(5000ms)"
+PASS testDiv.style['transition-delay'] is "calc(5s)"
PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "5s"
testDiv.style['transition-delay'] = 'calc(4ms + 1ms)'
-PASS testDiv.style['transition-delay'] is "calc(5ms)"
+PASS testDiv.style['transition-delay'] is "calc(0.005s)"
PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "0.005s"
testDiv.style['width'] = 'calc(300Hz/2)'
PASS testDiv.style['width'] is ""
Modified: trunk/LayoutTests/fast/css/calc-with-angle-time-frequency.html (289996 => 289997)
--- trunk/LayoutTests/fast/css/calc-with-angle-time-frequency.html 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/fast/css/calc-with-angle-time-frequency.html 2022-02-17 06:05:05 UTC (rev 289997)
@@ -39,27 +39,27 @@
// Time units.
evalAndLog("testDiv.style['transition-delay'] = 'calc(300ms/2)'");
- shouldBeEqualToString("testDiv.style['transition-delay']", "calc(150ms)");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(0.15s)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "0.15s");
evalAndLog("testDiv.style['transition-delay'] = 'calc(300s/2)'");
- shouldBeEqualToString("testDiv.style['transition-delay']", "calc(150000ms)");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(150s)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "150s");
evalAndLog("testDiv.style['transition-delay'] = 'calc(10s + 100ms)'");
- shouldBeEqualToString("testDiv.style['transition-delay']", "calc(10100ms)");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(10.1s)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "10.1s");
evalAndLog("testDiv.style['transition-delay'] = 'calc(100ms + 10s)'");
- shouldBeEqualToString("testDiv.style['transition-delay']", "calc(10100ms)");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(10.1s)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "10.1s");
evalAndLog("testDiv.style['transition-delay'] = 'calc(4s + 1s)'");
- shouldBeEqualToString("testDiv.style['transition-delay']", "calc(5000ms)");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(5s)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "5s");
evalAndLog("testDiv.style['transition-delay'] = 'calc(4ms + 1ms)'");
- shouldBeEqualToString("testDiv.style['transition-delay']", "calc(5ms)");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(0.005s)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "0.005s");
// Frequency units.
Modified: trunk/LayoutTests/fast/css/getFloatValueForUnit-expected.txt (289996 => 289997)
--- trunk/LayoutTests/fast/css/getFloatValueForUnit-expected.txt 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/fast/css/getFloatValueForUnit-expected.txt 2022-02-17 06:05:05 UTC (rev 289997)
@@ -12,7 +12,7 @@
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_NUMBER) is 13.333333
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_MS) is 200
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_S) is 0.2
-PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_NUMBER) is 200
+PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_NUMBER) is 0.2
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_PERCENTAGE) threw exception InvalidAccessError: The object does not support the operation or argument..
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_MS) threw exception InvalidAccessError: The object does not support the operation or argument..
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_HZ) threw exception InvalidAccessError: The object does not support the operation or argument..
Modified: trunk/LayoutTests/fast/css/getFloatValueForUnit.html (289996 => 289997)
--- trunk/LayoutTests/fast/css/getFloatValueForUnit.html 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/fast/css/getFloatValueForUnit.html 2022-02-17 06:05:05 UTC (rev 289997)
@@ -29,7 +29,7 @@
shouldBe("getFloatValue('font-size', CSSPrimitiveValue.CSS_NUMBER)", "13.333333");
shouldBe("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_MS)", "200");
shouldBe("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_S)", "0.2");
-shouldBe("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_NUMBER)", "200");
+shouldBe("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_NUMBER)", "0.2");
shouldThrowErrorName("getFloatValue('font-size', CSSPrimitiveValue.CSS_PERCENTAGE)", "InvalidAccessError");
shouldThrowErrorName("getFloatValue('font-size', CSSPrimitiveValue.CSS_MS)", "InvalidAccessError");
Modified: trunk/LayoutTests/fast/css/transition-delay-calculated-value-expected.txt (289996 => 289997)
--- trunk/LayoutTests/fast/css/transition-delay-calculated-value-expected.txt 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/fast/css/transition-delay-calculated-value-expected.txt 2022-02-17 06:05:05 UTC (rev 289997)
@@ -5,7 +5,7 @@
PASS testDiv.style['transition-delay'] is ""
testDiv.style['transition-delay'] = 'calc(300ms/2)'
-PASS testDiv.style['transition-delay'] is "calc(150ms)"
+PASS testDiv.style['transition-delay'] is "calc(0.15s)"
PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "0.15s"
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/css/transition-delay-calculated-value.html (289996 => 289997)
--- trunk/LayoutTests/fast/css/transition-delay-calculated-value.html 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/fast/css/transition-delay-calculated-value.html 2022-02-17 06:05:05 UTC (rev 289997)
@@ -9,7 +9,7 @@
shouldBeEmptyString("testDiv.style['transition-delay']");
evalAndLog("testDiv.style['transition-delay'] = 'calc(300ms/2)'");
-shouldBeEqualToString("testDiv.style['transition-delay']", "calc(150ms)");
+shouldBeEqualToString("testDiv.style['transition-delay']", "calc(0.15s)");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "0.15s");
</script>
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289996 => 289997)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-17 06:05:05 UTC (rev 289997)
@@ -1,3 +1,15 @@
+2022-02-16 Joonghun Park <jh718.p...@samsung.com>
+
+ Change the canonical unit for time category from ms to s.
+ https://bugs.webkit.org/show_bug.cgi?id=236631
+
+ Reviewed by Darin Adler.
+
+ According to the spec, https://drafts.csswg.org/css-values-4/#time,
+ the canonical unit for <time> is Seconds.
+
+ * web-platform-tests/css/css-values/minmax-time-serialize-expected.txt:
+
2022-02-16 Jon Lee <jon...@apple.com>
Add fuzzy data for test failures seen on the iOS GPU Process bot
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-time-serialize-expected.txt (289996 => 289997)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-time-serialize-expected.txt 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-time-serialize-expected.txt 2022-02-17 06:05:05 UTC (rev 289997)
@@ -1,24 +1,24 @@
-FAIL 'min(1ms)' as a specified value should serialize as 'calc(0.001s)'. assert_equals: 'calc(0.001s)' should round-trip exactly in specified values. expected "calc(0.001s)" but got "calc(1ms)"
+FAIL 'min(1ms)' as a specified value should serialize as 'calc(0.001s)'. assert_equals: 'min(1ms)' and 'calc(0.001s)' should serialize the same in specified values. expected "calc(0.001s)" but got "min(0.001s)"
PASS 'min(1ms)' as a computed value should serialize as '0.001s'.
-FAIL 'min(1s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'calc(1s)' should round-trip exactly in specified values. expected "calc(1s)" but got "calc(1000ms)"
+FAIL 'min(1s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'min(1s)' and 'calc(1s)' should serialize the same in specified values. expected "calc(1s)" but got "min(1s)"
PASS 'min(1s)' as a computed value should serialize as '1s'.
-FAIL 'max(1ms)' as a specified value should serialize as 'calc(0.001s)'. assert_equals: 'calc(0.001s)' should round-trip exactly in specified values. expected "calc(0.001s)" but got "calc(1ms)"
+FAIL 'max(1ms)' as a specified value should serialize as 'calc(0.001s)'. assert_equals: 'max(1ms)' and 'calc(0.001s)' should serialize the same in specified values. expected "calc(0.001s)" but got "max(0.001s)"
PASS 'max(1ms)' as a computed value should serialize as '0.001s'.
-FAIL 'max(1s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'calc(1s)' should round-trip exactly in specified values. expected "calc(1s)" but got "calc(1000ms)"
+FAIL 'max(1s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'max(1s)' and 'calc(1s)' should serialize the same in specified values. expected "calc(1s)" but got "max(1s)"
PASS 'max(1s)' as a computed value should serialize as '1s'.
-FAIL 'min(1s, 2s, 3s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'calc(1s)' should round-trip exactly in specified values. expected "calc(1s)" but got "calc(1000ms)"
+FAIL 'min(1s, 2s, 3s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'min(1s, 2s, 3s)' and 'calc(1s)' should serialize the same in specified values. expected "calc(1s)" but got "min(1s)"
PASS 'min(1s, 2s, 3s)' as a computed value should serialize as '1s'.
-FAIL 'min(3s, 2s, 1s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'calc(1s)' should round-trip exactly in specified values. expected "calc(1s)" but got "calc(1000ms)"
+FAIL 'min(3s, 2s, 1s)' as a specified value should serialize as 'calc(1s)'. assert_equals: 'min(3s, 2s, 1s)' and 'calc(1s)' should serialize the same in specified values. expected "calc(1s)" but got "min(1s)"
PASS 'min(3s, 2s, 1s)' as a computed value should serialize as '1s'.
-FAIL 'max(1s, 2s, 3s)' as a specified value should serialize as 'calc(3s)'. assert_equals: 'calc(3s)' should round-trip exactly in specified values. expected "calc(3s)" but got "calc(3000ms)"
+FAIL 'max(1s, 2s, 3s)' as a specified value should serialize as 'calc(3s)'. assert_equals: 'max(1s, 2s, 3s)' and 'calc(3s)' should serialize the same in specified values. expected "calc(3s)" but got "max(3s)"
PASS 'max(1s, 2s, 3s)' as a computed value should serialize as '3s'.
-FAIL 'max(3s, 2s, 1s)' as a specified value should serialize as 'calc(3s)'. assert_equals: 'calc(3s)' should round-trip exactly in specified values. expected "calc(3s)" but got "calc(3000ms)"
+FAIL 'max(3s, 2s, 1s)' as a specified value should serialize as 'calc(3s)'. assert_equals: 'max(3s, 2s, 1s)' and 'calc(3s)' should serialize the same in specified values. expected "calc(3s)" but got "max(3s)"
PASS 'max(3s, 2s, 1s)' as a computed value should serialize as '3s'.
-FAIL 'min(900ms, 1s)' as a specified value should serialize as 'calc(0.9s)'. assert_equals: 'calc(0.9s)' should round-trip exactly in specified values. expected "calc(0.9s)" but got "calc(900ms)"
+FAIL 'min(900ms, 1s)' as a specified value should serialize as 'calc(0.9s)'. assert_equals: 'min(900ms, 1s)' and 'calc(0.9s)' should serialize the same in specified values. expected "calc(0.9s)" but got "min(0.9s)"
PASS 'min(900ms, 1s)' as a computed value should serialize as '0.9s'.
-FAIL 'max(1100ms, 1s)' as a specified value should serialize as 'calc(1.1s)'. assert_equals: 'calc(1.1s)' should round-trip exactly in specified values. expected "calc(1.1s)" but got "calc(1100ms)"
+FAIL 'max(1100ms, 1s)' as a specified value should serialize as 'calc(1.1s)'. assert_equals: 'max(1100ms, 1s)' and 'calc(1.1s)' should serialize the same in specified values. expected "calc(1.1s)" but got "max(1.1s)"
PASS 'max(1100ms, 1s)' as a computed value should serialize as '1.1s'.
-FAIL 'calc(min(1s, 2s) + max(3s, 4s) + 10s)' as a specified value should serialize as 'calc(15s)'. assert_equals: 'calc(15s)' should round-trip exactly in specified values. expected "calc(15s)" but got "calc(15000ms)"
+PASS 'calc(min(1s, 2s) + max(3s, 4s) + 10s)' as a specified value should serialize as 'calc(15s)'.
PASS 'calc(min(1s, 2s) + max(3s, 4s) + 10s)' as a computed value should serialize as '15s'.
Modified: trunk/Source/WebCore/ChangeLog (289996 => 289997)
--- trunk/Source/WebCore/ChangeLog 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/Source/WebCore/ChangeLog 2022-02-17 06:05:05 UTC (rev 289997)
@@ -1,3 +1,20 @@
+2022-02-16 Joonghun Park <jh718.p...@samsung.com>
+
+ Change the canonical unit for time category from ms to s.
+ https://bugs.webkit.org/show_bug.cgi?id=236631
+
+ Reviewed by Darin Adler.
+
+ According to the spec, https://drafts.csswg.org/css-values-4/#time,
+ the canonical unit for <time> is Seconds.
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
+ * css/CSSUnits.cpp:
+ (WebCore::canonicalUnitTypeForCategory):
+ * css/calc/CSSCalcCategoryMapping.cpp:
+ (WebCore::canonicalUnitTypeForCalculationCategory):
+
2022-02-16 Alan Bujtas <za...@apple.com>
REGRESSION(r285885) Unable to exit Trip Details in Amtrak app
Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (289996 => 289997)
--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2022-02-17 06:05:05 UTC (rev 289997)
@@ -970,7 +970,7 @@
// These are "canonical" units in their respective categories.
case CSSUnitType::CSS_PX:
case CSSUnitType::CSS_DEG:
- case CSSUnitType::CSS_MS:
+ case CSSUnitType::CSS_S:
case CSSUnitType::CSS_HZ:
case CSSUnitType::CSS_DPPX:
return 1.0;
@@ -1012,7 +1012,8 @@
case CSSUnitType::CSS_TURN:
return degreesPerTurnDouble;
- case CSSUnitType::CSS_S:
+ case CSSUnitType::CSS_MS:
+ return 0.001;
case CSSUnitType::CSS_KHZ:
return 1000;
Modified: trunk/Source/WebCore/css/CSSUnits.cpp (289996 => 289997)
--- trunk/Source/WebCore/css/CSSUnits.cpp 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/Source/WebCore/css/CSSUnits.cpp 2022-02-17 06:05:05 UTC (rev 289997)
@@ -127,7 +127,7 @@
case CSSUnitCategory::Percent:
return CSSUnitType::CSS_UNKNOWN; // Cannot convert between numbers and percent.
case CSSUnitCategory::Time:
- return CSSUnitType::CSS_MS;
+ return CSSUnitType::CSS_S;
case CSSUnitCategory::Angle:
return CSSUnitType::CSS_DEG;
case CSSUnitCategory::Frequency:
Modified: trunk/Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp (289996 => 289997)
--- trunk/Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp 2022-02-17 04:25:14 UTC (rev 289996)
+++ trunk/Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp 2022-02-17 06:05:05 UTC (rev 289997)
@@ -164,7 +164,7 @@
case CalculationCategory::Length: return CSSUnitType::CSS_PX;
case CalculationCategory::Percent: return CSSUnitType::CSS_PERCENTAGE;
case CalculationCategory::Angle: return CSSUnitType::CSS_DEG;
- case CalculationCategory::Time: return CSSUnitType::CSS_MS;
+ case CalculationCategory::Time: return CSSUnitType::CSS_S;
case CalculationCategory::Frequency: return CSSUnitType::CSS_HZ;
case CalculationCategory::Other:
case CalculationCategory::PercentNumber: