Changeset 243263 in webkit
- Timestamp:
- Mar 20, 2019, 5:14:04 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
animation/AnimationTimeline.cpp (modified) (3 diffs)
-
animation/AnimationTimeline.h (modified) (1 diff)
-
animation/DocumentTimeline.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r243259 r243263 1 2019-03-20 Antoine Quint <graouts@apple.com> 2 3 DumpRenderTree crashes under WebAnimation::isRelevant when running imported/mozilla/css-transitions/test_document-get-animations.html in GuardMalloc 4 https://bugs.webkit.org/show_bug.cgi?id=196028 5 <rdar://problem/46842707> 6 7 Reviewed by Dean Jackson. 8 9 Instead of keeping a ListHashSet of raw pointers, we are now using a Vector of WeakPtrs. 10 11 * animation/AnimationTimeline.cpp: 12 (WebCore::AnimationTimeline::forgetAnimation): 13 (WebCore::AnimationTimeline::animationTimingDidChange): 14 (WebCore::AnimationTimeline::cancelDeclarativeAnimation): 15 * animation/AnimationTimeline.h: 16 * animation/DocumentTimeline.cpp: 17 (WebCore::DocumentTimeline::getAnimations const): 18 1 19 2019-03-20 Said Abou-Hallawa <sabouhallawa@apple.com> 2 20 -
trunk/Source/WebCore/animation/AnimationTimeline.cpp
r239820 r243263 57 57 void AnimationTimeline::forgetAnimation(WebAnimation* animation) 58 58 { 59 m_allAnimations.remove (animation);59 m_allAnimations.removeFirst(animation); 60 60 } 61 61 … … 63 63 { 64 64 if (m_animations.add(&animation)) { 65 m_allAnimations.a dd(&animation);65 m_allAnimations.append(makeWeakPtr(&animation)); 66 66 auto* timeline = animation.timeline(); 67 67 if (timeline && timeline != this) … … 493 493 animation.cancelFromStyle(); 494 494 removeAnimation(animation); 495 m_allAnimations.remove (&animation);495 m_allAnimations.removeFirst(&animation); 496 496 } 497 497 -
trunk/Source/WebCore/animation/AnimationTimeline.h
r239820 r243263 78 78 explicit AnimationTimeline(); 79 79 80 ListHashSet<WebAnimation*> m_allAnimations;80 Vector<WeakPtr<WebAnimation>> m_allAnimations; 81 81 ListHashSet<RefPtr<WebAnimation>> m_animations; 82 82 HashMap<Element*, PropertyToTransitionMap> m_elementToCompletedCSSTransitionByCSSPropertyID; -
trunk/Source/WebCore/animation/DocumentTimeline.cpp
r242714 r243263 133 133 // First, let's get all qualifying animations in their right group. 134 134 for (const auto& animation : m_allAnimations) { 135 if (!animation ->isRelevant() || animation->timeline() != this || !is<KeyframeEffect>(animation->effect()))135 if (!animation || !animation->isRelevant() || animation->timeline() != this || !is<KeyframeEffect>(animation->effect())) 136 136 continue; 137 137 … … 140 140 continue; 141 141 142 if (is<CSSTransition>(animation ) && downcast<CSSTransition>(animation)->owningElement())143 cssTransitions.append(animation );144 else if (is<CSSAnimation>(animation ) && downcast<CSSAnimation>(animation)->owningElement())145 cssAnimations.append(animation );142 if (is<CSSTransition>(animation.get()) && downcast<CSSTransition>(animation.get())->owningElement()) 143 cssTransitions.append(animation.get()); 144 else if (is<CSSAnimation>(animation.get()) && downcast<CSSAnimation>(animation.get())->owningElement()) 145 cssAnimations.append(animation.get()); 146 146 else 147 webAnimations.append(animation );147 webAnimations.append(animation.get()); 148 148 } 149 149
Note:
See TracChangeset
for help on using the changeset viewer.