Commit 1acecfb6 authored by loyso@chromium.org's avatar loyso@chromium.org

Compositor Animations: Do not create compositor animation timeline for remote frames

We create ScrollingCoordinator for pages with non-local frames, but it's noop in functionality because of guards:

if (!m_page->mainFrame()->isLocalFrame())
  return;

Let's align the behavior with the rest of ScrollingCoordinator code. Otherwise it crashes browser tests.

BUG=394777

Review URL: https://codereview.chromium.org/1304213003

git-svn-id: svn://svn.chromium.org/blink/trunk@201945 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3a6061cd
...@@ -96,10 +96,11 @@ ScrollingCoordinator::ScrollingCoordinator(Page* page) ...@@ -96,10 +96,11 @@ ScrollingCoordinator::ScrollingCoordinator(Page* page)
{ {
if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platform::current()->isThreadedAnimationEnabled()) { if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platform::current()->isThreadedAnimationEnabled()) {
ASSERT(m_page); ASSERT(m_page);
ASSERT(m_page->mainFrame()->isLocalFrame()); if (m_page->mainFrame()->isLocalFrame()) {
ASSERT(Platform::current()->compositorSupport()); ASSERT(Platform::current()->compositorSupport());
m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline()); m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline());
m_page->chromeClient().attachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame())); m_page->chromeClient().attachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame()));
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment