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

Unified Diff: third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp

Issue 1420913008: CC AnimationHost: Fix ProgrammaticScrollAnimator detach scope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
index 6a128860895ee322cb11e5d5bb91f3a6d191b1fb..243b0809bcf9d933c14a70b41451f4aee65b173b 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -216,13 +216,14 @@ void ProgrammaticScrollAnimator::reattachCompositorPlayerIfNeeded(WebCompositorA
if (m_compositorPlayer && timeline) {
// Detach from old layer (if any).
if (m_compositorAnimationAttachedToLayerId) {
- ASSERT(m_compositorPlayer->isLayerAttached());
- m_compositorPlayer->detachLayer();
+ if (m_compositorPlayer->isLayerAttached())
+ m_compositorPlayer->detachLayer();
timeline->playerDestroyed(*this);
}
// Attach to new layer (if any).
if (compositorAnimationAttachedToLayerId) {
ASSERT(m_scrollableArea->layerForScrolling());
+ ASSERT(!m_compositorPlayer->isLayerAttached());
timeline->playerAttached(*this);
m_compositorPlayer->attachLayer(m_scrollableArea->layerForScrolling()->platformLayer());
}
« no previous file with comments | « third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698