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

Unified Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 1944623002: CC Animation: Use ElementId to attach CC animation players. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erasedomids
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/web/LinkHighlightImpl.cpp
diff --git a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
index f1f5464306b2e3652d690d0b45fd6e269c9be2fe..448771c79bdf8555a083ed89cbcc28c30e70ddfc 100644
--- a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
+++ b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
@@ -89,7 +89,10 @@ LinkHighlightImpl::LinkHighlightImpl(Node* node, WebViewImpl* owningWebViewImpl)
m_compositorPlayer->setAnimationDelegate(this);
if (m_owningWebViewImpl->linkHighlightsTimeline())
m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this);
- m_compositorPlayer->attachLayer(m_contentLayer->layer());
+
+ DCHECK(node->isElementNode());
+ m_contentLayer->layer()->setElementId(toElement(node)->compositorElementId());
+ m_compositorPlayer->attachElement(m_contentLayer->layer()->elementId());
m_contentLayer->layer()->setDrawsContent(true);
m_contentLayer->layer()->setOpacity(1);
@@ -98,8 +101,8 @@ LinkHighlightImpl::LinkHighlightImpl(Node* node, WebViewImpl* owningWebViewImpl)
LinkHighlightImpl::~LinkHighlightImpl()
{
- if (m_compositorPlayer->isLayerAttached())
- m_compositorPlayer->detachLayer();
+ if (m_compositorPlayer->isElementAttached())
+ m_compositorPlayer->detachElement();
if (m_owningWebViewImpl->linkHighlightsTimeline())
m_owningWebViewImpl->linkHighlightsTimeline()->playerDestroyed(*this);
m_compositorPlayer->setAnimationDelegate(nullptr);

Powered by Google App Engine
This is Rietveld 408576698