Created attachment 81912 [details] Testcase The attached testcase shows an issue where a box-shadow gets drawn incorrectly behind another element sometimes.
The bug is that endShadowLayer() does graphicsContext->clipToImageBuffer(m_layerImage, FloatRect(m_layerOrigin, m_layerImage->size())); but not all of m_layerImage->size() was cleared, so may contains bits from some previous shadow.
Created attachment 81918 [details] Patch
http://trac.webkit.org/changeset/78173