Bug 63387 - SVGAnimatedType should support SVGNumberList animation
Summary: SVGAnimatedType should support SVGNumberList animation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dirk Schulze
URL:
Keywords:
Depends on:
Blocks: 41761
  Show dependency treegraph
 
Reported: 2011-06-25 13:08 PDT by Dirk Schulze
Modified: 2011-06-25 15:23 PDT (History)
2 users (show)

See Also:


Attachments
Patch (36.41 KB, patch)
2011-06-25 13:27 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff
Patch (36.30 KB, patch)
2011-06-25 14:24 PDT, Dirk Schulze
zimmermann: 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-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>