Bug 4211

Summary: REGRESSION: Most SVG's render black
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: SVGAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P4    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
A simple SVG to show problems with drawing colors
none
An even simpler reduction
none
Removes WebCore's usage of WebKitGraphicsBridge, fixing bug.
darin: review+
Removes WebKit portion of WebKitGraphicsBridge darin: review+

Eric Seidel (no email)
Reported 2005-07-29 14:23:00 PDT
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.
Attachments
A simple SVG to show problems with drawing colors (756 bytes, image/svg+xml)
2005-07-31 12:56 PDT, Ben La Monica
no flags
An even simpler reduction (499 bytes, image/svg+xml)
2005-07-31 16:53 PDT, Eric Seidel (no email)
no flags
Removes WebCore's usage of WebKitGraphicsBridge, fixing bug. (9.87 KB, patch)
2005-07-31 23:08 PDT, Eric Seidel (no email)
darin: review+
Removes WebKit portion of WebKitGraphicsBridge (755 bytes, patch)
2005-08-01 00:10 PDT, Eric Seidel (no email)
darin: review+
Ben La Monica
Comment 1 2005-07-31 12:56:35 PDT
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.
Eric Seidel (no email)
Comment 2 2005-07-31 16:53:04 PDT
Created attachment 3184 [details] An even simpler reduction
Eric Seidel (no email)
Comment 3 2005-07-31 21:17:57 PDT
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.
Eric Seidel (no email)
Comment 4 2005-07-31 23:08:02 PDT
Created attachment 3189 [details] Removes WebCore's usage of WebKitGraphicsBridge, fixing bug.
Darin Adler
Comment 5 2005-08-01 00:01:42 PDT
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.)
Eric Seidel (no email)
Comment 6 2005-08-01 00:10:36 PDT
Created attachment 3191 [details] Removes WebKit portion of WebKitGraphicsBridge
Eric Seidel (no email)
Comment 7 2005-08-01 02:13:08 PDT
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
Eric Seidel (no email)
Comment 8 2005-08-01 02:22:08 PDT
Commited WebCore fixes, waiting for WebKit fix approval.
Darin Adler
Comment 9 2005-08-01 11:38:56 PDT
Comment on attachment 3191 [details] Removes WebKit portion of WebKitGraphicsBridge Looks fine. Lets be sure to remove the WebCore side too.
Eric Seidel (no email)
Comment 10 2005-08-01 12:31:50 PDT
Sent mail to Darin w/ proposed SPI removal. The public part of this bug is fixed.
Note You need to log in before you can comment on or make changes to this bug.