Bug 12193 - SVG gradients do not invalidate correctly when stops change color via style accessors
Summary: SVG gradients do not invalidate correctly when stops change color via style a...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-10 02:54 PST by Eric Seidel (no email)
Modified: 2007-02-02 12:28 PST (History)
2 users (show)

See Also:


Attachments
test case (444 bytes, image/svg+xml)
2007-01-10 02:55 PST, Eric Seidel (no email)
no flags Details
code changes (29.41 KB, patch)
2007-02-02 07:59 PST, Eric Seidel (no email)
mitz: review+
Details | Formatted Diff | Diff
test result updates (286.83 KB, patch)
2007-02-02 08:01 PST, Eric Seidel (no email)
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-01-10 02:54:55 PST
SVG gradients do not invalidate correctly when stops change color via style accessors

See test case.  Neither FF nor Opera seem to support style.stopColor correctly either though.  We support it, but not with proper invalidation.
Comment 1 Eric Seidel (no email) 2007-01-10 02:55:31 PST
Created attachment 12342 [details]
test case
Comment 2 Eric Seidel (no email) 2007-01-15 01:42:54 PST
Hyatt said that the way to hear about style changes, it to have a renderer, and then setStyle will be called on that renderer when the style changes.

We may need to have add renderers for SVGStopElements if that's the case.  That might also make style resolution easier too.
Comment 3 Eric Seidel (no email) 2007-02-02 07:27:10 PST
This is fixed in my local tree, patch forthcoming.
Comment 4 Eric Seidel (no email) 2007-02-02 07:59:53 PST
Created attachment 12871 [details]
code changes

These changes fix this bug as well as 12498
Comment 5 Eric Seidel (no email) 2007-02-02 08:01:15 PST
Created attachment 12872 [details]
test result updates

These are mostly updates from changing RenderSVGContainer to RenderSVGHiddenContainer for <defs> and gradients.
Comment 6 Nikolas Zimmermann 2007-02-02 08:25:22 PST
(In reply to comment #5)
> Created an attachment (id=12872) [edit]
> test result updates
> 
> These are mostly updates from changing RenderSVGContainer to
> RenderSVGHiddenContainer for <defs> and gradients.

Excellent patch! This is the way to go.
(I started working on a very similar patch a while ago :-)

Niko
Comment 7 mitz 2007-02-02 08:40:47 PST
Comment on attachment 12871 [details]
code changes

r=me!
Comment 8 Eric Seidel (no email) 2007-02-02 08:46:07 PST
r19362