Changeset 230595 in webkit
- Timestamp:
- Apr 12, 2018 2:25:56 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r230590 r230595 1 2018-04-12 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Fix a host of small CSS Animations and CSS Transitions issues 4 https://bugs.webkit.org/show_bug.cgi?id=184555 5 6 Reviewed by Dean Jackson. 7 8 Mark more tests as passing when the CSS Animations and CSS Transitions as Web Animations flag is on. 9 10 * animations/animation-border-overflow.html: 11 * animations/lineheight-animation.html: 12 * animations/missing-from-to-transforms.html: 13 * animations/missing-values-first-keyframe.html: 14 * animations/missing-values-last-keyframe.html: 15 * animations/transition-and-animation-1.html: 16 * animations/transition-and-animation-2.html: 17 * animations/transition-and-animation-3.html: 18 * animations/width-using-ems.html: 19 * compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html: 20 * compositing/layer-creation/multiple-keyframes-animation-overlap.html: 21 * compositing/layer-creation/scale-rotation-animation-overlap.html: 22 * compositing/layer-creation/translate-scale-animation-overlap.html: 23 * css3/filters/filter-animation-from-none-hw.html: 24 * css3/filters/filter-animation-from-none-multi-hw.html: 25 * css3/filters/filter-animation-from-none-multi.html: 26 * css3/filters/filter-animation-from-none.html: 27 * imported/blink/transitions/unprefixed-transform.html: 28 * transitions/interrupted-all-transition.html: 29 1 30 2018-04-12 Keith Rollin <krollin@apple.com> 2 31 -
trunk/LayoutTests/animations/animation-border-overflow.html
r119985 r230595 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 1 2 <html> 2 3 <head> -
trunk/LayoutTests/animations/lineheight-animation.html
r84872 r230595 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 3 2 4 3 <html lang="en"> -
trunk/LayoutTests/animations/missing-from-to-transforms.html
r180441 r230595 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 3 2 4 3 <html lang="en"> -
trunk/LayoutTests/animations/missing-values-first-keyframe.html
r230574 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 <html> 3 3 <head> -
trunk/LayoutTests/animations/missing-values-last-keyframe.html
r230574 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 <html> 3 3 <head> -
trunk/LayoutTests/animations/transition-and-animation-1.html
r84872 r230595 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 3 2 4 3 <html lang="en"> -
trunk/LayoutTests/animations/transition-and-animation-2.html
r84872 r230595 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 3 2 4 3 <html lang="en"> -
trunk/LayoutTests/animations/transition-and-animation-3.html
r211573 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/animations/width-using-ems.html
r84872 r230595 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 3 2 4 3 <html lang="en"> -
trunk/LayoutTests/compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
r181515 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/compositing/layer-creation/multiple-keyframes-animation-overlap.html
r181515 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/compositing/layer-creation/scale-rotation-animation-overlap.html
r181515 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/compositing/layer-creation/translate-scale-animation-overlap.html
r181515 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/css3/filters/filter-animation-from-none-hw.html
r230574 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/css3/filters/filter-animation-from-none-multi-hw.html
r230574 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/css3/filters/filter-animation-from-none-multi.html
r230574 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/css3/filters/filter-animation-from-none.html
r230574 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/LayoutTests/imported/blink/transitions/unprefixed-transform.html
r190629 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 <div class="target">-webkit-transform 10ms</div><br> 3 3 <div class="target">transform 10ms</div><br> -
trunk/LayoutTests/transitions/interrupted-all-transition.html
r200360 r230595 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 3 3 <html> -
trunk/Source/WebCore/ChangeLog
r230594 r230595 1 2018-04-12 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Fix a host of small CSS Animations and CSS Transitions issues 4 https://bugs.webkit.org/show_bug.cgi?id=184555 5 6 Reviewed by Dean Jackson. 7 8 A series of small and intertwined issues were preventing a number of CSS Animations and CSS Trantions 9 tests to fail when expressed as Web Animations. 10 11 * animation/AnimationTimeline.cpp: 12 (WebCore::AnimationTimeline::updateCSSAnimationsForElement): Pass the old and new RenderStyles to CSSAnimation::create() 13 since we're refactoring DeclarativeAnimation to create blending keyframes in initialize(), no longer requiring each subclass 14 to create them. 15 (WebCore::AnimationTimeline::cssAnimationForElementAndProperty): Return the animation, if any, for a property animated by 16 a CSS animation, so that we can determine if a property is already being animated when running a CSS Transition. 17 (WebCore::AnimationTimeline::updateCSSTransitionsForElement): Since a property can be specified twice in a "transition" property, 18 once via "all" and once explicitly, ensure we look at all currently running transitions for the currently-processed property to 19 see if we need to cancel this transition. Previously, we used to only see if it had been transitioned in the old style. We also 20 start transitions even if the duration is 0 provided the delay is a positive, non-zero value. Then, if there is a CSS Animation 21 for this property already running, use that animation's original unanimated style as the from value. 22 * animation/AnimationTimeline.h: 23 * animation/CSSAnimation.cpp: 24 (WebCore::CSSAnimation::create): The animation name is now set in the CSSAnimation constructor. 25 (WebCore::CSSAnimation::CSSAnimation): Set the animation name and keep a copy of the unanimated style such that we can 26 get it when a CSS Transition is created and takes precedence over this CSS Animation. 27 (WebCore::CSSAnimation::initialize): Deleted. 28 * animation/CSSAnimation.h: 29 * animation/CSSTransition.cpp: 30 (WebCore::CSSTransition::create): 31 (WebCore::CSSTransition::initialize): 32 * animation/CSSTransition.h: 33 * animation/DeclarativeAnimation.cpp: 34 (WebCore::DeclarativeAnimation::initialize): Call the new computeDeclarativeAnimationBlendingKeyframes() on the KeyframeEffect 35 directly in this method so that subclasses don't need to create it manually, but most important so that keyframes are created 36 before timing properties are set based on the backing animation. 37 * animation/DeclarativeAnimation.h: 38 * animation/KeyframeEffectReadOnly.cpp: 39 (WebCore::KeyframeEffectReadOnly::getKeyframes): Ensure we have a CSSValue before trying to serialize it. 40 (WebCore::KeyframeEffectReadOnly::computeDeclarativeAnimationBlendingKeyframes): 41 (WebCore::KeyframeEffectReadOnly::computeCSSAnimationBlendingKeyframes): Use the animation's unanimated style to compute keyframes, 42 instead of a default RenderStyle which would not use the right values for implicit keyframes. 43 (WebCore::KeyframeEffectReadOnly::stylesWouldYieldNewCSSTransitionsBlendingKeyframes const): Look at the property used to create 44 the transition rather than that specified on the backing Animation object since it can be CSSPropertyInvalid in the case of 45 "transition: all". 46 (WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): If we're dealing with a CSS animation, we consider the first and 47 last keyframes to always have the property listed since the underlying style was provided and should be captured. 48 * animation/KeyframeEffectReadOnly.h: 49 * style/StyleTreeResolver.cpp: 50 (WebCore::Style::TreeResolver::createAnimatedElementUpdate): Apply CSS Animations after CSS Trasitions since they take precedence. 51 1 52 2018-04-12 Antoine Quint <graouts@apple.com> 2 53 -
trunk/Source/WebCore/animation/AnimationTimeline.cpp
r230594 r230595 183 183 } else if (currentAnimation.isValidAnimation()) { 184 184 // Otherwise we are dealing with a new animation name and must create a CSSAnimation for it. 185 cssAnimationsByName.set(name, CSSAnimation::create(element, currentAnimation ));185 cssAnimationsByName.set(name, CSSAnimation::create(element, currentAnimation, oldStyle, newStyle)); 186 186 } 187 187 // Remove the name of this animation from our list since it's now known to be current. … … 198 198 if (cssAnimationsByName.isEmpty()) 199 199 m_elementToCSSAnimationByName.remove(&element); 200 } 201 202 RefPtr<WebAnimation> AnimationTimeline::cssAnimationForElementAndProperty(Element& element, CSSPropertyID property) 203 { 204 RefPtr<WebAnimation> matchingAnimation; 205 for (const auto& animation : m_elementToCSSAnimationsMap.get(&element)) { 206 auto* effect = animation->effect(); 207 if (is<KeyframeEffectReadOnly>(effect) && downcast<KeyframeEffectReadOnly>(effect)->animatedProperties().contains(property)) 208 matchingAnimation = animation; 209 } 210 return matchingAnimation; 200 211 } 201 212 … … 270 281 } 271 282 272 bool hadProperty =previousProperties.removeFirst(property);283 previousProperties.removeFirst(property); 273 284 // We've found a backing animation that we didn't know about for a valid property. 274 285 if (!previousBackingAnimations.contains(&backingAnimation)) { … … 276 287 // animation's properties and whether its blending keyframes match the old and new styles. If they do, move on to the 277 288 // next transition, otherwise delete the previous CSSTransition object, and create a new one. 278 if ( hadProperty) {289 if (cssTransitionsByProperty.contains(property)) { 279 290 if (cssTransitionsByProperty.get(property)->matchesBackingAnimationAndStyles(backingAnimation, oldStyle, newStyle)) 280 291 continue; … … 283 294 // Now we can create a new CSSTransition with the new backing animation provided it has a valid 284 295 // duration and the from and to values are distinct. 285 if (backingAnimation.duration() > 0 && oldStyle && !CSSPropertyAnimation::propertiesEqual(property, oldStyle, &newStyle)) 286 cssTransitionsByProperty.set(property, CSSTransition::create(element, property, backingAnimation, oldStyle, newStyle)); 296 if ((backingAnimation.duration() || backingAnimation.delay() > 0) && oldStyle) { 297 auto existingAnimation = cssAnimationForElementAndProperty(element, property); 298 const auto* fromStyle = existingAnimation ? &downcast<CSSAnimation>(existingAnimation.get())->unanimatedStyle() : oldStyle; 299 if (!CSSPropertyAnimation::propertiesEqual(property, fromStyle, &newStyle)) 300 cssTransitionsByProperty.set(property, CSSTransition::create(element, property, backingAnimation, fromStyle, newStyle)); 301 } 287 302 } 288 303 } -
trunk/Source/WebCore/animation/AnimationTimeline.h
r230594 r230595 88 88 HashMap<Element*, Vector<RefPtr<WebAnimation>>>& relevantMapForAnimation(WebAnimation&); 89 89 void cancelOrRemoveDeclarativeAnimation(RefPtr<DeclarativeAnimation>); 90 RefPtr<WebAnimation> cssAnimationForElementAndProperty(Element&, CSSPropertyID); 90 91 91 92 ClassType m_classType; -
trunk/Source/WebCore/animation/CSSAnimation.cpp
r229983 r230595 32 32 namespace WebCore { 33 33 34 Ref<CSSAnimation> CSSAnimation::create(Element& target, const Animation& backingAnimation )34 Ref<CSSAnimation> CSSAnimation::create(Element& target, const Animation& backingAnimation, const RenderStyle* oldStyle, const RenderStyle& newStyle) 35 35 { 36 auto result = adoptRef(*new CSSAnimation(target, backingAnimation)); 37 result->m_animationName = backingAnimation.name(); 38 result->initialize(target); 36 auto result = adoptRef(*new CSSAnimation(target, backingAnimation, newStyle)); 37 result->initialize(target, oldStyle, newStyle); 39 38 return result; 40 39 } 41 40 42 CSSAnimation::CSSAnimation(Element& element, const Animation& backingAnimation )41 CSSAnimation::CSSAnimation(Element& element, const Animation& backingAnimation, const RenderStyle& unanimatedStyle) 43 42 : DeclarativeAnimation(element, backingAnimation) 43 , m_animationName(backingAnimation.name()) 44 , m_unanimatedStyle(RenderStyle::clonePtr(unanimatedStyle)) 44 45 { 45 }46 47 void CSSAnimation::initialize(const Element& target)48 {49 DeclarativeAnimation::initialize(target);50 51 downcast<KeyframeEffectReadOnly>(effect())->computeCSSAnimationBlendingKeyframes();52 46 } 53 47 -
trunk/Source/WebCore/animation/CSSAnimation.h
r229983 r230595 33 33 class Animation; 34 34 class Element; 35 class RenderStyle; 35 36 36 37 class CSSAnimation final : public DeclarativeAnimation { 37 38 public: 38 static Ref<CSSAnimation> create(Element&, const Animation& );39 static Ref<CSSAnimation> create(Element&, const Animation&, const RenderStyle* oldStyle, const RenderStyle& newStyle); 39 40 ~CSSAnimation() = default; 40 41 41 42 bool isCSSAnimation() const override { return true; } 42 43 const String& animationName() const { return m_animationName; } 44 const RenderStyle& unanimatedStyle() const { return *m_unanimatedStyle; } 43 45 44 46 std::optional<double> bindingsCurrentTime() const final; 45 47 46 48 protected: 47 void initialize(const Element&) final;48 49 void syncPropertiesWithBackingAnimation() final; 49 50 50 51 private: 51 CSSAnimation(Element&, const Animation& );52 CSSAnimation(Element&, const Animation&, const RenderStyle&); 52 53 53 54 String m_animationName; 54 55 std::unique_ptr<RenderStyle> m_unanimatedStyle; 55 56 }; 56 57 -
trunk/Source/WebCore/animation/CSSTransition.cpp
r230112 r230595 36 36 { 37 37 auto result = adoptRef(*new CSSTransition(target, property, backingAnimation)); 38 result->initialize(target); 39 downcast<KeyframeEffectReadOnly>(result->effect())->computeCSSTransitionBlendingKeyframes(oldStyle, newStyle); 38 result->initialize(target, oldStyle, newStyle); 40 39 return result; 41 40 } … … 47 46 } 48 47 49 void CSSTransition::initialize(const Element& target )48 void CSSTransition::initialize(const Element& target, const RenderStyle* oldStyle, const RenderStyle& newStyle) 50 49 { 51 DeclarativeAnimation::initialize(target );50 DeclarativeAnimation::initialize(target, oldStyle, newStyle); 52 51 53 52 suspendEffectInvalidation(); -
trunk/Source/WebCore/animation/CSSTransition.h
r230112 r230595 49 49 50 50 protected: 51 void initialize(const Element& ) final;51 void initialize(const Element&, const RenderStyle* oldStyle, const RenderStyle& newStyle) final; 52 52 53 53 private: -
trunk/Source/WebCore/animation/DeclarativeAnimation.cpp
r229981 r230595 57 57 } 58 58 59 void DeclarativeAnimation::initialize(const Element& target )59 void DeclarativeAnimation::initialize(const Element& target, const RenderStyle* oldStyle, const RenderStyle& newStyle) 60 60 { 61 61 // We need to suspend invalidation of the animation's keyframe effect during its creation … … 66 66 setEffect(KeyframeEffectReadOnly::create(target)); 67 67 setTimeline(&target.document().timeline()); 68 downcast<KeyframeEffectReadOnly>(effect())->computeDeclarativeAnimationBlendingKeyframes(oldStyle, newStyle); 68 69 syncPropertiesWithBackingAnimation(); 69 70 if (backingAnimation().playState() == AnimPlayStatePlaying) -
trunk/Source/WebCore/animation/DeclarativeAnimation.h
r229829 r230595 35 35 class Animation; 36 36 class Element; 37 class RenderStyle; 37 38 38 39 class DeclarativeAnimation : public WebAnimation { … … 52 53 DeclarativeAnimation(Element&, const Animation&); 53 54 54 virtual void initialize(const Element& );55 virtual void initialize(const Element&, const RenderStyle* oldStyle, const RenderStyle& newStyle); 55 56 virtual void syncPropertiesWithBackingAnimation(); 56 57 -
trunk/Source/WebCore/animation/KeyframeEffectReadOnly.cpp
r230578 r230595 538 538 auto propertyName = CSSPropertyIDToIDLAttributeName(cssPropertyId); 539 539 // 2. Let IDL value be the result of serializing the property value of declaration by passing declaration to the algorithm to serialize a CSS value. 540 auto idlValue = computedStyleExtractor.valueForPropertyinStyle(style, cssPropertyId)->cssText(); 540 String idlValue = ""; 541 if (auto cssValue = computedStyleExtractor.valueForPropertyinStyle(style, cssPropertyId)) 542 idlValue = cssValue->cssText(); 541 543 // 3. Let value be the result of converting IDL value to an ECMAScript String value. 542 544 auto value = toJS<IDLDOMString>(state, idlValue); … … 818 820 #endif 819 821 822 void KeyframeEffectReadOnly::computeDeclarativeAnimationBlendingKeyframes(const RenderStyle* oldStyle, const RenderStyle& newStyle) 823 { 824 ASSERT(is<DeclarativeAnimation>(animation())); 825 if (is<CSSAnimation>(animation())) 826 computeCSSAnimationBlendingKeyframes(); 827 else if (is<CSSTransition>(animation())) 828 computeCSSTransitionBlendingKeyframes(oldStyle, newStyle); 829 } 830 820 831 void KeyframeEffectReadOnly::computeCSSAnimationBlendingKeyframes() 821 832 { 822 833 ASSERT(is<CSSAnimation>(animation())); 823 834 824 auto& backingAnimation = downcast<CSSAnimation>(animation())->backingAnimation(); 835 auto cssAnimation = downcast<CSSAnimation>(animation()); 836 auto& backingAnimation = cssAnimation->backingAnimation(); 825 837 if (backingAnimation.name().isEmpty()) 826 838 return; 827 828 auto renderStyle = RenderStyle::createPtr();829 // We need to call update() on the FontCascade or we'll hit an ASSERT when parsing font-related properties.830 renderStyle->fontCascade().update(nullptr);831 839 832 840 KeyframeList keyframeList(backingAnimation.name()); 833 841 if (auto* styleScope = Style::Scope::forOrdinal(*m_target, backingAnimation.nameStyleScopeOrdinal())) 834 styleScope->resolver().keyframeStylesForAnimation(*m_target, renderStyle.get(), keyframeList);842 styleScope->resolver().keyframeStylesForAnimation(*m_target, &cssAnimation->unanimatedStyle(), keyframeList); 835 843 836 844 // Ensure resource loads for all the frames. … … 878 886 return false; 879 887 880 auto property = downcast<CSSTransition>(animation())-> backingAnimation().property();888 auto property = downcast<CSSTransition>(animation())->property(); 881 889 882 890 // There cannot be new keyframes if the start and to values are the same. … … 991 999 // The effect value of a single property referenced by a keyframe effect as one of its target properties, 992 1000 // for a given iteration progress, current iteration and underlying value is calculated as follows. 1001 1002 bool isCSSAnimation = is<CSSAnimation>(animation()); 993 1003 994 1004 for (auto cssPropertyId : m_blendingKeyframes.properties()) { … … 1006 1016 for (size_t i = 0; i < m_blendingKeyframes.size(); ++i) { 1007 1017 auto& keyframe = m_blendingKeyframes[i]; 1008 if (!keyframe.containsProperty(cssPropertyId))1009 continue;1010 1018 auto offset = keyframe.key(); 1019 if (!keyframe.containsProperty(cssPropertyId)) { 1020 // If we're dealing with a CSS animation, we consider the first and last keyframes to always have the property listed 1021 // since the underlying style was provided and should be captured. 1022 if (!isCSSAnimation || (offset && offset < 1)) 1023 continue; 1024 } 1011 1025 if (!offset) 1012 1026 numberOfKeyframesWithZeroOffset++; -
trunk/Source/WebCore/animation/KeyframeEffectReadOnly.h
r230578 r230595 113 113 #endif 114 114 115 void computeCSSAnimationBlendingKeyframes(); 116 void computeCSSTransitionBlendingKeyframes(const RenderStyle* oldStyle, const RenderStyle& newStyle); 115 void computeDeclarativeAnimationBlendingKeyframes(const RenderStyle* oldStyle, const RenderStyle& newStyle); 117 116 bool stylesWouldYieldNewCSSTransitionsBlendingKeyframes(const RenderStyle& oldStyle, const RenderStyle& newStyle) const; 118 117 bool hasBlendingKeyframes() const { return m_blendingKeyframes.size(); } … … 140 139 void computeStackingContextImpact(); 141 140 void updateBlendingKeyframes(); 141 void computeCSSAnimationBlendingKeyframes(); 142 void computeCSSTransitionBlendingKeyframes(const RenderStyle* oldStyle, const RenderStyle& newStyle); 142 143 void computeShouldRunAccelerated(); 143 144 void setBlendingKeyframes(KeyframeList&); -
trunk/Source/WebCore/style/StyleTreeResolver.cpp
r230211 r230595 293 293 // on the document timeline. Note that we get timeline() on the Document here because we need a timeline created 294 294 // in case no Web Animations have been created through the JS API. 295 if ((oldStyle && oldStyle->hasTransitions()) || newStyle->hasTransitions()) 296 m_document.timeline().updateCSSTransitionsForElement(element, *newStyle, oldStyle); 297 295 298 if ((oldStyle && oldStyle->hasAnimations()) || newStyle->hasAnimations()) 296 299 m_document.timeline().updateCSSAnimationsForElement(element, *newStyle, oldStyle); 297 298 if ((oldStyle && oldStyle->hasTransitions()) || newStyle->hasTransitions())299 m_document.timeline().updateCSSTransitionsForElement(element, *newStyle, oldStyle);300 300 } 301 301
Note: See TracChangeset
for help on using the changeset viewer.