Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Side by Side Diff: Source/core/animation/Animation.cpp

Issue 1360043002: Web Animations: Don't set compositor pending when document has been detached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 if (!hasActiveAnimationsOnCompositor()) { 736 if (!hasActiveAnimationsOnCompositor()) {
737 destroyCompositorPlayer(); 737 destroyCompositorPlayer();
738 m_compositorState.release(); 738 m_compositorState.release();
739 } 739 }
740 if (effectChanged && m_compositorState) { 740 if (effectChanged && m_compositorState) {
741 m_compositorState->effectChanged = true; 741 m_compositorState->effectChanged = true;
742 } 742 }
743 if (m_compositorPending || m_isPausedForTesting) { 743 if (m_compositorPending || m_isPausedForTesting) {
744 return; 744 return;
745 } 745 }
746 #if !ENABLE(OILPAN)
747 if (!timeline() || !timeline()->document()) {
748 return;
749 }
750 #endif
746 751
747 if (!m_compositorState || m_compositorState->effectChanged 752 if (!m_compositorState || m_compositorState->effectChanged
748 || !playing() || m_compositorState->playbackRate != m_playbackRate 753 || !playing() || m_compositorState->playbackRate != m_playbackRate
749 || m_compositorState->startTime != m_startTime) { 754 || m_compositorState->startTime != m_startTime) {
750 m_compositorPending = true; 755 m_compositorPending = true;
751 ASSERT(timeline());
752 ASSERT(timeline()->document());
753 timeline()->document()->compositorPendingAnimations().add(this); 756 timeline()->document()->compositorPendingAnimations().add(this);
754 } 757 }
755 } 758 }
756 759
757 void Animation::cancelAnimationOnCompositor() 760 void Animation::cancelAnimationOnCompositor()
758 { 761 {
759 if (hasActiveAnimationsOnCompositor()) 762 if (hasActiveAnimationsOnCompositor())
760 toKeyframeEffect(m_content.get())->cancelAnimationOnCompositor(); 763 toKeyframeEffect(m_content.get())->cancelAnimationOnCompositor();
761 764
762 destroyCompositorPlayer(); 765 destroyCompositorPlayer();
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 visitor->trace(m_content); 1090 visitor->trace(m_content);
1088 visitor->trace(m_timeline); 1091 visitor->trace(m_timeline);
1089 visitor->trace(m_pendingFinishedEvent); 1092 visitor->trace(m_pendingFinishedEvent);
1090 visitor->trace(m_finishedPromise); 1093 visitor->trace(m_finishedPromise);
1091 visitor->trace(m_readyPromise); 1094 visitor->trace(m_readyPromise);
1092 RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visito r); 1095 RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visito r);
1093 ActiveDOMObject::trace(visitor); 1096 ActiveDOMObject::trace(visitor);
1094 } 1097 }
1095 1098
1096 } // namespace 1099 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698