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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1131833002: [Sketch] Animations: Torpedo the old intrusive animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@scroll
Patch Set: Delete more. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 1ff8a2733a36edb460748df3160cfd8e7cca2e98..d2968e4a5166755e97d25e47992d98fb705e6a9f 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -95,12 +95,10 @@ ScrollingCoordinator::ScrollingCoordinator(Page* page)
, m_wasFrameScrollable(false)
, m_lastMainThreadScrollingReasons(0)
{
- if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platform::current()->compositorSupport()) {
- ASSERT(m_page);
- ASSERT(m_page->mainFrame()->isLocalFrame());
- m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline());
- m_page->chrome().client().attachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame()));
- }
+ ASSERT(m_page);
+ ASSERT(m_page->mainFrame()->isLocalFrame());
+ m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline());
+ m_page->chrome().client().attachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame()));
}
ScrollingCoordinator::~ScrollingCoordinator()
@@ -713,12 +711,8 @@ void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainTh
void ScrollingCoordinator::willBeDestroyed()
{
ASSERT(m_page);
-
- if (m_programmaticScrollAnimatorTimeline) {
- ASSERT(m_page->mainFrame()->isLocalFrame());
- m_page->chrome().client().detachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame()));
- m_programmaticScrollAnimatorTimeline.clear();
- }
+ ASSERT(m_page->mainFrame()->isLocalFrame());
+ m_page->chrome().client().detachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame()));
m_page = nullptr;
for (const auto& scrollbar : m_horizontalScrollbars)
« no previous file with comments | « Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698