Changeset 153396 in webkit
- Timestamp:
- Jul 26, 2013 5:57:31 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r153386 r153396 1 2013-07-26 Dean Jackson <dino@apple.com> 2 3 Allow new transitions to run even when controller is suspended 4 https://bugs.webkit.org/show_bug.cgi?id=119171 5 <rdar://problem/14511404> 6 7 Reviewed by Simon Fraser. 8 9 This is actually a test to make sure this fix didn't break anything. There is no 10 way to trigger the new behaviour from the test system (or from Safari). 11 1 12 2013-07-26 Bem Jones-Bey <bjonesbe@adobe.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r153384 r153396 1 2013-07-26 Dean Jackson <dino@apple.com> 2 3 Allow new transitions to run even when controller is suspended 4 https://bugs.webkit.org/show_bug.cgi?id=119171 5 <rdar://problem/14511404> 6 7 Reviewed by Simon Fraser. 8 9 Expose a new property on AnimationController that allows newly created 10 animations to run even if the controller says it is suspended. See WebKit 11 ChangeLog for more details. 12 13 Test: transitions/created-while-suspended.html 14 15 * WebCore.exp.in: Export the new methods so WebView can use them. 16 * page/animation/AnimationController.cpp: 17 (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialize new flag to false. 18 (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): Check new flag is not true. 19 (WebCore::AnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended): Expose setter. 20 (WebCore::AnimationController::allowsNewAnimationsWhileSuspended): "Public" getter. 21 (WebCore::AnimationController::setAllowsNewAnimationsWhileSuspended): "Public" setter. 22 * page/animation/AnimationController.h: 23 * page/animation/AnimationControllerPrivate.h: 24 (WebCore::AnimationControllerPrivate::allowsNewAnimationsWhileSuspended): 25 * page/animation/CompositeAnimation.cpp: 26 (WebCore::CompositeAnimation::CompositeAnimation): Only suspend if new flag is false. Everything else 27 relies on the m_suspended flag, so the real code change is this one line. 28 1 29 2013-07-26 Brent Fulgham <bfulgham@apple.com> 2 30 -
trunk/Source/WebCore/WebCore.exp.in
r153380 r153396 623 623 __ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF12AtomicStringEd 624 624 __ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKN3WTF6StringEd 625 __ZN7WebCore19AnimationController36setAllowsNewAnimationsWhileSuspendedEb 626 __ZNK7WebCore19AnimationController33allowsNewAnimationsWhileSuspendedEv 625 627 __ZN7WebCore19BackForwardListImpl10removeItemEPNS_11HistoryItemE 626 628 __ZN7WebCore19BackForwardListImpl10setEnabledEb -
trunk/Source/WebCore/page/animation/AnimationController.cpp
r151218 r153396 60 60 , m_waitingForAsyncStartNotification(false) 61 61 , m_isSuspended(false) 62 , m_allowsNewAnimationsWhileSuspended(false) 62 63 { 63 64 } … … 323 324 void AnimationControllerPrivate::startAnimationsIfNotSuspended(Document* document) 324 325 { 325 if (!isSuspended() )326 if (!isSuspended() || allowsNewAnimationsWhileSuspended()) 326 327 resumeAnimationsForDocument(document); 328 } 329 330 void AnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended(bool allowed) 331 { 332 m_allowsNewAnimationsWhileSuspended = allowed; 327 333 } 328 334 … … 604 610 } 605 611 612 bool AnimationController::allowsNewAnimationsWhileSuspended() const 613 { 614 return m_data->allowsNewAnimationsWhileSuspended(); 615 } 616 617 void AnimationController::setAllowsNewAnimationsWhileSuspended(bool allowed) 618 { 619 m_data->setAllowsNewAnimationsWhileSuspended(allowed); 620 } 621 606 622 #if ENABLE(REQUEST_ANIMATION_FRAME) 607 623 void AnimationController::serviceAnimations() -
trunk/Source/WebCore/page/animation/AnimationController.h
r149576 r153396 77 77 void beginAnimationUpdate(); 78 78 void endAnimationUpdate(); 79 80 bool allowsNewAnimationsWhileSuspended() const; 81 void setAllowsNewAnimationsWhileSuspended(bool); 79 82 80 83 static bool supportsAcceleratedAnimationOfProperty(CSSPropertyID); -
trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h
r151218 r153396 110 110 111 111 void updateAnimationTimerForRenderer(RenderObject*); 112 112 113 bool allowsNewAnimationsWhileSuspended() const { return m_allowsNewAnimationsWhileSuspended; } 114 void setAllowsNewAnimationsWhileSuspended(bool); 115 113 116 private: 114 117 void animationTimerFired(Timer<AnimationControllerPrivate>*); … … 143 146 bool m_waitingForAsyncStartNotification; 144 147 bool m_isSuspended; 148 149 // Used to flag whether we should revert to previous buggy 150 // behavior of allowing new transitions and animations to 151 // run even when this object is suspended. 152 bool m_allowsNewAnimationsWhileSuspended; 145 153 }; 146 154 -
trunk/Source/WebCore/page/animation/CompositeAnimation.cpp
r149665 r153396 45 45 : m_animationController(animationController) 46 46 { 47 m_suspended = animationController->isSuspended() ;47 m_suspended = animationController->isSuspended() && !animationController->allowsNewAnimationsWhileSuspended(); 48 48 } 49 49 -
trunk/Source/WebKit/mac/ChangeLog
r153379 r153396 1 2013-07-26 Dean Jackson <dino@apple.com> 2 3 Allow new transitions to run even when controller is suspended 4 https://bugs.webkit.org/show_bug.cgi?id=119171 5 <rdar://problem/14511404> 6 7 Reviewed by Simon Fraser. 8 9 Expose a new SPI on WebView that triggers the (buggy) old behaviour 10 for animations, such that any newly created animations will start even 11 when the document is supposedly suspended. It turns out that client content was 12 unknowingly relying on this behaviour - e.g. suspending a view, loading a 13 bunch of new content, bringing the view on screen and then unsuspending. In this 14 situation, we were not running CSS transitions, because the page was suspended. 15 However, JS was still triggering them, and content was expecting a transitionEnd event. 16 17 * WebView/WebView.mm: 18 (-[WebView allowsNewCSSAnimationsWhileSuspended]): Calls into AnimationController. 19 (-[WebView setAllowsNewCSSAnimationsWhileSuspended:]): Ditto. 20 * WebView/WebViewPrivate.h: New methods listed above. 21 1 22 2013-07-26 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r152763 r153396 2791 2791 } 2792 2792 2793 - (BOOL)allowsNewCSSAnimationsWhileSuspended 2794 { 2795 Frame* frame = core([self mainFrame]); 2796 if (frame) 2797 return frame->animation()->allowsNewAnimationsWhileSuspended(); 2798 2799 return false; 2800 } 2801 2802 - (void)setAllowsNewCSSAnimationsWhileSuspended:(BOOL)allowed 2803 { 2804 Frame* frame = core([self mainFrame]); 2805 if (frame) 2806 frame->animation()->setAllowsNewAnimationsWhileSuspended(allowed); 2807 } 2808 2793 2809 - (BOOL)cssAnimationsSuspended 2794 2810 { -
trunk/Source/WebKit/mac/WebView/WebViewPrivate.h
r152579 r153396 565 565 - (void)setCSSAnimationsSuspended:(BOOL)suspended; 566 566 567 /* 568 SPI to revert back to buggy behavior that would allow new transitions 569 and animations to run even when the view is suspended (e.g. loading a 570 new document). 571 */ 572 - (BOOL)allowsNewCSSAnimationsWhileSuspended; 573 - (void)setAllowsNewCSSAnimationsWhileSuspended:(BOOL)allowed; 574 567 575 + (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme; 568 576 + (void)_registerURLSchemeAsSecure:(NSString *)scheme;
Note: See TracChangeset
for help on using the changeset viewer.