Modified: trunk/LayoutTests/imported/w3c/ChangeLog (233684 => 233685)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-07-10 16:33:04 UTC (rev 233684)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-07-10 16:35:35 UTC (rev 233685)
@@ -1,5 +1,21 @@
2018-07-09 Antoine Quint <[email protected]>
+ [Web Animations] Make WPT test at animation-model/keyframe-effects/effect-value-overlapping-keyframes.html pass reliably
+ https://bugs.webkit.org/show_bug.cgi?id=186492
+ <rdar://problem/41000150>
+
+ Reviewed by Dean Jackson.
+
+ While we've fixed handling of overlapping keyframes in the fix for webkit.org/b/187498 (r233676), we weren't passing
+ the dedicated WPT test because it assumed absolute accuracy when reading the computed style opacity. This isn't correct
+ per the CSS spec and the WPT test has been updated (see https://github.com/web-platform-tests/wpt/pull/11880). We're
+ reflecting this change in our copy of this test which now passes.
+
+ * web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt:
+ * web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html:
+
+2018-07-09 Antoine Quint <[email protected]>
+
[Web Animations] Correct handle repetition of composite and easing values
https://bugs.webkit.org/show_bug.cgi?id=187498
<rdar://problem/41999183>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt (233684 => 233685)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt 2018-07-10 16:33:04 UTC (rev 233684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes-expected.txt 2018-07-10 16:35:35 UTC (rev 233685)
@@ -1,4 +1,4 @@
-FAIL Overlapping keyframes at 0 and 1 use the appropriate value when the progress is outside the range [0, 1] assert_equals: When progress is zero the last keyframe with offset 0 should be used expected "0.2" but got "0.20000000298023224"
-FAIL Overlapping keyframes between 0 and 1 use the appropriate value on each side of the overlap point assert_equals: Before the overlap point, the first keyframe from the overlap point should be used as interval endpoint expected "0.15" but got "0.15000000596046448"
+PASS Overlapping keyframes at 0 and 1 use the appropriate value when the progress is outside the range [0, 1]
+PASS Overlapping keyframes between 0 and 1 use the appropriate value on each side of the overlap point
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html (233684 => 233685)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html 2018-07-10 16:33:04 UTC (rev 233684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html 2018-07-10 16:35:35 UTC (rev 233685)
@@ -11,6 +11,10 @@
<script>
'use strict';
+function assert_opacity_value(opacity, expected, description) {
+ return assert_approx_equals(parseFloat(opacity), expected, 0.0001, description);
+}
+
test(t => {
const div = createDiv(t);
const anim = div.animate([ { offset: 0, opacity: 0 },
@@ -21,7 +25,7 @@
{ offset: 1, opacity: 1 } ],
{ duration: 1000,
easing: 'cubic-bezier(0.5, -0.5, 0.5, 1.5)' });
- assert_equals(getComputedStyle(div).opacity, '0.2',
+ assert_opacity_value(getComputedStyle(div).opacity, 0.2,
'When progress is zero the last keyframe with offset 0 should'
+ ' be used');
// http://cubic-bezier.com/#.5,-0.5,.5,1.5
@@ -55,15 +59,15 @@
{ offset: 0.5, opacity: 0.7 },
{ offset: 1, opacity: 1 } ], 1000);
anim.currentTime = 250;
- assert_equals(getComputedStyle(div).opacity, '0.15',
+ assert_opacity_value(getComputedStyle(div).opacity, 0.15,
'Before the overlap point, the first keyframe from the'
+ ' overlap point should be used as interval endpoint');
anim.currentTime = 500;
- assert_equals(getComputedStyle(div).opacity, '0.7',
+ assert_opacity_value(getComputedStyle(div).opacity, 0.7,
'At the overlap point, the last keyframe from the'
+ ' overlap point should be used as interval startpoint');
anim.currentTime = 750;
- assert_equals(getComputedStyle(div).opacity, '0.85',
+ assert_opacity_value(getComputedStyle(div).opacity, 0.85,
'After the overlap point, the last keyframe from the'
+ ' overlap point should be used as interval startpoint');
}, 'Overlapping keyframes between 0 and 1 use the appropriate value on each'