public
Description: A mirror of QtWebKit
Homepage: http://trac.webkit.org/projects/webkit/wiki/QtWebKit
Clone URL: git://github.com/tronical/qtwebkit.git
2006-12-26  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        ASSERT while loading SVG map
        http://bugs.webkit.org/show_bug.cgi?id=11987

        * ksvg2/css/SVGCSSParser.cpp: remove a few .impl() calls 
        previously missed.
        (WebCore::CSSParser::parseSVGValue):
        (WebCore::CSSParser::parseSVGPaint):
        (WebCore::CSSParser::parseSVGColor):
        * ksvg2/misc/KCanvasRenderingStyle.cpp: handle invalid colors
        (WebCore::KSVGPainterFactory::fillPaintServer):
        (WebCore::KSVGPainterFactory::strokePaintServer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18429 
268f45cc-cd09-0410-ab3c-d52691b4dbfc
eseidel (author)
Tue Dec 26 20:13:34 -0800 2006
commit  2ceb602f75666d9793b129709a3032cd7d7428d9
tree    fedc8f8eed19e3e842660711d2ac53b29520ca00
parent  ec398c4e5b324d419225db7d42b387b2f5ecb404
...
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
...
4117
4118
4119
4120
 
4121
4122
4123
...
4146
4147
4148
4149
 
4150
4151
4152
...
4185
4186
4187
4188
 
4189
4190
4191
...
4197
4198
4199
4200
 
4201
4202
4203
...
4209
4210
4211
4212
 
4213
4214
4215
...
4228
4229
4230
4231
 
4232
4233
4234
...
4266
4267
4268
4269
 
4270
4271
4272
...
4278
4279
4280
4281
 
4282
4283
4284
...
4414
4415
4416
4417
 
4418
4419
4420
...
4429
4430
4431
4432
 
4433
4434
4435
...
4461
4462
4463
4464
 
4465
4466
4467
...
4511
4512
4513
4514
 
4515
4516
4517
4518
4519
4520
 
4521
4522
4523
...
5542
5543
5544
5545
 
5546
5547
5548
...
6182
6183
6184
6185
 
6186
6187
6188
...
6259
6260
6261
6262
 
6263
6264
6265
...
6327
6328
6329
6330
 
6331
6332
6333
...
6693
6694
6695
6696
 
6697
6698
6699
...
6793
6794
6795
6796
 
6797
6798
6799
...
6831
6832
6833
6834
 
6835
6836
6837
...
10859
10860
10861
10862
 
10863
10864
10865
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
4129
4130
4131
 
4132
4133
4134
4135
...
4158
4159
4160
 
4161
4162
4163
4164
...
4197
4198
4199
 
4200
4201
4202
4203
...
4209
4210
4211
 
4212
4213
4214
4215
...
4221
4222
4223
 
4224
4225
4226
4227
...
4240
4241
4242
 
4243
4244
4245
4246
...
4278
4279
4280
 
4281
4282
4283
4284
...
4290
4291
4292
 
4293
4294
4295
4296
...
4426
4427
4428
 
4429
4430
4431
4432
...
4441
4442
4443
 
4444
4445
4446
4447
...
4473
4474
4475
 
4476
4477
4478
4479
...
4523
4524
4525
 
4526
4527
4528
4529
4530
4531
 
4532
4533
4534
4535
...
5554
5555
5556
 
5557
5558
5559
5560
...
6194
6195
6196
 
6197
6198
6199
6200
...
6271
6272
6273
 
6274
6275
6276
6277
...
6339
6340
6341
 
6342
6343
6344
6345
...
6705
6706
6707
 
6708
6709
6710
6711
...
6805
6806
6807
 
6808
6809
6810
6811
...
6843
6844
6845
 
6846
6847
6848
6849
...
10871
10872
10873
 
10874
10875
10876
10877
0
@@ -1,3 +1,15 @@
0
+2006-12-26 Eric Seidel <eric@webkit.org>
0
+
0
+ Reviewed by olliej.
0
+
0
+ ASSERT while loading SVG map
0
+ http://bugs.webkit.org/show_bug.cgi?id=11987
0
+
0
+ * svg/custom/invalid-fill-hex-expected.checksum: Added.
0
+ * svg/custom/invalid-fill-hex-expected.png: Added.
0
+ * svg/custom/invalid-fill-hex-expected.txt: Added.
0
+ * svg/custom/invalid-fill-hex.svg: Added.
0
+
0
 2006-12-27 Nikolas Zimmermann <zimmermann@kde.org>
0
 
0
         Reviewed by Oliver.
0
@@ -4117,7 +4129,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
 
0
         * editing/pasteboard/emacs-cntl-y-001.html:
0
 
0
-2006-09-27 Eric Seidel <eric@eseidel.com>
0
+2006-09-27 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by mitz.
0
         
0
@@ -4146,7 +4158,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/custom/viewport-update2-expected.txt: Added.
0
         * svg/custom/viewport-update2.svg: Added.
0
 
0
-2006-09-27 Eric Seidel <eric@eseidel.com>
0
+2006-09-27 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by darin.
0
         
0
@@ -4185,7 +4197,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * editing/pasteboard/emacs-cntl-y-001-expected.txt: Added.
0
         * editing/pasteboard/emacs-cntl-y-001.html: Added.
0
 
0
-2006-09-26 Eric Seidel <eric@eseidel.com>
0
+2006-09-26 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by Tim H.
0
         
0
@@ -4197,7 +4209,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/hixie/viewbox/003-expected.txt: Added.
0
         * svg/hixie/viewbox/003.xml: Added.
0
 
0
-2006-09-26 Eric Seidel <eric@eseidel.com>
0
+2006-09-26 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by Tim H.
0
 
0
@@ -4209,7 +4221,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/custom/createelement-expected.txt: Added.
0
         * svg/custom/createelement.svg: Added.
0
 
0
-2006-09-26 Eric Seidel <eric@eseidel.com>
0
+2006-09-26 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by Tim H.
0
         
0
@@ -4228,7 +4240,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * editing/execCommand/indent-empty-root-expected.txt: Added.
0
         * editing/execCommand/indent-empty-root.html: Added.
0
 
0
-2006-09-24 Eric Seidel <eric@eseidel.com>
0
+2006-09-24 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by mjs.
0
         
0
@@ -4266,7 +4278,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/custom/viewport-clip-expected.txt: Added.
0
         * svg/custom/viewport-clip.svg: Added.
0
 
0
-2006-09-24 Eric Seidel <eric@eseidel.com>
0
+2006-09-24 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by beth.
0
 
0
@@ -4278,7 +4290,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/custom/invalid-fill-expected.txt: Added.
0
         * svg/custom/invalid-fill.svg: Added.
0
 
0
-2006-09-24 Eric Seidel <eric@eseidel.com>
0
+2006-09-24 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by hyatt.
0
         
0
@@ -4414,7 +4426,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * fast/forms/file-input-direction-expected.txt: Added.
0
         * fast/forms/file-input-direction.html: Added.
0
 
0
-2006-09-20 Eric Seidel <eric@eseidel.com>
0
+2006-09-20 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by hyatt.
0
         
0
@@ -4429,7 +4441,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/W3C-SVG-1.1/painting-marker-02-f-expected.png:
0
         * svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt:
0
 
0
-2006-09-19 Eric Seidel <eric@eseidel.com>
0
+2006-09-19 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by adele.
0
         
0
@@ -4461,7 +4473,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/custom/non-opaque-filters-expected.txt:
0
         * svg/custom/text-filter-expected.txt:
0
 
0
-2006-09-19 Eric Seidel <eric@eseidel.com>
0
+2006-09-19 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by adele.
0
 
0
@@ -4511,13 +4523,13 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * fast/forms/input-appearance-height-expected.txt:
0
         * fast/forms/input-value-expected.txt:
0
 
0
-2006-09-17 Eric Seidel <eric@eseidel.com>
0
+2006-09-17 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by hyatt.
0
 
0
         * fast/js/window-properties.html: make work in Firefox (hangs IE)
0
 
0
-2006-09-17 Eric Seidel <eric@eseidel.com>
0
+2006-09-17 Eric Seidel <eric@webkit.org>
0
 
0
         Add a textual dump of the window object property tree.
0
 
0
@@ -5542,7 +5554,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
 
0
         * svg/W3C-SVG-1.1/struct-dom-06-b-expected.txt:
0
 
0
-2006-08-26 Eric Seidel <eric@eseidel.com>
0
+2006-08-26 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by hyatt.
0
         
0
@@ -6182,7 +6194,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * fast/forms/onselect-selectall-expected.txt: Added.
0
         * fast/forms/onselect-selectall.html: Added.
0
 
0
-2006-08-14 Eric Seidel <eric@eseidel.com>
0
+2006-08-14 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by mjs.
0
         
0
@@ -6259,7 +6271,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/custom/text-filter-expected.txt:
0
         * svg/custom/tref-update-expected.txt:
0
 
0
-2006-08-14 Eric Seidel <eric@eseidel.com>
0
+2006-08-14 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by darin and mjs.
0
         
0
@@ -6327,7 +6339,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * tables/mozilla/bugs/bug24200-expected.txt: Ditto.
0
         * tables/mozilla/bugs/bug4527-expected.txt: Ditto.
0
 
0
-2006-08-11 Eric Seidel <eric@eseidel.com>
0
+2006-08-11 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by andersca.
0
         
0
@@ -6693,7 +6705,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/W3C-SVG-1.1/struct-dom-06-b-expected.png:
0
         * svg/W3C-SVG-1.1/struct-dom-06-b-expected.txt:
0
 
0
-2006-07-27 Eric Seidel <eric@eseidel.com>
0
+2006-07-27 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by darin.
0
         
0
@@ -6793,7 +6805,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * fast/encoding/denormalised-voiced-japanese-chars-expected.txt: Added.
0
         * fast/encoding/denormalised-voiced-japanese-chars.html: Added.
0
 
0
-2006-07-27 Eric Seidel <eric@eseidel.com>
0
+2006-07-27 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by ap.
0
         
0
@@ -6831,7 +6843,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * svg/custom/invalid-viewbox2-expected.txt: Added.
0
         * svg/custom/invalid-viewbox2.svg: Added.
0
 
0
-2006-07-27 Eric Seidel <eric@eseidel.com>
0
+2006-07-27 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by ap.
0
         
0
@@ -10859,7 +10871,7 @@ text-clip was an incorrect test, rather than an incorrect result
0
         * tables/mozilla_expected_failures/bugs/bug32205-1-expected.txt:
0
         * tables/mozilla_expected_failures/bugs/bug65372-expected.txt:
0
 
0
-2006-05-25 Eric Seidel <eric@eseidel.com>
0
+2006-05-25 Eric Seidel <eric@webkit.org>
0
 
0
         Reviewed by andersca.
0
 
...
1
2
 
 
 
 
 
 
3
4
5
...
1
2
3
4
5
6
7
8
9
10
11
0
@@ -1,5 +1,11 @@
0
 2006-12-26 Eric Seidel <eric@webkit.org>
0
 
0
+ Reviewed by olliej.
0
+
0
+ * svg/svg.pltsuite: re-enable word-iso.svg after fixing http://bugs.webkit.org/show_bug.cgi?id=11987
0
+
0
+2006-12-26 Eric Seidel <eric@webkit.org>
0
+
0
         Reviewed by bradee-oh.
0
         
0
         Add new PageLoadTests directory (this one)
...
15
16
17
18
 
19
...
15
16
17
 
18
19
0
@@ -15,5 +15,5 @@ file:///WEBKIT_PATH/PageLoadTests/svg/files/francobollo_gnome_ezechi_02.svg
0
 file:///WEBKIT_PATH/PageLoadTests/svg/files/gearflowers.svg
0
 file:///WEBKIT_PATH/PageLoadTests/svg/files/hereGear4.svg
0
 file:///WEBKIT_PATH/PageLoadTests/svg/files/mtsthelens.svg
0
-file:///WEBKIT_PATH/PageLoadTests/svg/files/world-iso.svg-disabled
0
+file:///WEBKIT_PATH/PageLoadTests/svg/files/world-iso.svg
0
 file:///WEBKIT_PATH/PageLoadTests/svg/files/worldcup.svg
...
1
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
4
5
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
0
@@ -1,5 +1,20 @@
0
 2006-12-26 Eric Seidel <eric@webkit.org>
0
 
0
+ Reviewed by olliej.
0
+
0
+ ASSERT while loading SVG map
0
+ http://bugs.webkit.org/show_bug.cgi?id=11987
0
+
0
+ * ksvg2/css/SVGCSSParser.cpp: remove a few .impl() calls previously missed.
0
+ (WebCore::CSSParser::parseSVGValue):
0
+ (WebCore::CSSParser::parseSVGPaint):
0
+ (WebCore::CSSParser::parseSVGColor):
0
+ * ksvg2/misc/KCanvasRenderingStyle.cpp: handle invalid colors
0
+ (WebCore::KSVGPainterFactory::fillPaintServer):
0
+ (WebCore::KSVGPainterFactory::strokePaintServer):
0
+
0
+2006-12-26 Eric Seidel <eric@webkit.org>
0
+
0
         Reviewed by ggaren.
0
 
0
         No test cases changed.
...
216
217
218
219
 
220
221
222
...
228
229
230
231
 
232
233
234
...
241
242
243
244
 
245
246
247
...
384
385
386
387
 
388
389
390
...
396
397
398
399
400
401
402
403
404
 
 
 
 
 
405
406
407
...
426
427
428
429
 
430
431
432
...
216
217
218
 
219
220
221
222
...
228
229
230
 
231
232
233
234
...
241
242
243
 
244
245
246
247
...
384
385
386
 
387
388
389
390
...
396
397
398
 
 
 
 
 
 
399
400
401
402
403
404
405
406
...
425
426
427
 
428
429
430
431
0
@@ -216,7 +216,7 @@ bool CSSParser::parseSVGValue(int propId, bool important)
0
             else if (id == SVGCSS_VAL_CURRENTCOLOR)
0
                 parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR);
0
             else if (value->unit == CSSPrimitiveValue::CSS_URI)
0
- parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_URI, domString(value->string).impl());
0
+ parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_URI, domString(value->string));
0
             else
0
                 parsedValue = parseSVGPaint();
0
 
0
@@ -228,7 +228,7 @@ bool CSSParser::parseSVGValue(int propId, bool important)
0
     case CSS_PROP_COLOR: // <color> | inherit
0
         if ((id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT) ||
0
            (id >= SVGCSS_VAL_ALICEBLUE && id <= SVGCSS_VAL_YELLOWGREEN))
0
- parsedValue = new SVGColor(domString(value->string).impl());
0
+ parsedValue = new SVGColor(domString(value->string));
0
         else
0
             parsedValue = parseSVGColor();
0
 
0
@@ -241,7 +241,7 @@ bool CSSParser::parseSVGValue(int propId, bool important)
0
     case SVGCSS_PROP_LIGHTING_COLOR:
0
         if ((id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT) ||
0
            (id >= SVGCSS_VAL_ALICEBLUE && id <= SVGCSS_VAL_YELLOWGREEN))
0
- parsedValue = new SVGColor(domString(value->string).impl());
0
+ parsedValue = new SVGColor(domString(value->string));
0
         else if (id == SVGCSS_VAL_CURRENTCOLOR)
0
             parsedValue = new SVGColor(SVGColor::SVG_COLORTYPE_CURRENTCOLOR);
0
         else // TODO : svgcolor (iccColor)
0
@@ -384,7 +384,7 @@ CSSValue* CSSParser::parseSVGPaint()
0
         g = max(0, min(255, g));
0
         b = max(0, min(255, b));
0
         
0
- return new SVGPaint(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, String(), String::format("rgb(%d, %d, %d)", r, g, b).impl());
0
+ return new SVGPaint(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, String(), String::format("rgb(%d, %d, %d)", r, g, b));
0
     }
0
     else
0
         return 0;
0
@@ -396,12 +396,11 @@ CSSValue* CSSParser::parseSVGColor()
0
 {
0
     Value* value = valueList->current();
0
     if (!strict && value->unit == CSSPrimitiveValue::CSS_NUMBER && value->fValue >= 0. && value->fValue < 1000000.)
0
- return new SVGColor(String::format("%06d", (int)(value->fValue+.5)).impl());
0
- else if (value->unit == CSSPrimitiveValue::CSS_RGBCOLOR) {
0
- String str = "#" + domString(value->string);
0
- return new SVGColor(str.impl());
0
- } else if (value->unit == CSSPrimitiveValue::CSS_IDENT || (!strict && value->unit == CSSPrimitiveValue::CSS_DIMENSION))
0
- return new SVGColor(domString(value->string).impl());
0
+ return new SVGColor(String::format("%06d", (int)(value->fValue+.5)));
0
+ else if (value->unit == CSSPrimitiveValue::CSS_RGBCOLOR)
0
+ return new SVGColor("#" + domString(value->string));
0
+ else if (value->unit == CSSPrimitiveValue::CSS_IDENT || (!strict && value->unit == CSSPrimitiveValue::CSS_DIMENSION))
0
+ return new SVGColor(domString(value->string));
0
     else if (value->unit == Value::Function && value->function->args != 0 && domString(value->function->name).lower() == "rgb(") {
0
         ValueList* args = value->function->args;
0
         Value* v = args->current();
0
@@ -426,7 +425,7 @@ CSSValue* CSSParser::parseSVGColor()
0
         g = max(0, min(255, g));
0
         b = max(0, min(255, b));
0
         
0
- return new SVGColor(String::format("rgb(%d, %d, %d)", r, g, b).impl());
0
+ return new SVGColor(String::format("rgb(%d, %d, %d)", r, g, b));
0
     }
0
     else
0
         return 0;
...
59
60
61
62
63
64
65
66
67
68
69
...
71
72
73
 
 
 
 
 
 
 
 
74
75
76
...
94
95
96
 
 
 
97
98
99
...
59
60
61
 
 
 
 
 
62
63
64
...
66
67
68
69
70
71
72
73
74
75
76
77
78
79
...
97
98
99
100
101
102
103
104
105
0
@@ -59,11 +59,6 @@ SVGPaintServer* KSVGPainterFactory::fillPaintServer(const RenderStyle* style, co
0
         fillPaintServer = getPaintServerById(item->document(), AtomicString(fill->uri().substring(1)));
0
         if (fillPaintServer && item->isRenderPath())
0
             fillPaintServer->addClient(static_cast<const RenderPath*>(item));
0
- if (!fillPaintServer) {
0
- // default value (black), see bug 11017
0
- fillPaintServer = sharedSolidPaintServer();
0
- static_cast<SVGPaintServerSolid*>(fillPaintServer)->setColor(Color::black);
0
- }
0
     } else {
0
         fillPaintServer = sharedSolidPaintServer();
0
         SVGPaintServerSolid* fillPaintServerSolid = static_cast<SVGPaintServerSolid*>(fillPaintServer);
0
@@ -71,6 +66,14 @@ SVGPaintServer* KSVGPainterFactory::fillPaintServer(const RenderStyle* style, co
0
             fillPaintServerSolid->setColor(style->color());
0
         else
0
             fillPaintServerSolid->setColor(fill->color());
0
+ // FIXME: Ideally invalid colors would never get set on the RenderStyle and this could turn into an ASSERT
0
+ if (!fillPaintServerSolid->color().isValid())
0
+ fillPaintServer = 0;
0
+ }
0
+ if (!fillPaintServer) {
0
+ // default value (black), see bug 11017
0
+ fillPaintServer = sharedSolidPaintServer();
0
+ static_cast<SVGPaintServerSolid*>(fillPaintServer)->setColor(Color::black);
0
     }
0
     return fillPaintServer;
0
 }
0
@@ -94,6 +97,9 @@ SVGPaintServer* KSVGPainterFactory::strokePaintServer(const RenderStyle* style,
0
             strokePaintServerSolid->setColor(style->color());
0
         else
0
             strokePaintServerSolid->setColor(stroke->color());
0
+ // FIXME: Ideally invalid colors would never get set on the RenderStyle and this could turn into an ASSERT
0
+ if (!strokePaintServerSolid->color().isValid())
0
+ strokePaintServer = 0;
0
     }
0
 
0
     return strokePaintServer;

Comments

    No one has commented yet.