Changeset 56776 in webkit
- Timestamp:
- Mar 30, 2010 4:30:35 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r56775 r56776 1 2010-03-30 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVG Glyph transformations wrong on use of SVGFont 6 https://bugs.webkit.org/show_bug.cgi?id=36731 7 8 Test of correct scaled kerning, if userSpace on SVGFont doesn't 9 match the scaling of the viewport userSpace. 10 11 * platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt: 12 * platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt: 13 * platform/mac/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt: 14 * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt: 15 * platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt: 16 * svg/custom/glyph-transformation-with-hkern.svg: Added. 17 * svg/custom/resources/SVGFreeSans.svg: Added. 18 1 19 2010-03-30 Dirk Schulze <krit@webkit.org> 2 20 -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt
r54483 r56776 17 17 chunk 1 (middle anchor) text run 1 at (206.00,30.00) startOffset 0 endOffset 7 width 68.00: "<hkern>" 18 18 RenderSVGContainer {g} at (9,59) size 471x217 [transform={m=((1.00,0.00)(0.00,1.00)) t=(30.00,60.00)}] 19 RenderSVGContainer {g} at (9,59) size 471x5219 RenderSVGContainer {g} at (9,59) size 222x52 20 20 RenderSVGContainer {g} at (9,59) size 22x52 21 21 RenderPath {rect} at (9,59) size 22x52 [stroke={[type=SOLID] [color=#000000]}] [data="M-20.00,0.00 L0.00,0.00 L0.00,50.00 L-20.00,50.00 Z"] … … 32 32 RenderSVGInlineText {#text} at (0,-11) size 73x14 33 33 chunk 1 text run 1 at (5.00,15.00) startOffset 0 endOffset 13 width 73.00: "u1=\"1\" u2=\"2\"" 34 RenderSVGContainer {g} at (31,81) size 449x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}]34 RenderSVGContainer {g} at (31,81) size 54x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}] 35 35 RenderSVGContainer {use} at (31,81) size 28x28 36 36 RenderSVGContainer {g} at (31,81) size 28x28 … … 45 45 RenderPath {line} at (59,103) size 26x4 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#8888FF]}] [data="M0.00,0.00 L12.00,0.00"] 46 46 RenderPath {rect} at (55,101) size 10x8 [fill={[type=SOLID] [color=#FF0000]}] [data="M-2.00,-2.00 L2.00,-2.00 L2.00,2.00 L-2.00,2.00 Z"] 47 RenderSVGText {text} at (0,0) size 1 008x11 contains 1 chunk(s)48 RenderSVGInlineText {#text} at (0,-9) size 1 008x1147 RenderSVGText {text} at (0,0) size 18x11 contains 1 chunk(s) 48 RenderSVGInlineText {#text} at (0,-9) size 18x11 49 49 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 2 width 7.50: "12" 50 RenderSVGContainer {g} at (9,114) size 471x52 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,55.00)}]50 RenderSVGContainer {g} at (9,114) size 222x52 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,55.00)}] 51 51 RenderSVGContainer {g} at (9,114) size 22x52 52 52 RenderPath {rect} at (9,114) size 22x52 [stroke={[type=SOLID] [color=#000000]}] [data="M-20.00,0.00 L0.00,0.00 L0.00,50.00 L-20.00,50.00 Z"] … … 63 63 RenderSVGInlineText {#text} at (0,-14) size 138x18 64 64 chunk 1 text run 1 at (5.00,15.00) startOffset 0 endOffset 19 width 138.00: "g1=\"gl_1\" g2=\"gl_2\"" 65 RenderSVGContainer {g} at (31,136) size 449x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}]65 RenderSVGContainer {g} at (31,136) size 74x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}] 66 66 RenderSVGContainer {use} at (31,136) size 28x28 67 67 RenderSVGContainer {g} at (31,136) size 28x28 … … 76 76 RenderPath {line} at (79,158) size 26x4 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#8888FF]}] [data="M0.00,0.00 L12.00,0.00"] 77 77 RenderPath {rect} at (75,156) size 10x8 [fill={[type=SOLID] [color=#FF0000]}] [data="M-2.00,-2.00 L2.00,-2.00 L2.00,2.00 L-2.00,2.00 Z"] 78 RenderSVGText {text} at (0,0) size 2 008x11 contains 1 chunk(s)79 RenderSVGInlineText {#text} at (0,-9) size 2 008x1178 RenderSVGText {text} at (0,0) size 28x11 contains 1 chunk(s) 79 RenderSVGInlineText {#text} at (0,-9) size 28x11 80 80 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 2 width 7.50: "12" 81 81 RenderSVGContainer {g} at (9,169) size 266x52 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,110.00)}] … … 223 223 RenderSVGInlineText {#text} at (0,-14) size 208x18 224 224 chunk 1 text run 1 at (5.00,15.00) startOffset 0 endOffset 26 width 208.00: "u1=\"U+003?\" u2=\"U+0031-34\"" 225 RenderSVGContainer {g} at (271,136) size 209x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}]225 RenderSVGContainer {g} at (271,136) size 168x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}] 226 226 RenderSVGContainer {use} at (271,136) size 28x28 227 227 RenderSVGContainer {g} at (271,136) size 28x28 … … 248 248 RenderPath {line} at (415,158) size 24x4 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#8888FF]}] [data="M0.00,0.00 L12.00,0.00"] 249 249 RenderPath {rect} at (411,156) size 8x8 [fill={[type=SOLID] [color=#FF0000]}] [data="M-2.00,-2.00 L2.00,-2.00 L2.00,2.00 L-2.00,2.00 Z"] 250 RenderSVGText {text} at (0,0) size 4535x11 contains 1 chunk(s)251 RenderSVGInlineText {#text} at (0,-9) size 4535x11252 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 4 width 35.00: "1234" 253 RenderSVGContainer {g} at (249,169) size 2 31x52 [transform={m=((1.00,0.00)(0.00,1.00)) t=(240.00,110.00)}]250 RenderSVGText {text} at (0,0) size 80x11 contains 1 chunk(s) 251 RenderSVGInlineText {#text} at (0,-9) size 80x11 252 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 4 width 35.00: "1234" 253 RenderSVGContainer {g} at (249,169) size 222x52 [transform={m=((1.00,0.00)(0.00,1.00)) t=(240.00,110.00)}] 254 254 RenderSVGContainer {g} at (249,169) size 22x52 255 255 RenderPath {rect} at (249,169) size 22x52 [stroke={[type=SOLID] [color=#000000]}] [data="M-20.00,0.00 L0.00,0.00 L0.00,50.00 L-20.00,50.00 Z"] … … 266 266 RenderSVGInlineText {#text} at (0,-14) size 118x18 267 267 chunk 1 text run 1 at (5.00,15.00) startOffset 0 endOffset 16 width 118.00: "u1=\"1\" g2=\"gl_2\"" 268 RenderSVGContainer {g} at (271,191) size 209x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}]268 RenderSVGContainer {g} at (271,191) size 60x28 [transform={m=((2.00,0.00)(0.00,2.00)) t=(5.00,45.00)}] 269 269 RenderSVGContainer {use} at (271,191) size 28x28 270 270 RenderSVGContainer {g} at (271,191) size 28x28 … … 279 279 RenderPath {line} at (299,213) size 26x4 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#8888FF]}] [data="M0.00,0.00 L12.00,0.00"] 280 280 RenderPath {rect} at (295,211) size 10x8 [fill={[type=SOLID] [color=#FF0000]}] [data="M-2.00,-2.00 L2.00,-2.00 L2.00,2.00 L-2.00,2.00 Z"] 281 RenderSVGText {text} at (0,0) size 1018x11 contains 1 chunk(s)282 RenderSVGInlineText {#text} at (0,-9) size 1018x11281 RenderSVGText {text} at (0,0) size 28x11 contains 1 chunk(s) 282 RenderSVGInlineText {#text} at (0,-9) size 28x11 283 283 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 2 width 17.50: "12" 284 284 RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(320.00,100.00)}] -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt
r54991 r56776 40 40 RenderPath {rect} at (60,250) size 200x25 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M60.00,250.00 L260.00,250.00 L260.00,275.00 L60.00,275.00 Z"] 41 41 RenderPath {rect} at (60,275) size 200x25 [fill={[type=SOLID] [color=#FFFFFF] [opacity=0.70]}] [data="M60.00,275.00 L260.00,275.00 L260.00,300.00 L60.00,300.00 Z"] 42 RenderSVGText {text} at (60,280) size 1 62x110 contains 1 chunk(s)42 RenderSVGText {text} at (60,280) size 126x110 contains 1 chunk(s) 43 43 [masker="mask3"] RenderSVGResourceMasker {mask} at (60,200) size 200x100 44 RenderSVGInlineText {#text} at (0,-77) size 1 62x11044 RenderSVGInlineText {#text} at (0,-77) size 126x110 45 45 [masker="mask3"] RenderSVGResourceMasker {mask} at (60,200) size 200x100 46 46 chunk 1 text run 1 at (60.00,280.00) startOffset 0 endOffset 3 width 121.33: "SVG" -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt
r54483 r56776 17 17 RenderPath {rect} at (34,16) size 418x283 [stroke={[type=SOLID] [color=#000000]}] [data="M20.00,10.00 L250.00,10.00 L250.00,165.00 L20.00,165.00 Z"] 18 18 RenderSVGContainer {g} at (54,10) size 382x269 [opacity=0.50] 19 RenderSVGText {text} at (30,90) size 1 73x120 contains 1 chunk(s)20 RenderSVGInlineText {#text} at (0,-84) size 1 73x12019 RenderSVGText {text} at (30,90) size 138x120 contains 1 chunk(s) 20 RenderSVGInlineText {#text} at (0,-84) size 138x120 21 21 chunk 1 text run 1 at (30.00,90.00) startOffset 0 endOffset 3 width 132.36: "SVG" 22 22 RenderPath {rect} at (126,99) size 234x126 [fill={[type=SOLID] [color=#820032]}] [data="M70.00,55.00 L200.00,55.00 L200.00,125.00 L70.00,125.00 Z"] -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt
r54483 r56776 16 16 RenderPath {line} at (435,18) size 30x297 [stroke={[type=SOLID] [color=#FFFFFF] [stroke width=15.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M250.00,10.00 L250.00,175.00"] 17 17 RenderPath {rect} at (34,16) size 418x283 [stroke={[type=SOLID] [color=#000000]}] [data="M20.00,10.00 L250.00,10.00 L250.00,165.00 L20.00,165.00 Z"] 18 RenderSVGText {text} at (30,90) size 1 73x120 contains 1 chunk(s)19 RenderSVGInlineText {#text} at (0,-84) size 1 73x12018 RenderSVGText {text} at (30,90) size 138x120 contains 1 chunk(s) 19 RenderSVGInlineText {#text} at (0,-84) size 138x120 20 20 chunk 1 text run 1 at (30.00,90.00) startOffset 0 endOffset 3 width 132.36: "SVG" 21 21 RenderPath {rect} at (126,99) size 234x126 [fill={[type=SOLID] [color=#820032]}] [data="M70.00,55.00 L200.00,55.00 L200.00,125.00 L70.00,125.00 Z"] -
trunk/LayoutTests/platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
r54483 r56776 74 74 RenderPath {rect} at (34,16) size 418x283 [stroke={[type=SOLID] [color=#000000]}] [data="M20.00,10.00 L250.00,10.00 L250.00,165.00 L20.00,165.00 Z"] 75 75 RenderSVGContainer {g} at (54,10) size 382x269 [opacity=0.50] 76 RenderSVGText {text} at (30,90) size 1 73x120 contains 1 chunk(s)77 RenderSVGInlineText {#text} at (0,-84) size 1 73x12076 RenderSVGText {text} at (30,90) size 138x120 contains 1 chunk(s) 77 RenderSVGInlineText {#text} at (0,-84) size 138x120 78 78 chunk 1 text run 1 at (30.00,90.00) startOffset 0 endOffset 3 width 132.36: "SVG" 79 79 RenderPath {rect} at (126,99) size 234x126 [fill={[type=SOLID] [color=#820032]}] [data="M70.00,55.00 L200.00,55.00 L200.00,125.00 L70.00,125.00 Z"] -
trunk/WebCore/ChangeLog
r56775 r56776 1 2010-03-30 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVG Glyph transformations wrong on use of SVGFont 6 https://bugs.webkit.org/show_bug.cgi?id=36731 7 8 Kerning on SVGFonts should be applied to the userSpace of the current Char 9 and not to the userSpace of the viewport. This means scaling the kerning 10 to match the current userSpace. 11 12 Test: svg/custom/glyph-transformation-with-hkern.svg 13 14 * rendering/SVGRootInlineBox.cpp: 15 (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): 16 1 17 2010-03-30 Dirk Schulze <krit@webkit.org> 2 18 -
trunk/WebCore/rendering/SVGRootInlineBox.cpp
r54858 r56776 29 29 30 30 #include "Editor.h" 31 #include "FloatConversion.h" 31 32 #include "Frame.h" 32 33 #include "GraphicsContext.h" … … 1414 1415 } 1415 1416 1416 double kerning = 0.0;1417 float kerning = 0.0f; 1417 1418 #if ENABLE(SVG_FONTS) 1418 1419 SVGFontElement* svgFont = 0; … … 1423 1424 SVGHorizontalKerningPair kerningPair; 1424 1425 if (svgFont->getHorizontalKerningPairForStringsAndGlyphs(lastGlyph.unicode, lastGlyph.glyphName, unicodeStr, glyphName, kerningPair)) 1425 kerning = kerningPair.kerning;1426 kerning = narrowPrecisionToFloat(kerningPair.kerning); 1426 1427 } 1427 1428 … … 1430 1431 lastGlyph.glyphName = glyphName; 1431 1432 lastGlyph.isValid = true; 1433 kerning *= style->font().size() / style->font().primaryFont()->unitsPerEm(); 1432 1434 } else 1433 1435 lastGlyph.isValid = false; 1434 1436 #endif 1435 1437 1436 svgChar.x -= (float)kerning;1438 svgChar.x -= kerning; 1437 1439 1438 1440 // Advance to new position … … 1441 1443 info.cury += glyphAdvance + spacing; 1442 1444 } else 1443 info.curx += glyphAdvance + spacing - (float)kerning;1445 info.curx += glyphAdvance + spacing - kerning; 1444 1446 1445 1447 // Advance to next character group
Note: See TracChangeset
for help on using the changeset viewer.