| Index: Source/web/LinkHighlight.cpp
|
| diff --git a/Source/web/LinkHighlight.cpp b/Source/web/LinkHighlight.cpp
|
| index 983e1f2d933e4aafdaee4ff914c4842baa42a914..52766ff368d0c6dd0d53794805a9774a610a7fcf 100644
|
| --- a/Source/web/LinkHighlight.cpp
|
| +++ b/Source/web/LinkHighlight.cpp
|
| @@ -81,16 +81,13 @@ LinkHighlight::LinkHighlight(Node* node, WebViewImpl* owningWebViewImpl)
|
| m_clipLayer = adoptPtr(compositorSupport->createLayer());
|
| m_clipLayer->setTransformOrigin(WebFloatPoint3D());
|
| m_clipLayer->addChild(m_contentLayer->layer());
|
| - if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platform::current()->compositorSupport()) {
|
| - m_compositorPlayer = adoptPtr(Platform::current()->compositorSupport()->createAnimationPlayer());
|
| - ASSERT(m_compositorPlayer);
|
| - m_compositorPlayer->setAnimationDelegate(this);
|
| - m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this);
|
| - m_compositorPlayer->attachLayer(m_contentLayer->layer());
|
| - } else {
|
| - owningWebViewImpl->registerForAnimations(m_contentLayer->layer());
|
| - m_contentLayer->layer()->setAnimationDelegate(this);
|
| - }
|
| +
|
| + m_compositorPlayer = adoptPtr(Platform::current()->compositorSupport()->createAnimationPlayer());
|
| + ASSERT(m_compositorPlayer);
|
| + m_compositorPlayer->setAnimationDelegate(this);
|
| + m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this);
|
| + m_compositorPlayer->attachLayer(m_contentLayer->layer());
|
| +
|
| m_contentLayer->layer()->setDrawsContent(true);
|
| m_contentLayer->layer()->setOpacity(1);
|
| m_geometryNeedsUpdate = true;
|
| @@ -99,12 +96,9 @@ LinkHighlight::LinkHighlight(Node* node, WebViewImpl* owningWebViewImpl)
|
|
|
| LinkHighlight::~LinkHighlight()
|
| {
|
| - if (m_compositorPlayer) {
|
| - m_compositorPlayer->detachLayer();
|
| - m_owningWebViewImpl->linkHighlightsTimeline()->playerDestroyed(*this);
|
| - m_compositorPlayer->setAnimationDelegate(nullptr);
|
| - }
|
| - m_compositorPlayer.clear();
|
| + m_compositorPlayer->detachLayer();
|
| + m_owningWebViewImpl->linkHighlightsTimeline()->playerDestroyed(*this);
|
| + m_compositorPlayer->setAnimationDelegate(nullptr);
|
|
|
| clearGraphicsLayerLinkHighlightPointer();
|
| releaseResources();
|
| @@ -314,10 +308,8 @@ void LinkHighlight::startHighlightAnimationIfNeeded()
|
| OwnPtr<WebCompositorAnimation> animation = adoptPtr(compositorSupport->createAnimation(*curve, WebCompositorAnimation::TargetPropertyOpacity));
|
|
|
| m_contentLayer->layer()->setDrawsContent(true);
|
| - if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled())
|
| - m_compositorPlayer->addAnimation(animation.leakPtr());
|
| - else
|
| - m_contentLayer->layer()->addAnimation(animation.leakPtr());
|
| +
|
| + m_compositorPlayer->addAnimation(animation.leakPtr());
|
|
|
| invalidate();
|
| m_owningWebViewImpl->scheduleAnimation();
|
|
|