Diff
Modified: trunk/LayoutTests/ChangeLog (251661 => 251662)
--- trunk/LayoutTests/ChangeLog 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/ChangeLog 2019-10-28 18:56:19 UTC (rev 251662)
@@ -7,6 +7,23 @@
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt:
The important part of this test is that there are 3 PASSes, not that the console log is consistent.
+2019-10-28 Simon Fraser <simon.fra...@apple.com>
+
+ Add support for the Q unit
+ https://bugs.webkit.org/show_bug.cgi?id=203469
+
+ Reviewed by Antti Koivisto.
+
+ More tests now pass.
+
+ * TestExpectations:
+ * fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt:
+ * fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt:
+ * fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt:
+ * fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt:
+ * platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt:
+ * platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt:
+
2019-10-28 Antoine Quint <grao...@apple.com>
CSS Transitions and CSS Animations properties should treat unitless 0 as an invalid value for times
Modified: trunk/LayoutTests/TestExpectations (251661 => 251662)
--- trunk/LayoutTests/TestExpectations 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/TestExpectations 2019-10-28 18:56:19 UTC (rev 251662)
@@ -3882,8 +3882,6 @@
# wpt css-values failures
webkit.org/b/203320 imported/w3c/web-platform-tests/css/css-values/percentage-rem-low.html [ ImageOnlyFailure ]
-webkit.org/b/203321 imported/w3c/web-platform-tests/css/css-values/q-unit-case-insensitivity-001.html [ ImageOnlyFailure ]
-webkit.org/b/203321 imported/w3c/web-platform-tests/css/css-values/q-unit-case-insensitivity-002.html [ ImageOnlyFailure ]
webkit.org/b/203322 imported/w3c/web-platform-tests/css/css-values/attr-color-invalid-cast.html [ ImageOnlyFailure ]
webkit.org/b/203323 imported/w3c/web-platform-tests/css/css-values/attr-color-valid.html [ ImageOnlyFailure ]
webkit.org/b/203324 imported/w3c/web-platform-tests/css/css-values/attr-in-max.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt (251661 => 251662)
--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -8,10 +8,6 @@
PASS currentSrcFileName(elementId) is "image-set-2x.png"
PASS document.getElementById(elementId).clientWidth is 800
PASS currentSrcFileName(elementId) is "image-set-2x.png"
-PASS document.getElementById(elementId).clientWidth is 800
-PASS currentSrcFileName(elementId) is "image-set-2x.png"
-PASS document.getElementById(elementId).clientWidth is 800
-PASS currentSrcFileName(elementId) is "image-set-2x.png"
PASS document.getElementById(elementId).clientWidth is 56
PASS currentSrcFileName(elementId) is "image-set-2x.png"
PASS document.getElementById(elementId).clientWidth is 800
@@ -21,4 +17,4 @@
PASS successfullyParsed is true
TEST COMPLETE
-
+
Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html (251661 => 251662)
--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html 2019-10-28 18:56:19 UTC (rev 251662)
@@ -7,25 +7,23 @@
var elementId;
addEventListener("load", function() {
- for (var i = 1; i <= 9; ++i) {
+ for (var i = 1; i <= 7; ++i) {
elementId = "crash" + i;
- shouldBe('document.getElementById(elementId).clientWidth', i == 8 ? '56' : '800');
+ shouldBe('document.getElementById(elementId).clientWidth', i == 6 ? '56' : '800');
shouldBe('currentSrcFileName(elementId)', '"image-set-2x.png"');
}
- elementId = "crash10";
+ elementId = "crash8";
shouldBe('document.getElementById(elementId).clientWidth', '1600');
shouldBe('currentSrcFileName(elementId)', '"image-set-4x.png"');
}, false);
</script>
<!-- crash tests -->
-<img id="crash1" sizes="1q" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash2" sizes="1pxllll" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash3" sizes="1dfsdf4534fddd" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash4" sizes="calc()" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash5" sizes="calc(3q)" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash6" sizes="calcssdff()" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash7" sizes="calc(2px+dfmjbsf,,,skidkk)" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash8" sizes="calc(2px+dfmjbsf,,,skidkk) + 2px, 56px" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash9" sizes="1dpi" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
-<img id="crash10" sizes="(max-width: 10px) 1hz, 1600px" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 1600w">
+<img id="crash1" sizes="1pxllll" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
+<img id="crash2" sizes="1dfsdf4534fddd" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
+<img id="crash3" sizes="calc()" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
+<img id="crash4" sizes="calcssdff()" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
+<img id="crash5" sizes="calc(2px+dfmjbsf,,,skidkk)" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
+<img id="crash6" sizes="calc(2px+dfmjbsf,,,skidkk) + 2px, 56px" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
+<img id="crash7" sizes="1dpi" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 16000w">
+<img id="crash8" sizes="(max-width: 10px) 1hz, 1600px" srcset="../../../hidpi/resources/image-set-2x.png 800w, ../resources/image-set-4x.png 1600w">
Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt (251661 => 251662)
--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -17,7 +17,6 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
-FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
@@ -57,6 +56,7 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
+PASS "green-1x1.png" is "green-1x1.png"
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt (251661 => 251662)
--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -17,7 +17,6 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
-FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
@@ -57,6 +56,7 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
+PASS "green-1x1.png" is "green-1x1.png"
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt (251661 => 251662)
--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -17,7 +17,6 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
-FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
@@ -57,6 +56,7 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
+PASS "green-1x1.png" is "green-1x1.png"
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt (251661 => 251662)
--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -17,7 +17,6 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
-FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
@@ -57,6 +56,7 @@
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
PASS "green-1x1.png" is "green-1x1.png"
+PASS "green-1x1.png" is "green-1x1.png"
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
FAIL "green-16x16.png" should be green-1x1.png. Was green-16x16.png.
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (251661 => 251662)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-10-28 18:56:19 UTC (rev 251662)
@@ -1,3 +1,20 @@
+2019-10-28 Simon Fraser <simon.fra...@apple.com>
+
+ Add support for the Q unit
+ https://bugs.webkit.org/show_bug.cgi?id=203469
+
+ Reviewed by Antti Koivisto.
+
+ Add support for the CSS "Q" unit (quater-millimeter):
+ <https://drafts.csswg.org/css-values-4/#Q>
+
+ * web-platform-tests/css/css-values/absolute-length-units-001-expected.txt:
+ * web-platform-tests/css/css-values/calc-serialization-002-expected.txt:
+ * web-platform-tests/css/css-values/minmax-length-computed-expected.txt:
+ * web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt:
+ * web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt:
+ * web-platform-tests/css/css-values/minmax-length-serialize-expected.txt:
+
2019-10-28 Antoine Quint <grao...@apple.com>
CSS Transitions and CSS Animations properties should treat unitless 0 as an invalid value for times
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/absolute-length-units-001-expected.txt (251661 => 251662)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/absolute-length-units-001-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/absolute-length-units-001-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -1,3 +1,3 @@
-FAIL all width and height should be same assert_equals: expected "0px" but got "96px"
+PASS all width and height should be same
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-serialization-002-expected.txt (251661 => 251662)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-serialization-002-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-serialization-002-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -5,7 +5,7 @@
FAIL testing calc(1vh - 7px) assert_equals: expected "calc(-7px + 1vh)" but got "calc(1vh - 7px)"
FAIL testing calc(-8px + 9em + 1vh) assert_equals: expected "calc(9em - 8px + 1vh)" but got "calc((-8px + 9em) + 1vh)"
FAIL testing calc(1pc + 1in + 1vh + 10%) assert_equals: expected "calc(10% + 112px + 1vh)" but got "calc((112px + 1vh) + 10%)"
-FAIL testing calc(25.4q + 1vh + 12%) assert_equals: expected "calc(12% + 24px + 1vh)" but got "calc((112px + 1vh) + 10%)"
+FAIL testing calc(25.4q + 1vh + 12%) assert_equals: expected "calc(12% + 24px + 1vh)" but got "calc((25.4q + 1vh) + 12%)"
FAIL testing calc(1em + 1.27cm + 13% + 3em) assert_equals: expected "calc(13% + 4em + 48px)" but got "calc(((1em + 1.27cm) + 13%) + 3em)"
FAIL testing calc(1vmin - 14%) assert_equals: expected "calc(-14% + 1vmin)" but got "calc(1vmin - 14%)"
FAIL testing calc(15vw + 16vmin - 17vh) assert_equals: expected "calc(-17vh + 16vmin + 15vw)" but got "calc((15vw + 16vmin) - 17vh)"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt (251661 => 251662)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -2,7 +2,7 @@
PASS Property letter-spacing value 'min(1px)' computes to '1px'
PASS Property letter-spacing value 'min(1cm)' computes to '37.7952766418457px'
PASS Property letter-spacing value 'min(1mm)' computes to '3.7795276641845703px'
-FAIL Property letter-spacing value 'min(1Q)' computes to 'normal' assert_true: 'min(1Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'min(1Q)' computes to '0.9448819160461426px'
PASS Property letter-spacing value 'min(1in)' computes to '96px'
PASS Property letter-spacing value 'min(1pc)' computes to '16px'
PASS Property letter-spacing value 'min(1pt)' computes to '1.3333333730697632px'
@@ -17,7 +17,7 @@
PASS Property letter-spacing value 'max(1px)' computes to '1px'
PASS Property letter-spacing value 'max(1cm)' computes to '37.7952766418457px'
PASS Property letter-spacing value 'max(1mm)' computes to '3.7795276641845703px'
-FAIL Property letter-spacing value 'max(1Q)' computes to 'normal' assert_true: 'max(1Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'max(1Q)' computes to '0.9448819160461426px'
PASS Property letter-spacing value 'max(1in)' computes to '96px'
PASS Property letter-spacing value 'max(1pc)' computes to '16px'
PASS Property letter-spacing value 'max(1pt)' computes to '1.3333333730697632px'
@@ -32,7 +32,7 @@
PASS Property letter-spacing value 'min(1px, 2px)' computes to '1px'
PASS Property letter-spacing value 'min(1cm, 2cm)' computes to '37.7952766418457px'
PASS Property letter-spacing value 'min(1mm, 2mm)' computes to '3.7795276641845703px'
-FAIL Property letter-spacing value 'min(1Q, 2Q)' computes to 'normal' assert_true: 'min(1Q, 2Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'min(1Q, 2Q)' computes to '0.9448819160461426px'
PASS Property letter-spacing value 'min(1in, 2in)' computes to '96px'
PASS Property letter-spacing value 'min(1pc, 2pc)' computes to '16px'
PASS Property letter-spacing value 'min(1pt, 2pt)' computes to '1.3333333730697632px'
@@ -47,7 +47,7 @@
PASS Property letter-spacing value 'max(1px, 2px)' computes to '2px'
PASS Property letter-spacing value 'max(1cm, 2cm)' computes to '75.5905532836914px'
PASS Property letter-spacing value 'max(1mm, 2mm)' computes to '7.559055328369141px'
-FAIL Property letter-spacing value 'max(1Q, 2Q)' computes to 'normal' assert_true: 'max(1Q, 2Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'max(1Q, 2Q)' computes to '1.8897638320922852px'
PASS Property letter-spacing value 'max(1in, 2in)' computes to '192px'
PASS Property letter-spacing value 'max(1pc, 2pc)' computes to '32px'
PASS Property letter-spacing value 'max(1pt, 2pt)' computes to '2.6666667461395264px'
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt (251661 => 251662)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -2,7 +2,7 @@
PASS Property margin-left value 'min(1px + 1%)' computes to '5px'
PASS Property margin-left value 'min(1cm + 1%)' computes to '41.78125px'
PASS Property margin-left value 'min(1mm + 1%)' computes to '7.765625px'
-FAIL Property margin-left value 'min(1Q + 1%)' computes to '0px' assert_true: 'min(1Q + 1%)' is a supported value for margin-left. expected true got false
+PASS Property margin-left value 'min(1Q + 1%)' computes to '4.9375px'
PASS Property margin-left value 'min(1in + 1%)' computes to '100px'
PASS Property margin-left value 'min(1pc + 1%)' computes to '20px'
PASS Property margin-left value 'min(1pt + 1%)' computes to '5.328125px'
@@ -17,7 +17,7 @@
PASS Property margin-left value 'max(1px + 1%)' computes to '5px'
PASS Property margin-left value 'max(1cm + 1%)' computes to '41.78125px'
PASS Property margin-left value 'max(1mm + 1%)' computes to '7.765625px'
-FAIL Property margin-left value 'max(1Q + 1%)' computes to '0px' assert_true: 'max(1Q + 1%)' is a supported value for margin-left. expected true got false
+PASS Property margin-left value 'max(1Q + 1%)' computes to '4.9375px'
PASS Property margin-left value 'max(1in + 1%)' computes to '100px'
PASS Property margin-left value 'max(1pc + 1%)' computes to '20px'
PASS Property margin-left value 'max(1pt + 1%)' computes to '5.328125px'
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt (251661 => 251662)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -2,7 +2,7 @@
FAIL e.style['margin-left'] = "min(1px + 1%)" should set the property value assert_equals: serialization should be canonical expected "min(1px + 1%)" but got "calc(min((1px + 1%)))"
FAIL e.style['margin-left'] = "min(1cm + 1%)" should set the property value assert_equals: serialization should be canonical expected "min(1cm + 1%)" but got "calc(min((1cm + 1%)))"
FAIL e.style['margin-left'] = "min(1mm + 1%)" should set the property value assert_equals: serialization should be canonical expected "min(1mm + 1%)" but got "calc(min((1mm + 1%)))"
-FAIL e.style['margin-left'] = "min(1Q + 1%)" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['margin-left'] = "min(1Q + 1%)" should set the property value assert_equals: serialization should be canonical expected "min(1q + 1%)" but got "calc(min((1q + 1%)))"
FAIL e.style['margin-left'] = "min(1in + 1%)" should set the property value assert_equals: serialization should be canonical expected "min(1in + 1%)" but got "calc(min((1in + 1%)))"
FAIL e.style['margin-left'] = "min(1pc + 1%)" should set the property value assert_equals: serialization should be canonical expected "min(1pc + 1%)" but got "calc(min((1pc + 1%)))"
FAIL e.style['margin-left'] = "min(1pt + 1%)" should set the property value assert_equals: serialization should be canonical expected "min(1pt + 1%)" but got "calc(min((1pt + 1%)))"
@@ -17,7 +17,7 @@
FAIL e.style['margin-left'] = "max(1px + 1%)" should set the property value assert_equals: serialization should be canonical expected "max(1px + 1%)" but got "calc(max((1px + 1%)))"
FAIL e.style['margin-left'] = "max(1cm + 1%)" should set the property value assert_equals: serialization should be canonical expected "max(1cm + 1%)" but got "calc(max((1cm + 1%)))"
FAIL e.style['margin-left'] = "max(1mm + 1%)" should set the property value assert_equals: serialization should be canonical expected "max(1mm + 1%)" but got "calc(max((1mm + 1%)))"
-FAIL e.style['margin-left'] = "max(1Q + 1%)" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['margin-left'] = "max(1Q + 1%)" should set the property value assert_equals: serialization should be canonical expected "max(1q + 1%)" but got "calc(max((1q + 1%)))"
FAIL e.style['margin-left'] = "max(1in + 1%)" should set the property value assert_equals: serialization should be canonical expected "max(1in + 1%)" but got "calc(max((1in + 1%)))"
FAIL e.style['margin-left'] = "max(1pc + 1%)" should set the property value assert_equals: serialization should be canonical expected "max(1pc + 1%)" but got "calc(max((1pc + 1%)))"
FAIL e.style['margin-left'] = "max(1pt + 1%)" should set the property value assert_equals: serialization should be canonical expected "max(1pt + 1%)" but got "calc(max((1pt + 1%)))"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-serialize-expected.txt (251661 => 251662)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-serialize-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-serialize-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -2,7 +2,7 @@
FAIL e.style['letter-spacing'] = "min(1px)" should set the property value assert_equals: serialization should be canonical expected "min(1px)" but got "calc(min(1px))"
FAIL e.style['letter-spacing'] = "min(1cm)" should set the property value assert_equals: serialization should be canonical expected "min(1cm)" but got "calc(min(1cm))"
FAIL e.style['letter-spacing'] = "min(1mm)" should set the property value assert_equals: serialization should be canonical expected "min(1mm)" but got "calc(min(1mm))"
-FAIL e.style['letter-spacing'] = "min(1Q)" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['letter-spacing'] = "min(1Q)" should set the property value assert_equals: serialization should be canonical expected "min(1q)" but got "calc(min(1q))"
FAIL e.style['letter-spacing'] = "min(1in)" should set the property value assert_equals: serialization should be canonical expected "min(1in)" but got "calc(min(1in))"
FAIL e.style['letter-spacing'] = "min(1pc)" should set the property value assert_equals: serialization should be canonical expected "min(1pc)" but got "calc(min(1pc))"
FAIL e.style['letter-spacing'] = "min(1pt)" should set the property value assert_equals: serialization should be canonical expected "min(1pt)" but got "calc(min(1pt))"
@@ -17,7 +17,7 @@
FAIL e.style['letter-spacing'] = "max(1px)" should set the property value assert_equals: serialization should be canonical expected "max(1px)" but got "calc(max(1px))"
FAIL e.style['letter-spacing'] = "max(1cm)" should set the property value assert_equals: serialization should be canonical expected "max(1cm)" but got "calc(max(1cm))"
FAIL e.style['letter-spacing'] = "max(1mm)" should set the property value assert_equals: serialization should be canonical expected "max(1mm)" but got "calc(max(1mm))"
-FAIL e.style['letter-spacing'] = "max(1Q)" should set the property value assert_not_equals: property should be set got disallowed value ""
+FAIL e.style['letter-spacing'] = "max(1Q)" should set the property value assert_equals: serialization should be canonical expected "max(1q)" but got "calc(max(1q))"
FAIL e.style['letter-spacing'] = "max(1in)" should set the property value assert_equals: serialization should be canonical expected "max(1in)" but got "calc(max(1in))"
FAIL e.style['letter-spacing'] = "max(1pc)" should set the property value assert_equals: serialization should be canonical expected "max(1pc)" but got "calc(max(1pc))"
FAIL e.style['letter-spacing'] = "max(1pt)" should set the property value assert_equals: serialization should be canonical expected "max(1pt)" but got "calc(max(1pt))"
Modified: trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt (251661 => 251662)
--- trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -2,7 +2,7 @@
PASS Property letter-spacing value 'min(1px)' computes to '1px'
PASS Property letter-spacing value 'min(1cm)' computes to '37.7952766418457px'
PASS Property letter-spacing value 'min(1mm)' computes to '3.7795276641845703px'
-FAIL Property letter-spacing value 'min(1Q)' computes to 'normal' assert_true: 'min(1Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'min(1Q)' computes to '0.9448819160461426px'
PASS Property letter-spacing value 'min(1in)' computes to '96px'
PASS Property letter-spacing value 'min(1pc)' computes to '16px'
PASS Property letter-spacing value 'min(1pt)' computes to '1.3333333730697632px'
@@ -17,7 +17,7 @@
PASS Property letter-spacing value 'max(1px)' computes to '1px'
PASS Property letter-spacing value 'max(1cm)' computes to '37.7952766418457px'
PASS Property letter-spacing value 'max(1mm)' computes to '3.7795276641845703px'
-FAIL Property letter-spacing value 'max(1Q)' computes to 'normal' assert_true: 'max(1Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'max(1Q)' computes to '0.9448819160461426px'
PASS Property letter-spacing value 'max(1in)' computes to '96px'
PASS Property letter-spacing value 'max(1pc)' computes to '16px'
PASS Property letter-spacing value 'max(1pt)' computes to '1.3333333730697632px'
@@ -32,7 +32,7 @@
PASS Property letter-spacing value 'min(1px, 2px)' computes to '1px'
PASS Property letter-spacing value 'min(1cm, 2cm)' computes to '37.7952766418457px'
PASS Property letter-spacing value 'min(1mm, 2mm)' computes to '3.7795276641845703px'
-FAIL Property letter-spacing value 'min(1Q, 2Q)' computes to 'normal' assert_true: 'min(1Q, 2Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'min(1Q, 2Q)' computes to '0.9448819160461426px'
PASS Property letter-spacing value 'min(1in, 2in)' computes to '96px'
PASS Property letter-spacing value 'min(1pc, 2pc)' computes to '16px'
PASS Property letter-spacing value 'min(1pt, 2pt)' computes to '1.3333333730697632px'
@@ -47,7 +47,7 @@
PASS Property letter-spacing value 'max(1px, 2px)' computes to '2px'
PASS Property letter-spacing value 'max(1cm, 2cm)' computes to '75.5905532836914px'
PASS Property letter-spacing value 'max(1mm, 2mm)' computes to '7.559055328369141px'
-FAIL Property letter-spacing value 'max(1Q, 2Q)' computes to 'normal' assert_true: 'max(1Q, 2Q)' is a supported value for letter-spacing. expected true got false
+PASS Property letter-spacing value 'max(1Q, 2Q)' computes to '1.8897638320922852px'
PASS Property letter-spacing value 'max(1in, 2in)' computes to '192px'
PASS Property letter-spacing value 'max(1pc, 2pc)' computes to '32px'
PASS Property letter-spacing value 'max(1pt, 2pt)' computes to '2.6666667461395264px'
Modified: trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt (251661 => 251662)
--- trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt 2019-10-28 18:56:19 UTC (rev 251662)
@@ -2,7 +2,7 @@
PASS Property margin-left value 'min(1px + 1%)' computes to '5px'
PASS Property margin-left value 'min(1cm + 1%)' computes to '41.78125px'
PASS Property margin-left value 'min(1mm + 1%)' computes to '7.765625px'
-FAIL Property margin-left value 'min(1Q + 1%)' computes to '0px' assert_true: 'min(1Q + 1%)' is a supported value for margin-left. expected true got false
+PASS Property margin-left value 'min(1Q + 1%)' computes to '4.9375px'
PASS Property margin-left value 'min(1in + 1%)' computes to '100px'
PASS Property margin-left value 'min(1pc + 1%)' computes to '20px'
PASS Property margin-left value 'min(1pt + 1%)' computes to '5.328125px'
@@ -17,7 +17,7 @@
PASS Property margin-left value 'max(1px + 1%)' computes to '5px'
PASS Property margin-left value 'max(1cm + 1%)' computes to '41.78125px'
PASS Property margin-left value 'max(1mm + 1%)' computes to '7.765625px'
-FAIL Property margin-left value 'max(1Q + 1%)' computes to '0px' assert_true: 'max(1Q + 1%)' is a supported value for margin-left. expected true got false
+PASS Property margin-left value 'max(1Q + 1%)' computes to '4.9375px'
PASS Property margin-left value 'max(1in + 1%)' computes to '100px'
PASS Property margin-left value 'max(1pc + 1%)' computes to '20px'
PASS Property margin-left value 'max(1pt + 1%)' computes to '5.328125px'
Modified: trunk/Source/WebCore/ChangeLog (251661 => 251662)
--- trunk/Source/WebCore/ChangeLog 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/Source/WebCore/ChangeLog 2019-10-28 18:56:19 UTC (rev 251662)
@@ -10,6 +10,39 @@
(WebCore::LegacySchemeRegistry::canDisplayOnlyIfCanRequest):
(WebCore::LegacySchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
+2019-10-28 Simon Fraser <simon.fra...@apple.com>
+
+ Add support for the Q unit
+ https://bugs.webkit.org/show_bug.cgi?id=203469
+
+ Reviewed by Antti Koivisto.
+
+ Add support for the CSS "Q" unit (quater-millimeter):
+ <https://drafts.csswg.org/css-values-4/#Q>
+
+ Tested by web platform tests.
+
+ * css/CSSCalculationValue.cpp:
+ (WebCore::unitCategory):
+ (WebCore::hasDoubleValue):
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::isValidCSSUnitTypeForDoubleConversion):
+ (WebCore::isStringType):
+ (WebCore::CSSPrimitiveValue::unitCategory):
+ (WebCore::CSSPrimitiveValue::cleanup):
+ (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
+ (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
+ (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
+ (WebCore::CSSPrimitiveValue::equals const):
+ * css/CSSPrimitiveValue.h:
+ (WebCore::CSSPrimitiveValue::isLength):
+ * css/parser/CSSParserToken.cpp:
+ (WebCore::cssPrimitiveValueUnitFromTrie):
+ * css/parser/CSSPropertyParserHelpers.cpp:
+ (WebCore::CSSPropertyParserHelpers::consumeLength):
+ * editing/cocoa/HTMLConverter.mm:
+ (floatValueFromPrimitiveValue):
+
2019-10-28 Antoine Quint <grao...@apple.com>
CSS Transitions and CSS Animations properties should treat unitless 0 as an invalid value for times
Modified: trunk/Source/WebCore/css/CSSCalculationValue.cpp (251661 => 251662)
--- trunk/Source/WebCore/css/CSSCalculationValue.cpp 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/Source/WebCore/css/CSSCalculationValue.cpp 2019-10-28 18:56:19 UTC (rev 251662)
@@ -65,6 +65,7 @@
case CSSPrimitiveValue::CSS_IN:
case CSSPrimitiveValue::CSS_PT:
case CSSPrimitiveValue::CSS_PC:
+ case CSSPrimitiveValue::CSS_Q:
case CSSPrimitiveValue::CSS_REMS:
case CSSPrimitiveValue::CSS_CHS:
case CSSPrimitiveValue::CSS_VW:
@@ -93,7 +94,6 @@
static bool hasDoubleValue(CSSPrimitiveValue::UnitType type)
{
switch (type) {
- case CSSPrimitiveValue::CSS_FR:
case CSSPrimitiveValue::CSS_NUMBER:
case CSSPrimitiveValue::CSS_PERCENTAGE:
case CSSPrimitiveValue::CSS_EMS:
@@ -122,6 +122,8 @@
case CSSPrimitiveValue::CSS_DPPX:
case CSSPrimitiveValue::CSS_DPI:
case CSSPrimitiveValue::CSS_DPCM:
+ case CSSPrimitiveValue::CSS_FR:
+ case CSSPrimitiveValue::CSS_Q:
return true;
case CSSPrimitiveValue::CSS_UNKNOWN:
case CSSPrimitiveValue::CSS_STRING:
Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (251661 => 251662)
--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2019-10-28 18:56:19 UTC (rev 251662)
@@ -58,7 +58,6 @@
case CSSPrimitiveValue::CSS_DEG:
case CSSPrimitiveValue::CSS_DIMENSION:
case CSSPrimitiveValue::CSS_EMS:
- case CSSPrimitiveValue::CSS_QUIRKY_EMS:
case CSSPrimitiveValue::CSS_EXS:
case CSSPrimitiveValue::CSS_FR:
case CSSPrimitiveValue::CSS_GRAD:
@@ -72,6 +71,8 @@
case CSSPrimitiveValue::CSS_PERCENTAGE:
case CSSPrimitiveValue::CSS_PT:
case CSSPrimitiveValue::CSS_PX:
+ case CSSPrimitiveValue::CSS_Q:
+ case CSSPrimitiveValue::CSS_QUIRKY_EMS:
case CSSPrimitiveValue::CSS_RAD:
case CSSPrimitiveValue::CSS_REMS:
case CSSPrimitiveValue::CSS_S:
@@ -134,7 +135,6 @@
case CSSPrimitiveValue::CSS_DPI:
case CSSPrimitiveValue::CSS_DPPX:
case CSSPrimitiveValue::CSS_EMS:
- case CSSPrimitiveValue::CSS_QUIRKY_EMS:
case CSSPrimitiveValue::CSS_EXS:
case CSSPrimitiveValue::CSS_FONT_FAMILY:
case CSSPrimitiveValue::CSS_FR:
@@ -152,7 +152,9 @@
case CSSPrimitiveValue::CSS_PROPERTY_ID:
case CSSPrimitiveValue::CSS_PT:
case CSSPrimitiveValue::CSS_PX:
+ case CSSPrimitiveValue::CSS_Q:
case CSSPrimitiveValue::CSS_QUAD:
+ case CSSPrimitiveValue::CSS_QUIRKY_EMS:
case CSSPrimitiveValue::CSS_RAD:
case CSSPrimitiveValue::CSS_RECT:
case CSSPrimitiveValue::CSS_REMS:
@@ -191,6 +193,7 @@
case CSS_IN:
case CSS_PT:
case CSS_PC:
+ case CSS_Q:
return ULength;
case CSS_MS:
case CSS_S:
@@ -525,6 +528,7 @@
case CSS_DPI:
case CSS_DPCM:
case CSS_FR:
+ case CSS_Q:
case CSS_IDENT:
case CSS_UNKNOWN:
case CSS_UNICODE_RANGE:
@@ -601,6 +605,10 @@
return computeNonCalcLengthDouble(conversionData, static_cast<UnitType>(primitiveType()), m_value.num);
}
+static constexpr double mmPerInch = 25.4;
+static constexpr double cmPerInch = 2.54;
+static constexpr double QPerInch = 25.4 * 4.0;
+
double CSSPrimitiveValue::computeNonCalcLengthDouble(const CSSToLengthConversionData& conversionData, UnitType primitiveType, double value)
{
double factor;
@@ -636,11 +644,14 @@
factor = 1.0;
break;
case CSS_CM:
- factor = cssPixelsPerInch / 2.54; // (2.54 cm/in)
+ factor = cssPixelsPerInch / cmPerInch;
break;
case CSS_MM:
- factor = cssPixelsPerInch / 25.4;
+ factor = cssPixelsPerInch / mmPerInch;
break;
+ case CSS_Q:
+ factor = cssPixelsPerInch / QPerInch;
+ break;
case CSS_IN:
factor = cssPixelsPerInch;
break;
@@ -709,13 +720,13 @@
case CSS_HZ:
break;
case CSS_CM:
- factor = cssPixelsPerInch / 2.54; // (2.54 cm/in)
+ factor = cssPixelsPerInch / cmPerInch;
break;
case CSS_DPCM:
- factor = 2.54 / cssPixelsPerInch; // (2.54 cm/in)
+ factor = cmPerInch / cssPixelsPerInch; // (2.54 cm/in)
break;
case CSS_MM:
- factor = cssPixelsPerInch / 25.4;
+ factor = cssPixelsPerInch / mmPerInch;
break;
case CSS_IN:
factor = cssPixelsPerInch;
@@ -969,6 +980,8 @@
return formatNumberValue("turn");
case CSS_FR:
return formatNumberValue("fr");
+ case CSS_Q:
+ return formatNumberValue("q");
case CSS_DIMENSION:
// FIXME: We currently don't handle CSS_DIMENSION properly as we don't store
// the actual dimension, just the numeric value as a string.
@@ -1090,6 +1103,7 @@
case CSS_VH:
case CSS_VMIN:
case CSS_FR:
+ case CSS_Q:
return m_value.num == other.m_value.num;
case CSS_PROPERTY_ID:
return propertyName(m_value.propertyID) == propertyName(other.m_value.propertyID);
Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (251661 => 251662)
--- trunk/Source/WebCore/css/CSSPrimitiveValue.h 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h 2019-10-28 18:56:19 UTC (rev 251662)
@@ -110,6 +110,7 @@
CSS_DPI = 31,
CSS_DPCM = 32,
CSS_FR = 33,
+ CSS_Q = 34,
CSS_PAIR = 100, // We envision this being exposed as a means of getting computed style values for pairs (border-spacing/radius, background-position, etc.)
CSS_UNICODE_RANGE = 102,
@@ -359,6 +360,7 @@
return (type >= CSS_EMS && type <= CSS_PC)
|| type == CSS_REMS
|| type == CSS_CHS
+ || type == CSS_Q
|| isViewportPercentageLength(type)
|| type == CSS_QUIRKY_EMS;
}
Modified: trunk/Source/WebCore/css/parser/CSSParserToken.cpp (251661 => 251662)
--- trunk/Source/WebCore/css/parser/CSSParserToken.cpp 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/Source/WebCore/css/parser/CSSParserToken.cpp 2019-10-28 18:56:19 UTC (rev 251662)
@@ -47,6 +47,8 @@
switch (length) {
case 1:
switch (toASCIILower(data[0])) {
+ case 'q':
+ return CSSPrimitiveValue::UnitType::CSS_Q;
case 's':
return CSSPrimitiveValue::UnitType::CSS_S;
}
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (251661 => 251662)
--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp 2019-10-28 18:56:19 UTC (rev 251662)
@@ -296,6 +296,7 @@
case CSSPrimitiveValue::UnitType::CSS_VH:
case CSSPrimitiveValue::UnitType::CSS_VMIN:
case CSSPrimitiveValue::UnitType::CSS_VMAX:
+ case CSSPrimitiveValue::UnitType::CSS_Q:
break;
default:
return nullptr;
Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (251661 => 251662)
--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2019-10-28 18:43:04 UTC (rev 251661)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2019-10-28 18:56:19 UTC (rev 251662)
@@ -722,6 +722,9 @@
case CSSPrimitiveValue::CSS_MM:
result = 96 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_PC) / 25.4;
return true;
+ case CSSPrimitiveValue::CSS_Q:
+ result = 96 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_PC) / (25.4 * 4.0);
+ return true;
case CSSPrimitiveValue::CSS_IN:
result = 96 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_IN);
return true;