Skip to content
Permalink
Browse files
Fix mutating keyframes via CSSOM to not set disabled properties
https://bugs.webkit.org/show_bug.cgi?id=244417

Reviewed by Tim Nguyen.

* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::processKeyframeLikeObject):

Canonical link: https://commits.webkit.org/254998@main
  • Loading branch information
gsnedders committed Sep 29, 2022
1 parent d3e19e6 commit 3021ad87ed21843453969f727b57fc88fa54dd3d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
@@ -2094,10 +2094,6 @@ webkit.org/b/244372 imported/w3c/web-platform-tests/intersection-observer/target

webkit.org/b/244404 js/dom/modules/missing-exception-check-for-import.html [ Crash ]

webkit.org/b/244417 imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002.html [ Crash ]
webkit.org/b/244417 imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002.html [ Crash ]
webkit.org/b/244417 imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002.html [ Crash ]

webkit.org/b/244636 [ Monterey Debug ] media/modern-media-controls/pip-support/pip-support-click.html [ Pass Crash ]

webkit.org/b/244637 imported/w3c/web-platform-tests/content-security-policy/generic/304-response-should-update-csp.sub.html [ Pass Failure ]
@@ -140,9 +140,6 @@ PASS quotes: ""“" "”" "‘" "’"" onto ""‘" "’" "“" "”""
PASS resize (type: discrete) has testAccumulation function
PASS resize: "horizontal" onto "both"
PASS resize: "both" onto "horizontal"
PASS scroll-behavior (type: discrete) has testAccumulation function
FAIL scroll-behavior: "smooth" onto "auto" undefined is not an object (evaluating 'getComputedStyle(target, pseudoType)[idlName].toLowerCase')
FAIL scroll-behavior: "auto" onto "smooth" undefined is not an object (evaluating 'getComputedStyle(target, pseudoType)[idlName].toLowerCase')
PASS shape-outside (type: discrete) has testAccumulation function
PASS shape-outside: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
PASS shape-outside: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
@@ -140,9 +140,6 @@ PASS quotes: ""“" "”" "‘" "’"" onto ""‘" "’" "“" "”""
PASS resize (type: discrete) has testAddition function
PASS resize: "horizontal" onto "both"
PASS resize: "both" onto "horizontal"
PASS scroll-behavior (type: discrete) has testAddition function
FAIL scroll-behavior: "smooth" onto "auto" undefined is not an object (evaluating 'getComputedStyle(target, pseudoType)[idlName].toLowerCase')
FAIL scroll-behavior: "auto" onto "smooth" undefined is not an object (evaluating 'getComputedStyle(target, pseudoType)[idlName].toLowerCase')
PASS shape-outside (type: discrete) has testAddition function
PASS shape-outside: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
PASS shape-outside: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
@@ -169,10 +169,6 @@ PASS resize (type: discrete) has testInterpolation function
PASS resize uses discrete animation when animating between "both" and "horizontal" with linear easing
PASS resize uses discrete animation when animating between "both" and "horizontal" with effect easing
PASS resize uses discrete animation when animating between "both" and "horizontal" with keyframe easing
PASS scroll-behavior (type: discrete) has testInterpolation function
FAIL scroll-behavior uses discrete animation when animating between "auto" and "smooth" with linear easing undefined is not an object (evaluating 'getComputedStyle(target, pseudoType)[idlName].toLowerCase')
FAIL scroll-behavior uses discrete animation when animating between "auto" and "smooth" with effect easing undefined is not an object (evaluating 'getComputedStyle(target, pseudoType)[idlName].toLowerCase')
FAIL scroll-behavior uses discrete animation when animating between "auto" and "smooth" with keyframe easing undefined is not an object (evaluating 'getComputedStyle(target, pseudoType)[idlName].toLowerCase')
PASS shape-outside (type: discrete) has testInterpolation function
PASS shape-outside uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with linear easing
PASS shape-outside uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with effect easing
@@ -233,6 +233,8 @@ static inline ExceptionOr<KeyframeEffect::KeyframeLikeObject> processKeyframeLik
Vector<JSC::Identifier> animationProperties;
for (auto& inputProperty : inputProperties) {
auto cssProperty = IDLAttributeNameToAnimationPropertyName(inputProperty.string());
if (!isCSSPropertyExposed(cssProperty, &document.settings()))
cssProperty = CSSPropertyInvalid;
auto resolvedCSSProperty = CSSProperty::resolveDirectionAwareProperty(cssProperty, RenderStyle::initialDirection(), RenderStyle::initialWritingMode());
if (CSSPropertyAnimation::isPropertyAnimatable(resolvedCSSProperty))
animationProperties.append(inputProperty);
@@ -275,6 +277,7 @@ static inline ExceptionOr<KeyframeEffect::KeyframeLikeObject> processKeyframeLik
// 4. Calculate the normalized property name as the result of applying the IDL attribute name to animation property name algorithm to property name.
auto propertyName = animationProperties[i].string();
auto cssPropertyID = IDLAttributeNameToAnimationPropertyName(propertyName);
ASSERT(isCSSPropertyExposed(cssPropertyID, &document.settings()));

// 5. Add a property to to keyframe output with normalized property name as the property name, and property values as the property value.
if (cssPropertyID == CSSPropertyCustom)

0 comments on commit 3021ad8

Please sign in to comment.