Copied: branches/safari-534-branch/LayoutTests/platform/mac/fast/box-shadow/scaled-box-shadow-expected.txt (from rev 87009, trunk/LayoutTests/platform/mac/fast/box-shadow/scaled-box-shadow-expected.txt) (0 => 87217)
--- branches/safari-534-branch/LayoutTests/platform/mac/fast/box-shadow/scaled-box-shadow-expected.txt (rev 0)
+++ branches/safari-534-branch/LayoutTests/platform/mac/fast/box-shadow/scaled-box-shadow-expected.txt 2011-05-24 22:20:20 UTC (rev 87217)
@@ -0,0 +1,29 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x592
+ RenderBlock {HTML} at (0,0) size 800x592
+ RenderBody {BODY} at (8,8) size 784x576
+ RenderBlock {DIV} at (4,4) size 280x280
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (288,130) size 4x18
+ text run at (288,130) width 4: " "
+ RenderBlock {DIV} at (296,4) size 280x280
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (580,130) size 4x18
+ text run at (580,130) width 4: " "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderBlock {DIV} at (4,292) size 280x280
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (288,418) size 4x18
+ text run at (288,418) width 4: " "
+ RenderBlock {DIV} at (296,292) size 280x280
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+layer at (52,52) size 100x100
+ RenderBlock (relative positioned) {DIV} at (40,40) size 100x100
+layer at (344,52) size 100x100
+ RenderBlock (relative positioned) {DIV} at (40,40) size 100x100
+layer at (52,340) size 100x100
+ RenderBlock (relative positioned) {DIV} at (40,40) size 100x100
+layer at (344,340) size 100x100
+ RenderBlock (relative positioned) {DIV} at (40,40) size 100x100
Modified: branches/safari-534-branch/Source/WebCore/platform/graphics/ShadowBlur.cpp (87216 => 87217)
--- branches/safari-534-branch/Source/WebCore/platform/graphics/ShadowBlur.cpp 2011-05-24 22:17:07 UTC (rev 87216)
+++ branches/safari-534-branch/Source/WebCore/platform/graphics/ShadowBlur.cpp 2011-05-24 22:20:20 UTC (rev 87217)
@@ -482,7 +482,7 @@
// drawRectShadowWithTiling does not work with rotations.
// https://bugs.webkit.org/show_bug.cgi?id=45042
- if (!graphicsContext->getCTM().isIdentityOrTranslationOrFlipped() || m_type != BlurShadow) {
+ if (!graphicsContext->getCTM().preservesAxisAlignment() || m_type != BlurShadow) {
drawRectShadowWithoutTiling(graphicsContext, shadowedRect, radii, layerRect);
return;
}
@@ -509,7 +509,7 @@
// drawInsetShadowWithTiling does not work with rotations.
// https://bugs.webkit.org/show_bug.cgi?id=45042
- if (!graphicsContext->getCTM().isIdentityOrTranslationOrFlipped() || m_type != BlurShadow) {
+ if (!graphicsContext->getCTM().preservesAxisAlignment() || m_type != BlurShadow) {
drawInsetShadowWithoutTiling(graphicsContext, rect, holeRect, holeRadii, layerRect);
return;
}
@@ -762,49 +762,51 @@
// Note that drawing the ImageBuffer is faster than creating a Image and drawing that,
// because ImageBuffer::draw() knows that it doesn't have to copy the image bits.
+ FloatRect centerRect(shadowBounds.x() + leftSlice, shadowBounds.y() + topSlice, centerWidth, centerHeight);
+ centerRect = graphicsContext->roundToDevicePixels(centerRect);
// Top side.
FloatRect tileRect = FloatRect(leftSlice, 0, templateSideLength, topSlice);
- FloatRect destRect = FloatRect(shadowBounds.x() + leftSlice, shadowBounds.y(), centerWidth, topSlice);
+ FloatRect destRect = FloatRect(centerRect.x(), centerRect.y() - topSlice, centerRect.width(), topSlice);
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
// Draw the bottom side.
tileRect.setY(templateSize.height() - bottomSlice);
tileRect.setHeight(bottomSlice);
- destRect.setY(shadowBounds.maxY() - bottomSlice);
+ destRect.setY(centerRect.maxY());
destRect.setHeight(bottomSlice);
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
// Left side.
tileRect = FloatRect(0, topSlice, leftSlice, templateSideLength);
- destRect = FloatRect(shadowBounds.x(), shadowBounds.y() + topSlice, leftSlice, centerHeight);
+ destRect = FloatRect(centerRect.x() - leftSlice, centerRect.y(), leftSlice, centerRect.height());
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
// Right side.
tileRect.setX(templateSize.width() - rightSlice);
tileRect.setWidth(rightSlice);
- destRect.setX(shadowBounds.maxX() - rightSlice);
+ destRect.setX(centerRect.maxX());
destRect.setWidth(rightSlice);
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
// Top left corner.
tileRect = FloatRect(0, 0, leftSlice, topSlice);
- destRect = FloatRect(shadowBounds.x(), shadowBounds.y(), leftSlice, topSlice);
+ destRect = FloatRect(centerRect.x() - leftSlice, centerRect.y() - topSlice, leftSlice, topSlice);
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
// Top right corner.
tileRect = FloatRect(templateSize.width() - rightSlice, 0, rightSlice, topSlice);
- destRect = FloatRect(shadowBounds.maxX() - rightSlice, shadowBounds.y(), rightSlice, topSlice);
+ destRect = FloatRect(centerRect.maxX(), centerRect.y() - topSlice, rightSlice, topSlice);
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
// Bottom right corner.
tileRect = FloatRect(templateSize.width() - rightSlice, templateSize.height() - bottomSlice, rightSlice, bottomSlice);
- destRect = FloatRect(shadowBounds.maxX() - rightSlice, shadowBounds.maxY() - bottomSlice, rightSlice, bottomSlice);
+ destRect = FloatRect(centerRect.maxX(), centerRect.maxY(), rightSlice, bottomSlice);
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
// Bottom left corner.
tileRect = FloatRect(0, templateSize.height() - bottomSlice, leftSlice, bottomSlice);
- destRect = FloatRect(shadowBounds.x(), shadowBounds.maxY() - bottomSlice, leftSlice, bottomSlice);
+ destRect = FloatRect(centerRect.x() - leftSlice, centerRect.maxY(), leftSlice, bottomSlice);
graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
}