Index: Source/web/LinkHighlight.cpp |
diff --git a/Source/web/LinkHighlight.cpp b/Source/web/LinkHighlight.cpp |
index cb4f6f137d9959b120b2ed734e348122e49157d5..9d91774e8840717367ffb3ca1694e3db1afd3522 100644 |
--- a/Source/web/LinkHighlight.cpp |
+++ b/Source/web/LinkHighlight.cpp |
@@ -113,20 +113,15 @@ RenderLayer* LinkHighlight::computeEnclosingCompositingLayer() |
// Find the nearest enclosing composited layer and attach to it. We may need to cross frame boundaries |
// to find a suitable layer. |
RenderObject* renderer = m_node->renderer(); |
- RenderLayerModelObject* repaintContainer; |
+ RenderLayer* renderLayer; |
do { |
- repaintContainer = renderer->containerForRepaint(); |
- // FIXME: Repaint container should never be null. crbug.com/363699 |
- if (!repaintContainer) { |
+ renderLayer = renderer->enclosingLayer()->enclosingCompositingLayerForRepaint(); |
+ if (!renderLayer) { |
renderer = renderer->frame()->ownerRenderer(); |
if (!renderer) |
return 0; |
} |
- } while (!repaintContainer); |
- RenderLayer* renderLayer = repaintContainer->layer(); |
- |
- if (!renderLayer || renderLayer->compositingState() == NotComposited) |
- return 0; |
+ } while (!renderLayer); |
CompositedLayerMappingPtr compositedLayerMapping = renderLayer->compositingState() == PaintsIntoGroupedBacking ? renderLayer->groupedMapping() : renderLayer->compositedLayerMapping(); |
GraphicsLayer* newGraphicsLayer = renderLayer->compositingState() == PaintsIntoGroupedBacking ? compositedLayerMapping->squashingLayer() : compositedLayerMapping->mainGraphicsLayer(); |