+2007-06-26 Rob Buis <buis@kde.org>
+
+ Reviewed by Maciej.
+
+ Testcase for:
+ http://bugs.webkit.org/show_bug.cgi?id=9976
+ Fix negative width issue in Hixie's test
+
+ * svg/hixie/error/013-broken-expected.checksum: Removed.
+ * svg/hixie/error/013-broken-expected.png: Removed.
+ * svg/hixie/error/013-broken-expected.txt: Removed.
+ * svg/hixie/error/013-broken.xml: Removed.
+ * svg/hixie/error/013-expected.checksum: Added.
+ * svg/hixie/error/013-expected.png: Added.
+ * svg/hixie/error/013-expected.txt: Added.
+
2007-06-26 Rob Buis <buis@kde.org>
Reviewed by Maciej.
--- /dev/null
+5d4145e5756207e345bc55e61e97c212
\ No newline at end of file
--- /dev/null
+CONSOLE MESSAGE: line 10: Error: A negative value for svg attribute <width> is not allowed
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x100
+ RenderBlock {html} at (0,0) size 800x100
+ RenderBody {body} at (8,8) size 784x76
+ RenderBlock (anonymous) at (0,0) size 784x24
+ RenderSVGContainer {svg} at (18,28) size 125x13
+ RenderSVGText {text} at (10,30) size 125x13 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,-10) size 125x13
+ chunk 1 text run 1 at (10.00,30.00) startOffset 0 endOffset 30 width 125.00: "FAIL (This should not render.)"
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {p} at (0,40) size 784x36 [color=#008000]
+ RenderText {#text} at (0,0) size 749x36
+ text run at (0,0) width 417: "This line should be green, the word \"FAIL\" should not appear on "
+ text run at (417,0) width 332: "this page, but a highly perceivable indication of error"
+ text run at (0,18) width 65: "should be "
+ text run at (65,18) width 125: "present somewhere."
+2007-06-26 Rob Buis <buis@kde.org>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9976
+ Fix negative width issue in Hixie's test
+
+ Refuse to render zero or negative width/height.
+
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::paint):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::paint):
+
2007-06-26 Rob Buis <buis@kde.org>
Reviewed by Maciej.
if (paintInfo.context->paintingDisabled() || !drawsContents())
return;
+ // A value of zero disables rendering of the element.
+ if (!viewport().isEmpty() && (viewport().width() <= 0. || viewport().height() <= 0.))
+ return;
+
if (!firstChild()) {
#if ENABLE(SVG_EXPERIMENTAL_FEATURES)
// Spec: groups w/o children still may render filter content.
if (paintInfo.context->paintingDisabled())
return;
+ // A value of zero disables rendering of the element.
+ if (viewport().width() <= 0. || viewport().height() <= 0.)
+ return;
+
// This should only exist for <svg> renderers
if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
paintBoxDecorations(paintInfo, m_x + parentX, m_y + parentY);