Changeset 258823 in webkit
- Timestamp:
- Mar 22, 2020 3:57:22 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r258822 r258823 1 2020-03-22 Antoine Quint <graouts@apple.com> 2 3 [ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html is flaky failing. 4 https://bugs.webkit.org/show_bug.cgi?id=209239 5 <rdar://problem/60591358> 6 7 Reviewed by Simon Fraser. 8 9 * platform/mac/TestExpectations: 10 1 11 2020-03-22 Diego Pino Garcia <dpino@igalia.com> 2 12 -
trunk/LayoutTests/platform/mac/TestExpectations
r258797 r258823 2033 2033 webkit.org/b/207150 platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html [ Pass Failure ] 2034 2034 2035 webkit.org/b/209239 imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html [ Pass Failure ]2036 2037 2035 # The line breaking rules changed in ICU 66. We've updated the tests to match, but old platforms won't get updated line breaking rules. 2038 2036 webkit.org/b/209250 [ Sierra+ ] imported/w3c/web-platform-tests/css/css-text/line-break/line-break-normal-015.xht [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r258820 r258823 1 2020-03-22 Antoine Quint <graouts@apple.com> 2 3 [ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html is flaky failing. 4 https://bugs.webkit.org/show_bug.cgi?id=209239 5 <rdar://problem/60591358> 6 7 Reviewed by Simon Fraser. 8 9 This test was made flaky by r257417, the initial fix for webkit.org/b/208069. A new, appropriate fix for that bug is in the works. In the 10 meantime we revert r257417 in this patch. 11 12 The reason this test became flaky is that it features the following code: 13 14 animB.timeline = new DocumentTimeline({ 15 originTime: 16 document.timeline.currentTime - 100 * MS_PER_SEC - animB.startTime, 17 }); 18 19 In this case the only reference to the created DocumentTimeline is through `animB.timeline`. But because r257417 made the timeline reference from 20 WebAnimation a weak reference, in some cases, if GC kicks in, the timeline would be dereferenced and the test would fail. We restore that relationship 21 to its previous state, which is a strong reference. 22 23 * animation/WebAnimation.cpp: 24 (WebCore::WebAnimation::setTimeline): 25 (WebCore::WebAnimation::setTimelineInternal): 26 (WebCore::WebAnimation::enqueueAnimationEvent): 27 (WebCore::WebAnimation::acceleratedStateDidChange): 28 (WebCore::WebAnimation::timeline const): Deleted. 29 * animation/WebAnimation.h: 30 (WebCore::WebAnimation::timeline const): 31 1 32 2020-03-22 Zalan Bujtas <zalan@apple.com> 2 33 -
trunk/Source/WebCore/animation/WebAnimation.cpp
r258702 r258823 190 190 } 191 191 192 AnimationTimeline* WebAnimation::timeline() const193 {194 return m_timeline.get();195 }196 197 192 void WebAnimation::setEffectInternal(RefPtr<AnimationEffect>&& newEffect, bool doNotRemoveFromTimeline) 198 193 { … … 233 228 234 229 // 2. If new timeline is the same object as old timeline, abort this procedure. 235 if (timeline == m_timeline .get())230 if (timeline == m_timeline) 236 231 return; 237 232 … … 258 253 setTimelineInternal(WTFMove(timeline)); 259 254 260 setSuspended(is<DocumentTimeline>(m_timeline .get()) && downcast<DocumentTimeline>(*m_timeline).animationsAreSuspended());255 setSuspended(is<DocumentTimeline>(m_timeline) && downcast<DocumentTimeline>(*m_timeline).animationsAreSuspended()); 261 256 262 257 // 5. Run the procedure to update an animation's finished state for animation with the did seek flag set to false, … … 269 264 void WebAnimation::setTimelineInternal(RefPtr<AnimationTimeline>&& timeline) 270 265 { 271 if (m_timeline .get()== timeline)266 if (m_timeline == timeline) 272 267 return; 273 268 … … 275 270 m_timeline->removeAnimation(*this); 276 271 277 m_timeline = makeWeakPtr(timeline.get());272 m_timeline = WTFMove(timeline); 278 273 279 274 if (m_effect) … … 684 679 void WebAnimation::enqueueAnimationEvent(Ref<AnimationEventBase>&& event) 685 680 { 686 if (is<DocumentTimeline>(m_timeline .get())) {681 if (is<DocumentTimeline>(m_timeline)) { 687 682 // If animation has a document for timing, then append event to its document for timing's pending animation event queue along 688 683 // with its target, animation. If animation is associated with an active timeline that defines a procedure to convert timeline times … … 1240 1235 void WebAnimation::acceleratedStateDidChange() 1241 1236 { 1242 if (is<DocumentTimeline>(m_timeline .get()))1237 if (is<DocumentTimeline>(m_timeline)) 1243 1238 downcast<DocumentTimeline>(*m_timeline).animationAcceleratedRunningStateDidChange(*this); 1244 1239 } -
trunk/Source/WebCore/animation/WebAnimation.h
r258316 r258823 69 69 AnimationEffect* effect() const { return m_effect.get(); } 70 70 void setEffect(RefPtr<AnimationEffect>&&); 71 AnimationTimeline* timeline() const ;71 AnimationTimeline* timeline() const { return m_timeline.get(); } 72 72 virtual void setTimeline(RefPtr<AnimationTimeline>&&); 73 73 … … 187 187 188 188 RefPtr<AnimationEffect> m_effect; 189 WeakPtr<AnimationTimeline> m_timeline;189 RefPtr<AnimationTimeline> m_timeline; 190 190 UniqueRef<ReadyPromise> m_readyPromise; 191 191 UniqueRef<FinishedPromise> m_finishedPromise;
Note: See TracChangeset
for help on using the changeset viewer.