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

Unified Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 714933002: Set relayoutChildren to 'true' only if size change happens in Table (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: wrong patch Created 6 years, 1 month 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/GraphicsLayerUpdater.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index 2f51e2187c133b40a6f2b37a06e06a82269c48e9..7a1654745563d3503840cf733652909ba7a30475 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -259,7 +259,12 @@ void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment()
bool isLocalRoot = m_renderView.frame()->isLocalRoot();
RenderVideo* video = findFullscreenVideoRenderer(m_renderView.document());
- if (!video || !video->layer()->hasCompositedLayerMapping()) {
+ CompositedLayerMapping* videoCompositedLayerMapping = nullptr;
+
+ if (video)
+ videoCompositedLayerMapping = video->layer()->compositedLayerMapping();
+
+ if (!videoCompositedLayerMapping) {
if (isLocalRoot) {
GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer();
if (backgroundLayer && !backgroundLayer->parent())
@@ -268,7 +273,7 @@ void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment()
return;
}
- GraphicsLayer* videoLayer = video->layer()->compositedLayerMapping()->mainGraphicsLayer();
+ GraphicsLayer* videoLayer = videoCompositedLayerMapping->mainGraphicsLayer();
// The fullscreen video has layer position equal to its enclosing frame's scroll position because fullscreen container is fixed-positioned.
// We should reset layer position here since we are going to reattach the layer at the very top level.
@@ -410,7 +415,7 @@ bool RenderLayerCompositor::allocateOrClearCompositedLayerMapping(RenderLayer* l
// requirements fully.
switch (compositedLayerUpdate) {
case AllocateOwnCompositedLayerMapping:
- ASSERT(!layer->hasCompositedLayerMapping());
+ ASSERT(!layer->compositedLayerMapping());
setCompositingModeEnabled(true);
// If we need to issue paint invalidations, do so before allocating the compositedLayerMapping and clearing out the groupedMapping.
@@ -436,15 +441,15 @@ bool RenderLayerCompositor::allocateOrClearCompositedLayerMapping(RenderLayer* l
case RemoveOwnCompositedLayerMapping:
// PutInSquashingLayer means you might have to remove the composited layer mapping first.
case PutInSquashingLayer:
- if (layer->hasCompositedLayerMapping()) {
+ if (layer->compositedLayerMapping()) {
// If we're removing the compositedLayerMapping from a reflection, clear the source GraphicsLayer's pointer to
// its replica GraphicsLayer. In practice this should never happen because reflectee and reflection
// are both either composited, or not composited.
if (layer->isReflection()) {
RenderLayer* sourceLayer = toRenderLayerModelObject(layer->renderer()->parent())->layer();
- if (sourceLayer->hasCompositedLayerMapping()) {
- ASSERT(sourceLayer->compositedLayerMapping()->mainGraphicsLayer()->replicaLayer() == layer->compositedLayerMapping()->mainGraphicsLayer());
- sourceLayer->compositedLayerMapping()->mainGraphicsLayer()->setReplicatedByLayer(0);
+ if (CompositedLayerMapping* sourceCompositedLayerMapping = sourceLayer->compositedLayerMapping()) {
+ ASSERT(sourceCompositedLayerMapping->mainGraphicsLayer()->replicaLayer() == layer->compositedLayerMapping()->mainGraphicsLayer());
+ sourceCompositedLayerMapping->mainGraphicsLayer()->setReplicatedByLayer(0);
}
}
@@ -626,11 +631,10 @@ bool RenderLayerCompositor::parentFrameContentLayers(RenderPart* renderer)
if (!innerCompositor || !innerCompositor->staleInCompositingMode() || innerCompositor->rootLayerAttachment() != RootLayerAttachedViaEnclosingFrame)
return false;
- RenderLayer* layer = renderer->layer();
- if (!layer->hasCompositedLayerMapping())
+ CompositedLayerMapping* compositedLayerMapping = renderer->layer()->compositedLayerMapping();
+ if (!compositedLayerMapping)
return false;
- CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMapping();
GraphicsLayer* hostingLayer = compositedLayerMapping->parentForSublayers();
GraphicsLayer* rootLayer = innerCompositor->rootGraphicsLayer();
if (hostingLayer->children().size() != 1 || hostingLayer->children()[0] != rootLayer) {
« no previous file with comments | « Source/core/rendering/compositing/GraphicsLayerUpdater.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698