Bug 63387

Summary: SVGAnimatedType should support SVGNumberList animation
Product: WebKit Reporter: Dirk Schulze <krit>
Component: SVGAssignee: Dirk Schulze <krit>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 41761    
Attachments:
Description Flags
Patch
none
Patch zimmermann: review+

Description Dirk Schulze 2011-06-25 13:08:19 PDT
SVGAnimatedType should support SVGNumberList animation.
Comment 1 Dirk Schulze 2011-06-25 13:27:55 PDT
Created attachment 98603 [details]
Patch
Comment 2 Nikolas Zimmermann 2011-06-25 14:00:53 PDT
Comment on attachment 98603 [details]
Patch

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

Can you please upload a new version that applies so we can check the build? Setting r- for now.

> Source/WebCore/ChangeLog:16154
> + Ditto.

Typo.

> Source/WebCore/svg/SVGAnimatedNumberList.cpp:67
> +        toNumberList.at(i) += fromNumberList.at(i);

Use operator{} here.

> Source/WebCore/svg/SVGAnimatedNumberList.cpp:78
> +    ASSERT(m_contextElement);
> +    SVGAnimateElement* animationElement = static_cast<SVGAnimateElement*>(m_animationElement);
> +    
> +    AnimationMode animationMode = animationElement->animationMode();
> +    // To animation uses contributions from the lower priority animations as the base value.

I'd prefer:
ASSERT(...);

SVGAnimateElement* animationElement = ..
AnimationMode animationMode = ..

// To animation uses...

> Source/WebCore/svg/SVGAnimatedNumberList.cpp:96
> +        SVGAnimatedNumberAnimator::calculateAnimatedNumber(animationElement, percentage, repeatCount, animatedNumberList.at(i), fromNumberList.at(i), toNumberList.at(i));

Use operator[] instead of at, that's preferred.

> Source/WebCore/svg/SVGAnimatedNumberList.cpp:101
> +    return -1;

Comment?
Comment 3 Dirk Schulze 2011-06-25 14:24:46 PDT
Created attachment 98606 [details]
Patch
Comment 4 WebKit Review Bot 2011-06-25 14:26:32 PDT
Attachment 98606 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/svg/..." exit_code: 1

Source/WebCore/svg/SVGAnimatedNumberList.cpp:42:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.cpp:42:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.cpp:51:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.cpp:51:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.cpp:71:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.cpp:71:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.cpp:71:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.h:50:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.h:50:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.h:51:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.h:51:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.h:53:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.h:53:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Source/WebCore/svg/SVGAnimatedNumberList.h:53:  The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]
Total errors found: 14 in 22 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Nikolas Zimmermann 2011-06-25 14:33:52 PDT
Comment on attachment 98606 [details]
Patch

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

r=me!

> Source/WebCore/svg/SVGAnimatedType.cpp:109
> +    animatedType->m_data.numberList = numberList;

Didn't we use the "animatedType->numberList() = numberList;" style elsewhere?
Comment 6 Dirk Schulze 2011-06-25 15:02:55 PDT
Committed r89750: <http://trac.webkit.org/changeset/89750>
Comment 7 Dirk Schulze 2011-06-25 15:23:14 PDT
Committed r89752: <http://trac.webkit.org/changeset/89752>