Bug 64859

Summary: SVGAnimation does not support 'values' for from-to animations
Product: WebKit Reporter: Dirk Schulze <krit>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: joybro201, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://dev.w3.org/SVG/profiles/1.1F2/test/svg/animate-elem-92-t.svg
Bug Depends on:    
Bug Blocks: 41761    
Attachments:
Description Flags
Patch none

Description Dirk Schulze 2011-07-20 03:45:54 PDT
SVGAnimation does not support 'values' for from-to animations.
Comment 1 Young Han Lee 2011-09-13 08:02:15 PDT
The title of this bug seems a little confusing since the test indicated by the URL doesn't have a 'values' in their animation.

This is rather a bug about supporting 'keyTimes' for from-to animations.
Comment 2 Young Han Lee 2011-09-13 09:36:05 PDT
Created attachment 107183 [details]
Patch
Comment 3 Young Han Lee 2011-09-13 09:37:07 PDT
This is a patch for discussion (can be applied).

I'm not sure if the patch have to include the W3C test.
Comment 4 Dirk Schulze 2011-09-22 22:27:54 PDT
Comment on attachment 107183 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=107183&action=review

> Source/WebCore/svg/SVGAnimationElement.cpp:468
> +    if (calcMode() == CalcModeDiscrete && m_keyTimes.size() == 2)
> +        return percent > m_keyTimes[1] ? 1 : 0;

... and what about none discrete animations? Don't we need to calculate the values as well?
Comment 5 Young Han Lee 2011-09-23 08:34:51 PDT
1. "Specifying a from value and a to value defines a simple animation, equivalent to a values list with 2 values."[1]

2. "For linear and spline animation, the first time value in the list must be 0, and the last time value in the list must be 1"[2]

Thus, in the case of from-to animation, keyTimes should be "0;1" if the calculation mode is not discrete. So we can ignore it.


[1] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues
[2] http://www.w3.org/TR/SVG/animate.html#ValueAttributes
Comment 6 Dirk Schulze 2011-09-23 10:38:50 PDT
Comment on attachment 107183 [details]
Patch

Thank you for the explanation! Great patch! r=me.
Comment 7 WebKit Review Bot 2011-09-23 11:38:18 PDT
Comment on attachment 107183 [details]
Patch

Rejecting attachment 107183 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
o-playing-and-pause.html = MISSING PASS


Regressions: Unexpected image and text mismatch : (1)
  svg/custom/svg-fonts-word-spacing.html = IMAGE+TEXT

Regressions: Unexpected image mismatch : (5)
  fast/text/atsui-multiple-renderers.html = IMAGE
  fast/text/international/danda-space.html = IMAGE
  fast/text/international/thai-baht-space.html = IMAGE
  fast/text/international/thai-line-breaks.html = IMAGE
  platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html = IMAGE



Full output: http://queues.webkit.org/results/9820140
Comment 8 Young Han Lee 2011-09-23 19:34:42 PDT
It seems that the commit process failed because of some other reason, not my patch.

Would you commit+ again, Dirk?
Comment 9 WebKit Review Bot 2011-09-24 01:16:44 PDT
Comment on attachment 107183 [details]
Patch

Clearing flags on attachment: 107183

Committed r95907: <http://trac.webkit.org/changeset/95907>
Comment 10 WebKit Review Bot 2011-09-24 01:16:49 PDT
All reviewed patches have been landed.  Closing bug.