Changeset 211501 in webkit
- Timestamp:
- Feb 1, 2017 11:54:25 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r211495 r211501 1 2017-02-01 Antoine Quint <graouts@apple.com> 2 3 [mac-wk1] LayoutTest media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=165319 5 <rdar://problem/30284104> 6 7 Reviewed by Dean Jackson. 8 9 Since we've fixed the root cause of this test's flakiness, we no longer need to mark it as flaky. 10 11 * platform/mac/TestExpectations: 12 1 13 2017-02-01 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/LayoutTests/platform/mac/TestExpectations
r211447 r211501 1485 1485 webkit.org/b/167442 [ ElCapitan ] media/modern-media-controls/airplay-support/airplay-support.html [ Pass Timeout ] 1486 1486 1487 webkit.org/b/165319 media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html [ Pass Timeout ]1488 1489 1487 webkit.org/b/167461 media/modern-media-controls/layout-node/addChild.html [ Pass Timeout ] 1490 1488 -
trunk/Source/WebCore/ChangeLog
r211500 r211501 1 2017-02-01 Antoine Quint <graouts@apple.com> 2 3 [mac-wk1] LayoutTest media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=165319 5 <rdar://problem/30284104> 6 7 Reviewed by Dean Jackson. 8 9 Running media/controls/track-menu.html before media/modern-media-controls/tracks-support/tracks- 10 support-click-track-in-panel.html makes that test time out in all test runs. The root of the issue 11 is that animations are suspended by media/controls/track-menu.html with a call to 12 internals.suspendAnimations(), and that state isn't reset with a call to internals.resumeAnimations(). 13 Then, media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html fails because 14 the selection animation for the tracks panel menu item that is clicked never completes and the delegate 15 to notify that an item in the tracks panel was selected is never fired, which leads to the test failure. 16 17 We change Internals::suspendAnimations() and Internals::resumeAnimations() to only affect the current 18 document, rather than calling into AnimationController::suspendAnimations() which would do just that, 19 but also set a Frame-wide flag that would prevent further animations from running, even in a subsequent 20 document load. 21 22 * dom/Document.cpp: 23 (WebCore::Document::prepareForDestruction): Ensure the document that is about to be destroyed is no longer 24 associated with an AnimationController. 25 * page/animation/AnimationController.cpp: 26 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Update the animation's suspend state in case 27 the document its renderer is associated with is suspended. This is required since previously CompositeAnimations 28 would set their suspend state in their constructor, based on the Frame-wide suspended state, but there is no 29 document to use as a basis to query its suspended state in that constructor. 30 (WebCore::AnimationControllerPrivate::animationsAreSuspendedForDocument): 31 (WebCore::AnimationControllerPrivate::detachFromDocument): 32 (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument): 33 (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument): 34 (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): 35 (WebCore::AnimationController::animationsAreSuspendedForDocument): 36 (WebCore::AnimationController::detachFromDocument): 37 * page/animation/AnimationController.h: 38 * page/animation/AnimationControllerPrivate.h: 39 * testing/Internals.cpp: 40 (WebCore::Internals::animationsAreSuspended): 41 (WebCore::Internals::suspendAnimations): 42 (WebCore::Internals::resumeAnimations): 43 1 44 2017-02-01 Ryan Haddad <ryanhaddad@apple.com> 2 45 -
trunk/Source/WebCore/dom/Document.cpp
r211455 r211501 2264 2264 return; 2265 2265 2266 m_frame->animation().detachFromDocument(this); 2267 2266 2268 #if ENABLE(IOS_TOUCH_EVENTS) 2267 2269 clearTouchEventHandlersAndListeners(); -
trunk/Source/WebCore/page/animation/AnimationController.cpp
r211033 r211501 92 92 } 93 93 94 if (animationsAreSuspendedForDocument(&renderer.document())) 95 result.iterator->value->suspendAnimations(); 96 94 97 return *result.iterator->value; 95 98 } … … 309 312 } 310 313 314 bool AnimationControllerPrivate::animationsAreSuspendedForDocument(Document* document) 315 { 316 return isSuspended() || m_suspendedDocuments.contains(document); 317 } 318 319 void AnimationControllerPrivate::detachFromDocument(Document* document) 320 { 321 m_suspendedDocuments.remove(document); 322 } 323 311 324 void AnimationControllerPrivate::suspendAnimationsForDocument(Document* document) 312 325 { 326 if (animationsAreSuspendedForDocument(document)) 327 return; 328 329 m_suspendedDocuments.add(document); 330 313 331 AnimationPrivateUpdateBlock updateBlock(*this); 314 332 … … 323 341 void AnimationControllerPrivate::resumeAnimationsForDocument(Document* document) 324 342 { 343 if (!animationsAreSuspendedForDocument(document)) 344 return; 345 346 detachFromDocument(document); 347 325 348 AnimationPrivateUpdateBlock updateBlock(*this); 326 349 … … 335 358 void AnimationControllerPrivate::startAnimationsIfNotSuspended(Document* document) 336 359 { 337 if (! isSuspended() || allowsNewAnimationsWhileSuspended())360 if (!animationsAreSuspendedForDocument(document) || allowsNewAnimationsWhileSuspended()) 338 361 resumeAnimationsForDocument(document); 339 362 } … … 702 725 } 703 726 727 bool AnimationController::animationsAreSuspendedForDocument(Document* document) 728 { 729 return m_data->animationsAreSuspendedForDocument(document); 730 } 731 732 void AnimationController::detachFromDocument(Document* document) 733 { 734 return m_data->detachFromDocument(document); 735 } 736 704 737 void AnimationController::suspendAnimationsForDocument(Document* document) 705 738 { -
trunk/Source/WebCore/page/animation/AnimationController.h
r210797 r211501 73 73 void serviceAnimations(); 74 74 75 void suspendAnimationsForDocument(Document*); 76 void resumeAnimationsForDocument(Document*); 75 WEBCORE_EXPORT void suspendAnimationsForDocument(Document*); 76 WEBCORE_EXPORT void resumeAnimationsForDocument(Document*); 77 WEBCORE_EXPORT bool animationsAreSuspendedForDocument(Document*); 78 void detachFromDocument(Document*); 77 79 void startAnimationsIfNotSuspended(Document*); 78 80 -
trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h
r211033 r211501 70 70 void suspendAnimationsForDocument(Document*); 71 71 void resumeAnimationsForDocument(Document*); 72 bool animationsAreSuspendedForDocument(Document*); 72 73 void startAnimationsIfNotSuspended(Document*); 74 void detachFromDocument(Document*); 73 75 74 76 bool isRunningAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const; … … 132 134 Vector<EventToDispatch> m_eventsToDispatch; 133 135 Vector<Ref<Element>> m_elementChangesToDispatch; 134 136 HashSet<Document*> m_suspendedDocuments; 137 135 138 double m_beginAnimationUpdateTime; 136 139 -
trunk/Source/WebCore/testing/Internals.cpp
r211356 r211501 740 740 return Exception { INVALID_ACCESS_ERR }; 741 741 742 return document->frame()->animation(). isSuspended();742 return document->frame()->animation().animationsAreSuspendedForDocument(document); 743 743 } 744 744 … … 749 749 return Exception { INVALID_ACCESS_ERR }; 750 750 751 document->frame()->animation().suspendAnimations(); 751 document->frame()->animation().suspendAnimationsForDocument(document); 752 753 for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) { 754 if (Document* document = frame->document()) 755 frame->animation().suspendAnimationsForDocument(document); 756 } 757 752 758 return { }; 753 759 } … … 759 765 return Exception { INVALID_ACCESS_ERR }; 760 766 761 document->frame()->animation().resumeAnimations(); 767 document->frame()->animation().resumeAnimationsForDocument(document); 768 769 for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) { 770 if (Document* document = frame->document()) 771 frame->animation().resumeAnimationsForDocument(document); 772 } 773 762 774 return { }; 763 775 }
Note: See TracChangeset
for help on using the changeset viewer.