| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index 3e2f9593c55f7ba2573bbfbb03a283ad09f74936..09c7fea0c69a181f322a55459771b8bda6b7c644 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -555,11 +555,11 @@
|
| ClipRectsContext clipRectsContext(compositingAncestor, UncachedClipRects,
|
| IgnoreOverlayScrollbarSize);
|
| clipRectsContext.setIgnoreOverflowClip();
|
| - LayoutRect unsnappedParentClipRect =
|
| - m_owningLayer.clipper(PaintLayer::DoNotUseGeometryMapper)
|
| - .backgroundClipRect(clipRectsContext)
|
| - .rect();
|
| - IntRect parentClipRect = pixelSnappedIntRect(unsnappedParentClipRect);
|
| +
|
| + ClipRect clipRect;
|
| + m_owningLayer.clipper(PaintLayer::DoNotUseGeometryMapper)
|
| + .calculateBackgroundClipRect(clipRectsContext, clipRect);
|
| + IntRect parentClipRect = pixelSnappedIntRect(clipRect.rect());
|
| owningLayerIsClipped = parentClipRect != LayoutRect::infiniteIntRect();
|
|
|
| // TODO(schenney): CSS clips are not applied to composited children, and
|
| @@ -1152,20 +1152,23 @@
|
| ClipRectsContext clipRectsContext(compositingContainer,
|
| PaintingClipRectsIgnoringOverflowClip,
|
| IgnoreOverlayScrollbarSize);
|
| - IntRect parentClipRect = pixelSnappedIntRect(
|
| - m_owningLayer.clipper(PaintLayer::DoNotUseGeometryMapper)
|
| - .backgroundClipRect(clipRectsContext)
|
| - .rect());
|
| - ASSERT(parentClipRect != LayoutRect::infiniteIntRect());
|
| - m_ancestorClippingLayer->setPosition(
|
| - FloatPoint(parentClipRect.location() - graphicsLayerParentLocation));
|
| - m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size()));
|
| +
|
| + ClipRect parentClipRect;
|
| + m_owningLayer.clipper(PaintLayer::DoNotUseGeometryMapper)
|
| + .calculateBackgroundClipRect(clipRectsContext, parentClipRect);
|
| +
|
| + IntRect snappedParentClipRect(pixelSnappedIntRect(parentClipRect.rect()));
|
| +
|
| + DCHECK(snappedParentClipRect != LayoutRect::infiniteIntRect());
|
| + m_ancestorClippingLayer->setPosition(FloatPoint(
|
| + snappedParentClipRect.location() - graphicsLayerParentLocation));
|
| + m_ancestorClippingLayer->setSize(FloatSize(snappedParentClipRect.size()));
|
|
|
| // backgroundRect is relative to compositingContainer, so subtract
|
| // snappedOffsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y
|
| // to get back to local coords.
|
| m_ancestorClippingLayer->setOffsetFromLayoutObject(
|
| - parentClipRect.location() - snappedOffsetFromCompositedAncestor);
|
| + snappedParentClipRect.location() - snappedOffsetFromCompositedAncestor);
|
|
|
| if (m_ancestorClippingMaskLayer) {
|
| m_ancestorClippingMaskLayer->setOffsetFromLayoutObject(
|
| @@ -1176,7 +1179,7 @@
|
|
|
| // The primary layer is then parented in, and positioned relative to this
|
| // clipping layer.
|
| - graphicsLayerParentLocation = parentClipRect.location();
|
| + graphicsLayerParentLocation = snappedParentClipRect.location();
|
| }
|
|
|
| void CompositedLayerMapping::updateOverflowControlsHostLayerGeometry(
|
| @@ -2876,17 +2879,18 @@
|
| // these clip rects or otherwise optimizing.
|
| ClipRectsContext clipRectsContext(ancestorPaintInfo->paintLayer,
|
| UncachedClipRects);
|
| - IntRect parentClipRect = pixelSnappedIntRect(
|
| - paintInfo.paintLayer->clipper(PaintLayer::DoNotUseGeometryMapper)
|
| - .backgroundClipRect(clipRectsContext)
|
| - .rect());
|
| - ASSERT(parentClipRect != LayoutRect::infiniteIntRect());
|
| + ClipRect parentClipRect;
|
| + paintInfo.paintLayer->clipper(PaintLayer::DoNotUseGeometryMapper)
|
| + .calculateBackgroundClipRect(clipRectsContext, parentClipRect);
|
| +
|
| + IntRect snappedParentClipRect(pixelSnappedIntRect(parentClipRect.rect()));
|
| + DCHECK(snappedParentClipRect != LayoutRect::infiniteIntRect());
|
|
|
| // Convert from ancestor to local coordinates.
|
| IntSize ancestorToLocalOffset = paintInfo.offsetFromLayoutObject -
|
| ancestorPaintInfo->offsetFromLayoutObject;
|
| - parentClipRect.move(ancestorToLocalOffset);
|
| - return parentClipRect;
|
| + snappedParentClipRect.move(ancestorToLocalOffset);
|
| + return snappedParentClipRect;
|
| }
|
|
|
| void CompositedLayerMapping::doPaintTask(
|
|
|