Most SVG's render black There seems to have been a serious regression in color handling during the process of merging SVG support into TOT WebCore. Possibly the regression is in KWQColor... more likely I'm doing something else wrong. Either way, most SVG's fail to lookup their colors properly and thus all colors are black.
Created attachment 3181 [details] A simple SVG to show problems with drawing colors It turns out that those SVGs that render properly don't use any solid fills. However, if you use a RadialGradient (or I assume, any gradient) it applies the color correctly. This file has 2 ellipses in it, the smaller ellipse should be red. The larger ellipse is blue.
Created attachment 3184 [details] An even simpler reduction
pojo2 found the problem. Basically, this happens because we're not linking in WebKit... which means that some bridge functions don't get defined. One example is this one: - (CGColorSpaceRef)createRGBColorSpace { return 0; } Thus we're getting back a NULL color space. Now... why this means that gradients are still working, I don't know. That sounds like a bug.
Created attachment 3189 [details] Removes WebCore's usage of WebKitGraphicsBridge, fixing bug.
Comment on attachment 3189 [details] Removes WebCore's usage of WebKitGraphicsBridge, fixing bug. Looks great, but doesn't go far enough. Should also remove the unused methods from the WebCoreGraphicsBridge interface, and from WebKit. (And later we should remove the underlying calls from WebKitSystemInterface as well.)
Created attachment 3191 [details] Removes WebKit portion of WebKitGraphicsBridge
According to autovicki, this change produced no speed regressions. Possibly a speed improvement: Before: TestSuite: PageLoadTest TestType: cvs-base OSVersion: 8C46 SafariVersion: (v412+) Machine Model: PowerBook G4 12" Number Of CPUs: 1 CPU Speed: 1.33 GHz Memory: 1.25 GB Date: Mon Aug 1 02:06:45 PDT 2005 ================================== cvs-base Cold: 0.416 cvs-base Uncached: 0.226 cvs-base AvgCached: 0.159 cvs-base Cached 1: 0.159 cvs-base Cached 2: 0.159 cvs-base Cached 3: 0.158 cvs-base Cached 4: 0.161 cvs-base Cached 5: 0.158 After: TestSuite: PageLoadTest TestType: cvs-base OSVersion: 8C46 SafariVersion: (v412+) Machine Model: PowerBook G4 12" Number Of CPUs: 1 CPU Speed: 1.33 GHz Memory: 1.25 GB Date: Mon Aug 1 01:41:51 PDT 2005 ================================== cvs-base Cold: 0.418 cvs-base Uncached: 0.226 cvs-base AvgCached: 0.158 cvs-base Cached 1: 0.159 cvs-base Cached 2: 0.158 cvs-base Cached 3: 0.157 cvs-base Cached 4: 0.158 cvs-base Cached 5: 0.159
Commited WebCore fixes, waiting for WebKit fix approval.
Comment on attachment 3191 [details] Removes WebKit portion of WebKitGraphicsBridge Looks fine. Lets be sure to remove the WebCore side too.
Sent mail to Darin w/ proposed SPI removal. The public part of this bug is fixed.