diff --git a/gfx/layers/basic/BasicLayers.cpp b/gfx/layers/basic/BasicLayers.cpp index e5ee29b624c..f9992e7e94f 100644 --- a/gfx/layers/basic/BasicLayers.cpp +++ b/gfx/layers/basic/BasicLayers.cpp @@ -515,7 +515,10 @@ BasicThebesLayerBuffer::DrawTo(ThebesLayer* aLayer, IsClippingCheap(aTarget, aLayer->GetVisibleRegion())) { // We don't want to draw invalid stuff, so we need to clip. Might as // well clip to the smallest area possible --- the visible region. - gfxUtils::ClipToRegion(aTarget, aLayer->GetVisibleRegion()); + // Bug 599189 if there is a non-integer-translation transform in aTarget, + // we might sample pixels outside GetVisibleRegion(), which is wrong + // and may cause gray lines. + gfxUtils::ClipToRegionSnapped(aTarget, aLayer->GetVisibleRegion()); } if (aIsOpaqueContent) { aTarget->SetOperator(gfxContext::OPERATOR_SOURCE);