2007-10-20 Nikolas Zimmermann <zimmermann@kde.org>
+ Reviewed by Eric.
+
+ Updated tests that dependant on display="none" / display="inline" for SVG text.
+
+ * platform/mac/svg/W3C-SVG-1.1/animate-elem-39-t-expected.checksum:
+ * platform/mac/svg/W3C-SVG-1.1/animate-elem-39-t-expected.png:
+ * platform/mac/svg/W3C-SVG-1.1/animate-elem-39-t-expected.txt:
+ * platform/mac/svg/carto.net/tabgroup-expected.checksum:
+ * platform/mac/svg/carto.net/tabgroup-expected.png:
+ * platform/mac/svg/carto.net/tabgroup-expected.txt:
+ * svg/batik/text/textProperties2-expected.checksum:
+ * svg/batik/text/textProperties2-expected.png:
+ * svg/batik/text/textProperties2-expected.txt:
+
+2007-10-20 Nikolas Zimmermann <zimmermann@kde.org>
+
Reviewed by Oliver.
Updated tests that need textLength/lengthAdjust/kerning support.
-12bc0ec155f91244e4e5e7f0902707fd
\ No newline at end of file
+eec6a62f624f5a52ebe85307b423e58f
\ No newline at end of file
RenderSVGText {text} at (-15,10) size 30x36 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,-28) size 30x36
chunk 1 (middle anchor) text run 1 at (-15.00,10.00) startOffset 0 endOffset 2 width 30.00: "38"
- RenderSVGText {text} at (-15,10) size 30x36 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,-28) size 30x36
- chunk 1 (middle anchor) text run 1 at (-15.00,10.00) startOffset 0 endOffset 2 width 30.00: "02"
RenderSVGText {text} at (-13,60) size 25x18 contains 1 chunk(s)
RenderSVGInlineText {#text} at (1,-14) size 25x18
chunk 1 (middle anchor) text run 1 at (-12.50,60.00) startOffset 0 endOffset 3 width 25.00: "<a>"
RenderSVGText {text} at (-15,10) size 30x36 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,-28) size 30x36
chunk 1 (middle anchor) text run 1 at (-15.00,10.00) startOffset 0 endOffset 2 width 30.00: "09"
- RenderSVGText {text} at (-15,10) size 30x36 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,-28) size 30x36
- chunk 1 (middle anchor) text run 1 at (-15.00,10.00) startOffset 0 endOffset 2 width 30.00: "03"
RenderSVGText {text} at (-13,60) size 25x18 contains 1 chunk(s)
RenderSVGInlineText {#text} at (1,-14) size 25x18
chunk 1 (middle anchor) text run 1 at (-12.50,60.00) startOffset 0 endOffset 3 width 25.00: "<a>"
-c1172813cabb5ce29a977eb9c713789d
\ No newline at end of file
+853de00567d121bea0b7bece66a5d61c
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
- RenderSVGRoot {svg} at (7.81,34.38) size 214.06x34.38
+ RenderSVGRoot {svg} at (0,0) size 0x0
RenderSVGContainer {g} at (195.31,7.81) size 0x0 [transform={m=((-0.00,1.00)(-1.00,-0.00)) t=(250.00,10.00)}]
RenderSVGContainer {g} at (0,0) size 0x0
RenderSVGContainer {g} at (0,0) size 0x0
RenderSVGContainer {g} at (0,0) size 0x0
RenderSVGContainer {g} at (568.35,-134.18) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(727.49,-171.75)}]
- RenderSVGText {text} at (10,55) size 274x44 contains 3 chunk(s)
- RenderSVGInlineText {#text} at (0,-11) size 241x14
- chunk 1 text run 1 at (10.00,55.00) startOffset 0 endOffset 46 width 241.00: "This is a tabgroup with triangular tab corners"
- RenderSVGTSpan {tspan} at (0,0) size 274x14
- RenderSVGInlineText {#text} at (0,4) size 274x14
- chunk 2 text run 1 at (10.00,70.00) startOffset 0 endOffset 53 width 274.00: "and a double line tab. (use \"\\n\" as a line separator)"
- RenderSVGTSpan {tspan} at (0,0) size 255x14
- RenderSVGInlineText {#text} at (0,19) size 255x14
- chunk 3 text run 1 at (10.00,85.00) startOffset 0 endOffset 47 width 255.00: "Click on the second tab to see oversize content"
- RenderSVGText {text} at (10,55) size 270x14 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,-11) size 270x14
- chunk 1 text run 1 at (10.00,55.00) startOffset 0 endOffset 49 width 270.00: "Please contact our sales person to get an account"
- RenderSVGText {text} at (10,55) size 36x14 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,-11) size 36x14
- chunk 1 text run 1 at (10.00,55.00) startOffset 0 endOffset 5 width 36.00: "RTFM!"
-284376ddf9e60a71c31b7373544f533a
\ No newline at end of file
+65d81860bf89f10e922cbb5987ed2534
\ No newline at end of file
RenderSVGText {text} at (360,323) size 113x18 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,-14) size 113x18
chunk 1 text run 1 at (360.00,323.00) startOffset 0 endOffset 18 width 113.00: "none, inline, none"
- RenderSVGContainer {g} at (25,82.50) size 342.50x247.50 [transform={m=((1.25,0.00)(0.00,1.25)) t=(0.00,12.50)}]
+ RenderSVGContainer {g} at (25,82.50) size 342.50x222.50 [transform={m=((1.25,0.00)(0.00,1.25)) t=(0.00,12.50)}]
RenderSVGText {text} at (20,70) size 274x18 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,-14) size 33x18
chunk 1 text run 1 at (20.00,70.00) startOffset 0 endOffset 5 width 33.00: "Text "
chunk 1 text run 1 at (20.00,230.00) startOffset 0 endOffset 5 width 33.00: "Text "
RenderSVGInlineText {#text} at (33,-14) size 62x18
chunk 1 text run 2 at (53.00,230.00) startOffset 0 endOffset 11 width 62.00: "finish text"
- RenderSVGText {text} at (20,250) size 225x18 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,-14) size 33x18
- chunk 1 text run 1 at (20.00,250.00) startOffset 0 endOffset 5 width 33.00: "Text "
- RenderSVGTSpan {tspan} at (0,0) size 126x18
- RenderSVGInlineText {#text} at (33,-14) size 49x18
- chunk 1 text run 2 at (53.00,250.00) startOffset 0 endOffset 8 width 49.00: "tspan 1 "
- RenderSVGInlineText {#text} at (82,-14) size 77x18
- chunk 1 text run 3 at (102.00,250.00) startOffset 0 endOffset 11 width 77.00: "more span 1"
- RenderSVGInlineText {#text} at (159,-14) size 66x18
- chunk 1 text run 4 at (179.00,250.00) startOffset 0 endOffset 12 width 66.00: " finish text"
RenderSVGContainer {use} at (0,0) size 0x0
+2007-10-20 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Eric.
+
+ Fix non-functional display="inline" / display="none" for SVG text.
+
+ Fixes: svg/W3C-SVG-1.1/animate-elem-39-t.svg (display="inline" support)
+ Fixes: svg/batik/text/textProperties2.svg (display="inline/none" support)
+ Fixes: svg/carto.net/tabgroup.svg (display="none" support, stray content before layouting)
+
+ * css/svg.css: Remove "important" flag on text/foreignObject display: block property
+ * rendering/RenderSVGBlock.cpp:
+ (WebCore::RenderSVGBlock::setStyle):
+
2007-10-20 Mark Rowe <mrowe@apple.com>
Reviewed by Alp.
}
text, foreignObject {
- display: block !important
+ display: block
}
text, tspan, textPath {
* This file is part of the WebKit project.
*
* Copyright (C) 2006 Apple Computer, Inc.
+ * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#include "config.h"
#if ENABLE(SVG)
-
#include "RenderSVGBlock.h"
+
#include "SVGElement.h"
-namespace WebCore
-{
+namespace WebCore {
+
RenderSVGBlock::RenderSVGBlock(SVGElement* node)
: RenderBlock(node)
{
void RenderSVGBlock::setStyle(RenderStyle* style)
{
- RenderBlock::setStyle(style);
+ RenderStyle* useStyle = style;
+
+ // SVG text layout code expects us to be a block-level style element.
+ if (useStyle->display() == NONE)
+ setChildrenInline(false);
+ else if (useStyle->isDisplayInlineType()) {
+ useStyle = new (renderArena()) RenderStyle();
+ useStyle->inheritFrom(style);
+ useStyle->setDisplay(BLOCK);
+ }
+
+ RenderBlock::setStyle(useStyle);
+ setReplaced(false);
+
//FIXME: Once overflow rules are supported by SVG we should
//probably map the CSS overflow rules rather than just ignoring
//them