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

Unified Diff: Source/web/ChromeClientImpl.cpp

Issue 946323002: Animations: Introduce compositor AnimationPlayer and AnimationTimeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix the order. Created 5 years, 9 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/web/ChromeClientImpl.cpp
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index 98377cec588585c34a4b2762d7e0ef5df5921c5c..8200bb4b80a3065bb92f10d277db21511c119511 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -34,6 +34,7 @@
#include "bindings/core/v8/ScriptController.h"
#include "core/HTMLNames.h"
+#include "core/animation/AnimationTimeline.h"
#include "core/dom/AXObjectCache.h"
#include "core/dom/Document.h"
#include "core/dom/Fullscreen.h"
@@ -107,6 +108,8 @@
namespace blink {
+class WebCompositorAnimationTimeline;
+
// Converts a AXObjectCache::AXNotification to a WebAXEvent
static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification)
{
@@ -691,19 +694,24 @@ GraphicsLayerFactory* ChromeClientImpl::graphicsLayerFactory() const
void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFrame* localRoot)
{
+ WebCompositorAnimationTimeline* compositorTimeline = rootLayer && localRoot->document() ? localRoot->document()->timeline().compositorTimeline() : nullptr;
+
// FIXME: For top-level frames we still use the WebView as a WebWidget. This special
// case will be removed when top-level frames get WebFrameWidgets.
if (localRoot->isMainFrame()) {
+ m_webView->setCompositorAnimationTimeline(compositorTimeline);
aelias_OOO_until_Jul13 2015/03/13 00:38:32 This looks out of place here, a better place might
loyso (OOO) 2015/03/13 01:07:01 Not sure how to do that. 1) CompositorTimeline obj
aelias_OOO_until_Jul13 2015/03/13 01:31:18 Sorry, I don't follow right now how these points r
loyso (OOO) 2015/03/13 03:37:42 I want compositor timeline to be attached/detached
aelias_OOO_until_Jul13 2015/03/17 18:12:27 OK, looking at that, the plumbing would be pretty
loyso (OOO) 2015/03/18 06:59:43 Ok. But I could put a note or TODO comment here.
m_webView->setRootGraphicsLayer(rootLayer);
} else {
WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot);
// FIXME: The following conditional is only needed for staging until the Chromium patch
// lands that instantiates a WebFrameWidget.
if (!webFrame->frameWidget()) {
+ m_webView->setCompositorAnimationTimeline(compositorTimeline);
m_webView->setRootGraphicsLayer(rootLayer);
return;
}
ASSERT(webFrame && webFrame->frameWidget());
+ webFrame->frameWidget()->setCompositorAnimationTimeline(compositorTimeline);
webFrame->frameWidget()->setRootGraphicsLayer(rootLayer);
}
}

Powered by Google App Engine
This is Rietveld 408576698