Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp |
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp |
index ea2e8e59d2a65b85ebcc07f7c934bc5bf7ee86d6..1924a3268a64f8c9bdbe32b0526ef477db51102e 100644 |
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp |
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp |
@@ -457,7 +457,7 @@ |
updateBackgroundColor(); |
- if (renderer->isImage() && isDirectlyCompositedImage()) |
+ if (isDirectlyCompositedImage()) |
updateImageContents(); |
if (WebLayer* layer = platformLayerForPlugin(renderer)) { |
@@ -1698,7 +1698,7 @@ |
if (paintsIntoCompositedAncestor() || m_owningLayer.isReflection()) |
return false; |
- if (renderer()->isImage() && isDirectlyCompositedImage()) |
+ if (isDirectlyCompositedImage()) |
return false; |
RenderObject* renderObject = renderer(); |
@@ -1742,10 +1742,9 @@ |
// that require painting. Direct compositing saves backing store. |
bool CompositedLayerMapping::isDirectlyCompositedImage() const |
{ |
- ASSERT(renderer()->isImage()); |
- |
RenderObject* renderObject = renderer(); |
- if (m_owningLayer.hasBoxDecorationsOrBackground() || renderObject->hasClip()) |
+ |
+ if (!renderObject->isImage() || m_owningLayer.hasBoxDecorationsOrBackground() || renderObject->hasClip()) |
return false; |
RenderImage* imageRenderer = toRenderImage(renderObject); |
@@ -1792,8 +1791,6 @@ |
// This is a no-op if the layer doesn't have an inner layer for the image. |
m_graphicsLayer->setContentsToImage(image); |
- |
- // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 |
updateDrawsContent(); |
// Image animation is "lazy", in that it automatically stops unless someone is drawing |