Chromium Code Reviews| 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 3fac9ec6e92249418a706b0507d354dad1137a67..af075f2a890b4de544a2c7b41966d01bc3cced15 100644 |
| --- a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp |
| +++ b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp |
| @@ -25,6 +25,7 @@ |
| #include "web/LinkHighlightImpl.h" |
| +#include "core/dom/DOMNodeIds.h" |
| #include "core/dom/LayoutTreeBuilderTraversal.h" |
| #include "core/dom/Node.h" |
| #include "core/frame/FrameView.h" |
| @@ -38,7 +39,9 @@ |
| #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" |
| @@ -90,17 +93,19 @@ 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()); |
| + CompositorElementId elementId = createCompositorElementId(DOMNodeIds::idForNode(node), CompositorSubElementId::Value::LinkHighlight); |
| + m_compositorPlayer->attachElement(CompositorElementId(elementId)); |
|
bokan
2016/06/03 15:09:21
Can't you just pass elementId here (and below) wit
Ian Vollick
2016/06/03 19:31:21
Indeed I can :) I think what happened here was tha
|
| m_contentLayer->layer()->setDrawsContent(true); |
| m_contentLayer->layer()->setOpacity(1); |
| + m_contentLayer->layer()->setElementId(CompositorElementId(elementId)); |
| m_geometryNeedsUpdate = true; |
| } |
| 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); |