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

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

Issue 2049063002: Revert of Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 327229056d44c14e7a179ea0e1d2c007134bddc4..3fac9ec6e92249418a706b0507d354dad1137a67 100644
--- a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
+++ b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
@@ -25,7 +25,6 @@
#include "web/LinkHighlightImpl.h"
-#include "core/dom/DOMNodeIds.h"
#include "core/dom/LayoutTreeBuilderTraversal.h"
#include "core/dom/Node.h"
#include "core/frame/FrameView.h"
@@ -39,9 +38,7 @@
#include "platform/animation/CompositorFloatAnimationCurve.h"
#include "platform/animation/TimingFunction.h"
#include "platform/graphics/Color.h"
-#include "platform/graphics/CompositorElementId.h"
#include "platform/graphics/CompositorFactory.h"
-#include "platform/graphics/CompositorMutableProperties.h"
#include "platform/graphics/GraphicsLayer.h"
#include "platform/graphics/paint/DrawingRecorder.h"
#include "public/platform/Platform.h"
@@ -93,19 +90,17 @@
m_compositorPlayer->setAnimationDelegate(this);
if (m_owningWebViewImpl->linkHighlightsTimeline())
m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this);
-
- CompositorElementId elementId = createCompositorElementId(DOMNodeIds::idForNode(node), CompositorSubElementId::LinkHighlight);
- m_compositorPlayer->attachElement(elementId);
+ m_compositorPlayer->attachLayer(m_contentLayer->layer());
+
m_contentLayer->layer()->setDrawsContent(true);
m_contentLayer->layer()->setOpacity(1);
- m_contentLayer->layer()->setElementId(elementId);
m_geometryNeedsUpdate = true;
}
LinkHighlightImpl::~LinkHighlightImpl()
{
- if (m_compositorPlayer->isElementAttached())
- m_compositorPlayer->detachElement();
+ if (m_compositorPlayer->isLayerAttached())
+ m_compositorPlayer->detachLayer();
if (m_owningWebViewImpl->linkHighlightsTimeline())
m_owningWebViewImpl->linkHighlightsTimeline()->playerDestroyed(*this);
m_compositorPlayer->setAnimationDelegate(nullptr);

Powered by Google App Engine
This is Rietveld 408576698