+2007-06-15 Rob Buis <buis@kde.org>
+
+ Reviewed by Eric.
+
+ Testcase for:
+ http://bugs.webkit.org/show_bug.cgi?id=14051
+ <svg:image> fails to position correctly when <svg> is inside an inline <div>
+
+ * svg/custom/image-parent-translation-expected.checksum: Added.
+ * svg/custom/image-parent-translation-expected.png: Added.
+ * svg/custom/image-parent-translation-expected.txt: Added.
+ * svg/custom/image-parent-translation.xhtml: Added.
+
2007-06-14 Rob Buis <buis@kde.org>
Reviewed by Eric.
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x218
+ RenderBlock {html} at (0,0) size 800x218
+ RenderBody {body} at (8,21) size 784x189
+ RenderBlock {h1} at (0,0) size 784x37
+ RenderText {#text} at (0,0) size 495x37
+ text run at (0,0) width 495: "SVG Images in Inline CSS Elements"
+ RenderBlock {p} at (0,58) size 784x36
+ RenderText {#text} at (0,0) size 756x36
+ text run at (0,0) width 756: "The two following blocks should display side-by-side a 75x75 pixels image with a 3 pixels border overlaid on top of the"
+ text run at (0,18) width 127: "image (Bug 14051)."
+ RenderBlock (anonymous) at (0,110) size 784x79
+ RenderInline {div} at (0,0) size 79x18
+ RenderText {#text} at (0,0) size 0x0
+ RenderSVGContainer {svg} at (5,128) size 81x81
+ RenderImage {image} at (0,0) size 75x75
+ RenderPath {rect} at (5,128) size 81x81 [stroke={[type=SOLID] [color=#FF0000] [stroke width=6.00]}] [data="M0.00,0.00L75.00,0.00L75.00,75.00L0.00,75.00"]
+ RenderText {#text} at (75,61) size 4x18
+ text run at (75,61) width 4: " "
+ RenderText {#text} at (0,0) size 0x0
+ RenderInline {div} at (0,0) size 75x18
+ RenderText {#text} at (0,0) size 0x0
+ RenderSVGContainer {svg} at (5,128) size 81x81
+ RenderImage {image} at (0,0) size 75x75
+ RenderPath {rect} at (5,128) size 81x81 [stroke={[type=SOLID] [color=#FF0000] [stroke width=6.00]}] [data="M0.00,0.00L75.00,0.00L75.00,75.00L0.00,75.00"]
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
--- /dev/null
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <head>
+ <title> <svg:image> fails to position correctly when <svg> is inside an inline <div> (Bug 14051)</title>
+ <style>
+ div {
+ display: inline;
+ }
+ </style>
+ </head>
+
+ <body>
+ <h1>SVG Images in Inline CSS Elements</h1>
+ <p>
+ The two following blocks should display side-by-side a 75x75 pixels image with a 3 pixels border overlaid on top of the image (Bug 14051).
+ </p>
+ <div>
+ <svg xmlns="http://www.w3.org/2000/svg" width="75" height="75">
+ <image xlink:href="resources/green-checker.png" width="75" height="75" />
+ <rect width="75" height="75" stroke="red" stroke-width="6" fill="none" />
+ </svg>
+ </div>
+ <div>
+ <svg xmlns="http://www.w3.org/2000/svg" width="75" height="75">
+ <image xlink:href="resources/green-checker.png" width="75" height="75" />
+ <rect width="75" height="75" stroke="red" stroke-width="6" fill="none" />
+ </svg>
+ </div>
+ </body>
+</html>
}
}
-void RenderSVGImage::paint(PaintInfo& paintInfo, int parentX, int parentY)
+void RenderSVGImage::paint(PaintInfo& paintInfo, int, int)
{
if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN)
return;
paintInfo.context->save();
- paintInfo.context->concatCTM(AffineTransform().translate(parentX, parentY));
paintInfo.context->concatCTM(localTransform());
paintInfo.context->concatCTM(translationForAttributes());
}
if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth())
- paintOutline(paintInfo.context, parentX, parentY, width(), height(), style());
+ paintOutline(paintInfo.context, 0, 0, width(), height(), style());
paintInfo.context->restore();
}