WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
36704
SVGAnimateColorElement doesn't support by/to animations properly
https://bugs.webkit.org/show_bug.cgi?id=36704
Summary
SVGAnimateColorElement doesn't support by/to animations properly
Dirk Schulze
Reported
2010-03-27 10:38:23 PDT
If an argument for from is invalid or the attribute 'from' is missing at all, the resulting drawing is wrong. This is caused by SVGAnimateElement::calculateFromAndToValues. It sets transformation from color to string if one argument is wrong/missing. A short try to fix this broke W3C tests animate-elem-40 -41 -60 -62 and -78. I tried to take the SVGColor of the valid argument, transformed it to a String (SVGColor::cssText()) and set it as new toValue/fromValue.
Attachments
Patch
(69.86 KB, patch)
2012-04-28 03:45 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch v2
(69.89 KB, patch)
2012-04-28 03:59 PDT
,
Nikolas Zimmermann
koivisto
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2011-02-25 00:49:50 PST
Maybe after
bug 54800
is fixed, this is easy to fix as well.
Nikolas Zimmermann
Comment 2
2012-04-28 03:45:21 PDT
Created
attachment 139351
[details]
Patch
Antti Koivisto
Comment 3
2012-04-28 03:57:26 PDT
Comment on
attachment 139351
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=139351&action=review
r=me
> Source/WebCore/ChangeLog:8 > + Switch AnimatedColorAnimator to use the standard animateAdditveNumber() method, taking progress & repeatCount into account.
animateAdditveNumber <- typo
> Source/WebCore/svg/SVGAnimatedColor.cpp:94 > + animatedColor = ColorDistance::clampColor(static_cast<int>(animatedRed), static_cast<int>(animatedGreen), static_cast<int>(animatedBlue), static_cast<int>(animatedAlpha));
Is static_cast<int>(floatColor) really the correct rounding?
Nikolas Zimmermann
Comment 4
2012-04-28 03:59:50 PDT
Created
attachment 139352
[details]
Patch v2
Nikolas Zimmermann
Comment 5
2012-04-28 04:02:34 PDT
Committed
r115564
: <
http://trac.webkit.org/changeset/115564
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug