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

Unified Diff: Source/web/LinkHighlight.cpp

Issue 354223002: Add methods to RenderLayer to get at the painting or scrolling graphics layers, if present. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Edited comments. Created 6 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
« no previous file with comments | « Source/core/rendering/RenderLayer.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 1e1b6010fb92e6b1cdd407e5c4eb460be02a4b9e..765107c03756e74adb7cbcf76d4db8957af234a7 100644
--- a/Source/web/LinkHighlight.cpp
+++ b/Source/web/LinkHighlight.cpp
@@ -122,18 +122,15 @@ RenderLayer* LinkHighlight::computeEnclosingCompositingLayer()
}
} while (!renderLayer);
- CompositedLayerMappingPtr compositedLayerMapping = renderLayer->compositingState() == PaintsIntoGroupedBacking ? renderLayer->groupedMapping() : renderLayer->compositedLayerMapping();
- GraphicsLayer* newGraphicsLayer = renderLayer->compositingState() == PaintsIntoGroupedBacking ? compositedLayerMapping->squashingLayer() : compositedLayerMapping->mainGraphicsLayer();
-
- m_clipLayer->setTransform(SkMatrix44(SkMatrix44::kIdentity_Constructor));
+ ASSERT(renderLayer->compositingState() != NotComposited);
+ GraphicsLayer* newGraphicsLayer = renderLayer->graphicsLayerBacking();
if (!newGraphicsLayer->drawsContent()) {
- if (renderLayer->scrollableArea() && renderLayer->scrollableArea()->usesCompositedScrolling()) {
- ASSERT(renderLayer->hasCompositedLayerMapping() && renderLayer->compositedLayerMapping()->scrollingContentsLayer());
- newGraphicsLayer = compositedLayerMapping->scrollingContentsLayer();
- }
+ newGraphicsLayer = renderLayer->graphicsLayerBackingForScrolling();
}
+ m_clipLayer->setTransform(SkMatrix44(SkMatrix44::kIdentity_Constructor));
+
if (m_currentGraphicsLayer != newGraphicsLayer) {
if (m_currentGraphicsLayer)
clearGraphicsLayerLinkHighlightPointer();
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698