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

Unified Diff: Source/web/LinkHighlight.cpp

Issue 247803003: Remove assumption that null containerForRepaint assumes RenderView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix zee nits Created 6 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
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698