Changeset 252527 in webkit
- Timestamp:
- Nov 16, 2019 9:11:44 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252526 r252527 1 2019-11-16 Philippe Normand <pnormand@igalia.com> 2 3 Unreviewed, rolling out r252526. 4 5 broke iOS and mac builds 6 7 Reverted changeset: 8 9 "Unreviewed, rolling out r252455." 10 https://bugs.webkit.org/show_bug.cgi?id=204272 11 https://trac.webkit.org/changeset/252526 12 1 13 2019-11-16 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r252526 r252527 1 2019-11-16 Philippe Normand <pnormand@igalia.com> 2 3 Unreviewed, rolling out r252526. 4 5 broke iOS and mac builds 6 7 Reverted changeset: 8 9 "Unreviewed, rolling out r252455." 10 https://bugs.webkit.org/show_bug.cgi?id=204272 11 https://trac.webkit.org/changeset/252526 12 1 13 2019-11-16 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebCore/animation/AnimationEffect.h
r252526 r252527 62 62 virtual void invalidate() = 0; 63 63 virtual void animationDidSeek() = 0; 64 virtual void animationWasCanceled() = 0; 64 65 virtual void animationSuspensionStateDidChange(bool) = 0; 65 66 virtual void animationTimelineDidChange(AnimationTimeline*) = 0; -
trunk/Source/WebCore/animation/AnimationTimeline.cpp
r252526 r252527 400 400 // Define the before-change style as the computed values of all properties on the element as of the previous style change event, except with 401 401 // any styles derived from declarative animations such as CSS Transitions, CSS Animations, and SMIL Animations updated to the current time. 402 auto existingAnimation = cssAnimationForElementAndProperty(element, property); 403 const auto& beforeChangeStyle = existingAnimation ? downcast<CSSAnimation>(existingAnimation.get())->unanimatedStyle() : currentStyle; 404 405 if (!runningTransitionsByProperty.contains(property) 402 bool hasRunningTransition = runningTransitionsByProperty.contains(property); 403 auto& beforeChangeStyle = [&]() -> const RenderStyle& { 404 if (hasRunningTransition && CSSPropertyAnimation::animationOfPropertyIsAccelerated(property)) { 405 // In case we have an accelerated transition running for this element, we need to get its computed style as the before-change style 406 // since otherwise the animated value for that property won't be visible. 407 auto* runningTransition = runningTransitionsByProperty.get(property); 408 if (is<KeyframeEffect>(runningTransition->effect())) { 409 auto& keyframeEffect = *downcast<KeyframeEffect>(runningTransition->effect()); 410 if (keyframeEffect.isAccelerated()) { 411 auto animatedStyle = RenderStyle::clonePtr(currentStyle); 412 runningTransition->resolve(*animatedStyle); 413 return *animatedStyle; 414 } 415 } 416 } 417 418 if (auto existingAnimation = cssAnimationForElementAndProperty(element, property)) 419 return downcast<CSSAnimation>(existingAnimation.get())->unanimatedStyle(); 420 421 return currentStyle; 422 }(); 423 424 if (!hasRunningTransition 406 425 && !CSSPropertyAnimation::propertiesEqual(property, &beforeChangeStyle, &afterChangeStyle) 407 426 && CSSPropertyAnimation::canPropertyBeInterpolated(property, &beforeChangeStyle, &afterChangeStyle) … … 436 455 } 437 456 438 boolhasRunningTransition = runningTransitionsByProperty.contains(property);457 hasRunningTransition = runningTransitionsByProperty.contains(property); 439 458 if ((hasRunningTransition || completedTransitionsByProperty.contains(property)) && !matchingBackingAnimation) { 440 459 // 3. If the element has a running transition or completed transition for the property, and there is not a matching transition-property -
trunk/Source/WebCore/animation/DocumentTimeline.cpp
r252526 r252527 308 308 AnimationTimeline::removeAnimation(animation); 309 309 310 if ( m_animations.isEmpty())310 if (!shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState()) 311 311 unscheduleAnimationResolution(); 312 312 } … … 314 314 void DocumentTimeline::scheduleAnimationResolution() 315 315 { 316 if (m_isSuspended || m_animation s.isEmpty() || m_animationResolutionScheduled)316 if (m_isSuspended || m_animationResolutionScheduled || !shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState()) 317 317 return; 318 318 … … 330 330 } 331 331 332 bool DocumentTimeline::shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState() const 333 { 334 return !m_animations.isEmpty() || !m_acceleratedAnimationsPendingRunningStateChange.isEmpty(); 335 } 336 332 337 void DocumentTimeline::updateAnimationsAndSendEvents(DOMHighResTimeStamp timestamp) 333 338 { … … 338 343 cacheCurrentTime(timestamp); 339 344 340 if (m_isSuspended || m_animations.isEmpty() || !m_animationResolutionScheduled)345 if (m_isSuspended || !m_animationResolutionScheduled || !shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState()) 341 346 return; 342 347 -
trunk/Source/WebCore/animation/DocumentTimeline.h
r252526 r252527 100 100 void removeReplacedAnimations(); 101 101 bool animationCanBeRemoved(WebAnimation&); 102 bool shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState() const; 102 103 103 104 Timer m_tickScheduleTimer; -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r252526 r252527 1335 1335 } 1336 1336 1337 void KeyframeEffect::animationWasCanceled() 1338 { 1339 if (m_shouldRunAccelerated && isRunningAccelerated()) 1340 addPendingAcceleratedAction(AcceleratedAction::Stop); 1341 } 1342 1337 1343 void KeyframeEffect::animationSuspensionStateDidChange(bool animationIsSuspended) 1338 1344 { -
trunk/Source/WebCore/animation/KeyframeEffect.h
r252526 r252527 114 114 void invalidate() override; 115 115 void animationDidSeek() final; 116 void animationWasCanceled() final; 116 117 void animationSuspensionStateDidChange(bool) final; 117 118 void animationTimelineDidChange(AnimationTimeline*) final; -
trunk/Source/WebCore/animation/WebAnimation.cpp
r252526 r252527 615 615 616 616 invalidateEffect(); 617 618 if (m_effect) 619 m_effect->animationWasCanceled(); 617 620 } 618 621
Note: See TracChangeset
for help on using the changeset viewer.