Index: Source/WebCore/rendering/RenderLayerCompositor.cpp |
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp |
index 3a85f41cc161e94f9ac668d6df61a3aa46f522b5..a28418d86a3ea39e7c159124ff5df9864f0a88e9 100644 |
--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp |
+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp |
@@ -808,10 +808,9 @@ void RenderLayerCompositor::addToOverlapMap(OverlapMap& overlapMap, RenderLayer* |
// FIXME: If this layer's overlap bounds include its children, we don't need to add its |
// children's bounds to the overlap map. |
layerBounds = enclosingIntRect(overlapMap.geometryMap().absoluteRect(layer->overlapBounds())); |
- // Empty rects never intersect, but we need them to for the purposes of overlap testing. |
- if (layerBounds.isEmpty()) |
- layerBounds.setSize(IntSize(1, 1)); |
boundsComputed = true; |
+ if (layerBounds.isEmpty()) |
+ return; |
} |
IntRect clipRect = pixelSnappedIntRect(layer->backgroundClipRect(RenderLayer::ClipRectsContext(rootRenderLayer(), 0, AbsoluteClipRects)).rect()); // FIXME: Incorrect for CSS regions. |
@@ -898,9 +897,6 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor |
// If we're testing for overlap, we only need to composite if we overlap something that is already composited. |
absBounds = enclosingIntRect(overlapMap->geometryMap().absoluteRect(layer->overlapBounds())); |
- // Empty rects never intersect, but we need them to for the purposes of overlap testing. |
- if (absBounds.isEmpty()) |
- absBounds.setSize(IntSize(1, 1)); |
haveComputedBounds = true; |
compositingReason = overlapMap->overlapsLayers(absBounds) ? RenderLayer::IndirectCompositingForOverlap : RenderLayer::NoIndirectCompositingReason; |
} |