Bug 54243 - SVG animation avoid unnecessary adjust for currentColor
Summary: SVG animation avoid unnecessary adjust for currentColor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 41761
  Show dependency treegraph
 
Reported: 2011-02-10 13:48 PST by Dirk Schulze
Modified: 2011-02-10 14:45 PST (History)
1 user (show)

See Also:


Attachments
Patch (7.66 KB, patch)
2011-02-10 14:14 PST, Dirk Schulze
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2011-02-10 13:48:41 PST
At the moment we check every string for currentColor, independent of the animation type. We should just check for currentColor on color animation. Also if the string is currentColor, we ask the RenderStyle for the color, transform this color to a string and transform it back again.
Comment 1 Dirk Schulze 2011-02-10 14:14:43 PST
Created attachment 82047 [details]
Patch
Comment 2 Andreas Kling 2011-02-10 14:31:58 PST
Comment on attachment 82047 [details]
Patch

Nice optimization. r=me

In CSS and <canvas> context, "currentColor" is case-insensitive, I don't know about SVG though. Not a regression in your patch, but something to look at afterwards perhaps.
Comment 3 Dirk Schulze 2011-02-10 14:35:03 PST
(In reply to comment #2)
> (From update of attachment 82047 [details])
> Nice optimization. r=me
> 
> In CSS and <canvas> context, "currentColor" is case-insensitive, I don't know about SVG though. Not a regression in your patch, but something to look at afterwards perhaps.

Checked this right after talking with Andreas. Opera uses case-sensitive, Firefox case-insensitive. Have to take a look into the spec. Thanks for bringing this up.
Comment 4 Dirk Schulze 2011-02-10 14:45:45 PST
Committed r78271: <http://trac.webkit.org/changeset/78271>