Title: [290584] trunk
- Revision
- 290584
- Author
- [email protected]
- Date
- 2022-02-28 00:29:03 -0800 (Mon, 28 Feb 2022)
Log Message
[web-animations] web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=237259
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:
Source/WebCore:
We incorrectly threw when processing a null or undefined value when an iterable was provided to setKeyframes().
We now correctly insert an empty keyframe if such a value is provided.
* animation/KeyframeEffect.cpp:
(WebCore::processIterableKeyframes):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (290583 => 290584)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-28 07:07:45 UTC (rev 290583)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-28 08:29:03 UTC (rev 290584)
@@ -1,3 +1,12 @@
+2022-02-28 Antoine Quint <[email protected]>
+
+ [web-animations] web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html is a unique failure
+ https://bugs.webkit.org/show_bug.cgi?id=237259
+
+ Reviewed by Dean Jackson.
+
+ * web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:
+
2022-02-27 Commit Queue <[email protected]>
Unreviewed, reverting r290577.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt (290583 => 290584)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt 2022-02-28 07:07:45 UTC (rev 290583)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt 2022-02-28 08:29:03 UTC (rev 290584)
@@ -63,8 +63,8 @@
PASS Reading from a custom iterator that returns a non-object keyframe and an invalid easing should throw
PASS Reading from a custom iterator that returns a keyframe with a non finite floating-point offset value should throw
PASS Reading from a custom iterator that returns a keyframe with a non finite floating-point offset value and an invalid easing should throw
-FAIL An undefined keyframe returned from a custom iterator should be treated as a default keyframe Type error
-FAIL A null keyframe returned from a custom iterator should be treated as a default keyframe Type error
+PASS An undefined keyframe returned from a custom iterator should be treated as a default keyframe
+PASS A null keyframe returned from a custom iterator should be treated as a default keyframe
PASS A list of values returned from a custom iterator should be ignored
PASS If a custom iterator throws from next(), the exception should be rethrown
PASS Accessing a Symbol.iterator property that throws should rethrow
Modified: trunk/Source/WebCore/ChangeLog (290583 => 290584)
--- trunk/Source/WebCore/ChangeLog 2022-02-28 07:07:45 UTC (rev 290583)
+++ trunk/Source/WebCore/ChangeLog 2022-02-28 08:29:03 UTC (rev 290584)
@@ -1,3 +1,16 @@
+2022-02-28 Antoine Quint <[email protected]>
+
+ [web-animations] web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html is a unique failure
+ https://bugs.webkit.org/show_bug.cgi?id=237259
+
+ Reviewed by Dean Jackson.
+
+ We incorrectly threw when processing a null or undefined value when an iterable was provided to setKeyframes().
+ We now correctly insert an empty keyframe if such a value is provided.
+
+ * animation/KeyframeEffect.cpp:
+ (WebCore::processIterableKeyframes):
+
2022-02-27 Said Abou-Hallawa <[email protected]>
[GPU Process] Deleted unneeded constructors from DisplayList::Recorder classes
Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (290583 => 290584)
--- trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-02-28 07:07:45 UTC (rev 290583)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-02-28 08:29:03 UTC (rev 290584)
@@ -287,13 +287,20 @@
// 1. Let iter be GetIterator(object, method).
forEachInIterable(lexicalGlobalObject, keyframesInput.get(), method, [&parsedKeyframes, &document, &parserContext](VM& vm, JSGlobalObject& lexicalGlobalObject, JSValue nextValue) -> ExceptionOr<void> {
- // Steps 2 through 6 are already implemented by forEachInIterable().
+ // Steps 2 through 5 are already implemented by forEachInIterable().
auto scope = DECLARE_THROW_SCOPE(vm);
- if (!nextValue || !nextValue.isObject()) {
+
+ // 6. If Type(nextItem) is not Undefined, Null or Object, then throw a TypeError and abort these steps.
+ if (!nextValue.isUndefinedOrNull() && !nextValue.isObject()) {
throwException(&lexicalGlobalObject, scope, JSC::Exception::create(vm, createTypeError(&lexicalGlobalObject)));
return { };
}
+ if (!nextValue.isObject()) {
+ parsedKeyframes.append({ });
+ return { };
+ }
+
// 7. Append to processed keyframes the result of running the procedure to process a keyframe-like object passing nextItem
// as the keyframe input and with the allow lists flag set to false.
auto processKeyframeLikeObjectResult = processKeyframeLikeObject(lexicalGlobalObject, document, Strong<JSObject>(vm, nextValue.toObject(&lexicalGlobalObject)), false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes