+2007-08-08 Rob Buis <buis@kde.org>
+
+ Reviewed by Nikolas.
+
+ Added testcases for:
+ http://bugs.webkit.org/show_bug.cgi?id=11909
+ Regression: large SVG from Illustrator comes out blank
+
+ Also changed results are included, no pixel tests changed.
+
+ * svg/W3C-SVG-1.1/coords-viewattr-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/coords-viewattr-03-b-expected.txt:
+ * svg/W3C-SVG-1.1/filters-color-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/filters-comptran-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/filters-example-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt:
+ * svg/W3C-SVG-1.1/struct-symbol-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.txt:
+ * svg/carto.net/textbox-expected.txt:
+ * svg/custom/circular-marker-reference-4-expected.txt:
+ * svg/custom/container-opacity-clip-viewBox-expected.checksum: Added.
+ * svg/custom/container-opacity-clip-viewBox-expected.png: Added.
+ * svg/custom/container-opacity-clip-viewBox-expected.txt: Added.
+ * svg/custom/container-opacity-clip-viewBox.svg: Added.
+ * svg/custom/feComponentTransfer-Discrete-expected.txt:
+ * svg/custom/feComponentTransfer-Gamma-expected.txt:
+ * svg/custom/feComponentTransfer-Linear-expected.txt:
+ * svg/custom/feComponentTransfer-Table-expected.txt:
+ * svg/custom/marker-overflow-clip-expected.txt:
+ * svg/custom/preserve-aspect-ratio-syntax-expected.txt:
+ * svg/custom/root-container-opacity-clip-viewBox-expected.checksum: Added.
+ * svg/custom/root-container-opacity-clip-viewBox-expected.png: Added.
+ * svg/custom/root-container-opacity-clip-viewBox-expected.txt: Added.
+ * svg/custom/root-container-opacity-clip-viewBox.svg: Added.
+ * svg/custom/use-css-events-expected.txt:
+ * svg/custom/viewbox-syntax-expected.txt:
+
2007-08-08 Nikolas Zimmermann <zimmermann@kde.org>
Rubber stamped by Oliver.
--- /dev/null
+8f66467faafc097b1d9a3cbb1d8b8fa8
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (50,38.20) size 363x225.80
+ RenderSVGContainer {svg} at (59.52,38.20) size 166x148 [opacity=0.90]
+ RenderSVGContainer {g} at (59.52,38.20) size 166x148 [transform={m=((1.00,0.00)(0.00,1.00)) t=(59.52,38.20)}]
+ RenderSVGContainer {svg} at (59.52,38.20) size 166x148
+ RenderPath {rect} at (59.52,38.20) size 166x148 [fill={[type=SOLID] [color=#008000]}] [data="M-83.00,-84.00L83.00,-84.00L83.00,64.00L-83.00,64.00"]
+ RenderSVGContainer {g} at (50,216) size 363x48 [transform={m=((1.00,0.00)(0.00,1.00)) t=(50.00,230.00)}]
+ RenderSVGText {text} at (0,0) size 363x48 contains 3 chunk(s)
+ RenderSVGTSpan {tspan} at (0,0) size 261x18
+ RenderSVGInlineText {#text} at (0,-14) size 261x18
+ chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 45 width 261.00: "For this test case to be successful, the rect"
+ RenderSVGInlineText {#text} at (261,-14) size 4x18
+ chunk 1 text run 2 at (261.00,0.00) startOffset 0 endOffset 1 width 4.00: " "
+ RenderSVGTSpan {tspan} at (0,0) size 359x18
+ RenderSVGInlineText {#text} at (0,1) size 359x18
+ chunk 2 text run 1 at (0.00,15.00) startOffset 0 endOffset 55 width 359.00: "above should be .9 transparant green and 200x200 pixels"
+ RenderSVGInlineText {#text} at (359,1) size 4x18
+ chunk 2 text run 2 at (359.00,15.00) startOffset 0 endOffset 1 width 4.00: " "
+ RenderSVGTSpan {tspan} at (0,0) size 71x18
+ RenderSVGInlineText {#text} at (0,16) size 71x18
+ chunk 3 text run 1 at (0.00,30.00) startOffset 0 endOffset 9 width 71.00: "Bug 11909"
+ RenderSVGInlineText {#text} at (0,0) size 0x0
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+
+<svg opacity=".9">
+<g transform="matrix(1 0 0 1 59.5225 38.2007)">
+<svg width="200" height="200" viewBox="-83 -84 200 200">
+<rect x="-83" y="-84" width="166" height="148" fill="green"/>
+</svg>
+</g>
+</svg>
+
+ <g transform="matrix(1 0 0 1 50 230)" pointer-events="none" >
+ <text>
+ <tspan x="0" y="0">For this test case to be successful, the rect</tspan>
+ <tspan x="0" y="15">above should be .9 transparant green and 200x200 pixels</tspan>
+ <tspan x="0" y="30">Bug 11909</tspan>
+ </text>
+ </g>
+
+</svg>
--- /dev/null
+a217b7c5d6ca903e4b3724c42a815193
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 166x148 [opacity=0.90]
+ RenderSVGContainer {svg} at (0,0) size 166x148
+ RenderPath {rect} at (0,0) size 166x148 [fill={[type=SOLID] [color=#008000]}] [data="M-83.00,-84.00L83.00,-84.00L83.00,64.00L-83.00,64.00"]
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" opacity=".9">
+<svg width="200" height="200" viewBox="-83 -84 200 200">
+<rect x="-83" y="-84" width="166" height="148" fill="green"/>
+</svg>
+</svg>
+2007-08-08 Rob Buis <buis@kde.org>
+
+ Reviewed by Nikolas.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11909
+ Regression: large SVG from Illustrator comes out blank
+
+ Fix last issue with the Illustrator file by making relativeBBox
+ calculation take into account viewBox.
+
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::relativeBBox):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::relativeBBox):
+
2007-08-08 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Oliver.
for (; current != 0; current = current->nextSibling()) {
FloatRect childBBox = current->relativeBBox(includeStroke);
FloatRect mappedBBox = current->localTransform().mapRect(childBBox);
+ // <svg> can have a viewBox contributing to the bbox
+ if (current->isSVGContainer())
+ mappedBBox = static_cast<RenderSVGContainer*>(current)->viewportTransform().mapRect(mappedBBox);
rect.unite(mappedBBox);
}
#include "GraphicsContext.h"
#include "RenderPath.h"
+#include "RenderSVGContainer.h"
#include "RenderView.h"
#include "SVGLength.h"
#include "SVGRenderSupport.h"
for (; current != 0; current = current->nextSibling()) {
FloatRect childBBox = current->relativeBBox(includeStroke);
FloatRect mappedBBox = current->localTransform().mapRect(childBBox);
+ // <svg> can have a viewBox contributing to the bbox
+ if (current->isSVGContainer())
+ mappedBBox = static_cast<RenderSVGContainer*>(current)->viewportTransform().mapRect(mappedBBox);
rect.unite(mappedBBox);
}