Changeset 287881 in webkit
- Timestamp:
- Jan 11, 2022, 8:20:06 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/KeyframeEffect.cpp (modified) (1 diff)
-
Source/WebCore/style/Styleable.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r287878 r287881 1 2022-01-11 Antoine Quint <graouts@webkit.org> 2 3 css/css-transitions/KeyframeEffect-setKeyframes.tentative.html is a failure 4 https://bugs.webkit.org/show_bug.cgi?id=235062 5 6 Reviewed by Dean Jackson. 7 8 Mark WPT progressions. 9 10 * web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt: 11 1 12 2022-01-11 Tim Nguyen <ntim@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/KeyframeEffect-setKeyframes.tentative-expected.txt
r287553 r287881 4 4 PASS A transition with no keyframes still returns the original transitionProperty 5 5 PASS A transition with replaced keyframes animating the same property still exhibits normal reversing behavior. 6 FAIL A transition with replaced keyframes animating a different property still exhibits normal reversing behavior (reversing from the base value). undefined is not an object (evaluating 'reversedTransition.effect') 7 FAIL A transition with replaced keyframes animating nothing still exhibits normal reversing behavior (reversing from the base value). undefined is not an object (evaluating 'reversedTransition.effect') 6 PASS A transition with replaced keyframes animating a different property still exhibits normal reversing behavior (reversing from the base value). 7 PASS A transition with replaced keyframes animating nothing still exhibits normal reversing behavior (reversing from the base value). 8 8 FAIL A transition with replaced keyframes animating nothing on a property being controlled by another modified transition exhibits normal reversing behavior and reverses from the other transition's current value. assert_equals: The reversed transition gets its start value from the other transition controlling left expected "280px" but got "200px" 9 FAIL A transition with replaced kefyrames and composite 'add' exhibits normal reversing behavior, and the effect is not double counted when calculating the before change style assert_equals: The start value matches the 'before change' value expected "175px" but got "150px" 9 PASS A transition with replaced kefyrames and composite 'add' exhibits normal reversing behavior, and the effect is not double counted when calculating the before change style 10 10 -
trunk/Source/WebCore/ChangeLog
r287880 r287881 1 2022-01-11 Antoine Quint <graouts@webkit.org> 2 3 css/css-transitions/KeyframeEffect-setKeyframes.tentative.html is a failure 4 https://bugs.webkit.org/show_bug.cgi?id=235062 5 6 Reviewed by Dean Jackson. 7 8 The WPT at css/css-transitions/KeyframeEffect-setKeyframes.tentative.html, which checks 9 the behavior of programmatically changing keyframes for a CSS Transition, highlighted 10 three failures: 11 12 1. we did not flush pending style changes as setKeyframes() was called for an animation 13 created fromm CSS (CSS Transition or CSS Animation), 14 2. we did not use the style from the last style update to computed the before-change style 15 if available, but rather the computed style generated _after_ the last style update, 16 3. we did not apply _all_ animations as we compute the before-change style to consider 17 new transitions to run, but only animations matching the current property. 18 19 We've corrected all of those errors and this test now passes save for one failure, which 20 seems to be a different type of problem and will be looked at in a future patch. 21 22 * animation/KeyframeEffect.cpp: 23 (WebCore::KeyframeEffect::setBindingsKeyframes): 24 * style/Styleable.cpp: 25 (WebCore::updateCSSTransitionsForStyleableAndProperty): 26 1 27 2022-01-11 Andres Gonzalez <andresg_22@apple.com> 2 28 -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r287877 r287881 820 820 ExceptionOr<void> KeyframeEffect::setBindingsKeyframes(JSGlobalObject& lexicalGlobalObject, Strong<JSObject>&& keyframesInput) 821 821 { 822 if (is<DeclarativeAnimation>(animation())) 823 downcast<DeclarativeAnimation>(*animation()).flushPendingStyleChanges(); 822 824 auto retVal = setKeyframes(lexicalGlobalObject, WTFMove(keyframesInput)); 823 825 if (!retVal.hasException() && is<CSSAnimation>(animation())) -
trunk/Source/WebCore/style/Styleable.cpp
r287769 r287881 411 411 // any styles derived from declarative animations such as CSS Transitions, CSS Animations, and SMIL Animations updated to the current time. 412 412 auto beforeChangeStyle = [&]() -> const RenderStyle { 413 if (animation && animation->isRelevant()) { 414 auto animatedStyle = RenderStyle::clone(currentStyle); 415 // If a transition has not yet started or started when animations were last updated, use the timeline time at its creation 416 // as its start time to ensure that it will produce a style with progress > 0. 417 bool shouldUseTimelineTimeAtCreation = is<CSSTransition>(animation) && (!animation->startTime() || *animation->startTime() == styleable.element.document().timeline().currentTime()); 418 animation->resolve(animatedStyle, { nullptr }, shouldUseTimelineTimeAtCreation ? downcast<CSSTransition>(*animation).timelineTimeAtCreation() : std::nullopt); 419 return animatedStyle; 420 } 421 422 // If it exists, use the recorded RenderStyle for this element during a previous call to Style::TreeResolver::createAnimatedElementUpdate(). 423 if (auto* lastStyleChangeEventStyle = styleable.lastStyleChangeEventStyle()) 424 return RenderStyle::clone(*lastStyleChangeEventStyle); 425 426 // If we haven't computed styles from animations for this element, the before-change style is the previously resolved style for this element. 413 if (auto* lastStyleChangeEventStyle = styleable.lastStyleChangeEventStyle()) { 414 auto style = RenderStyle::clone(*lastStyleChangeEventStyle); 415 if (auto* keyframeEffectStack = styleable.keyframeEffectStack()) { 416 for (const auto& effect : keyframeEffectStack->sortedEffects()) { 417 auto* effectAnimation = effect->animation(); 418 bool shouldUseTimelineTimeAtCreation = is<CSSTransition>(effectAnimation) && (!effectAnimation->startTime() || *effectAnimation->startTime() == styleable.element.document().timeline().currentTime()); 419 effectAnimation->resolve(style, { nullptr }, shouldUseTimelineTimeAtCreation ? downcast<CSSTransition>(*effectAnimation).timelineTimeAtCreation() : std::nullopt); 420 } 421 } 422 return style; 423 } 427 424 return RenderStyle::clone(currentStyle); 428 425 }();
Note:
See TracChangeset
for help on using the changeset viewer.