Changeset 112240 in webkit


Ignore:
Timestamp:
Mar 27, 2012 3:22:35 AM (12 years ago)
Author:
Nikolas Zimmermann
Message:

Enable animVal support for SVGAnimatedString
https://bugs.webkit.org/show_bug.cgi?id=82316

Reviewed by Zoltan Herczeg.

Source/WebCore:

Enable animVal support for SVGAnimatedString. Very simple now that everything is prepared.
All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedStringAnimator.

Test: svg/animations/svgstring-animation-1.html

  • svg/SVGAnimatedString.cpp:

(WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
(WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedStringAnimator::animValWillChange):
(WebCore::SVGAnimatedStringAnimator::animValDidChange):

  • svg/SVGAnimatedString.h:

(SVGAnimatedStringAnimator):

  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::supportsAnimVal):

LayoutTests:

Add new test covering animVal+SVGAnimatedString.

  • svg/animations/script-tests/svgstring-animation-1.js: Added.

(sample1):
(sample2):
(sample3):
(executeTest):

  • svg/animations/svgstring-animation-1-expected.txt: Added.
  • svg/animations/svgstring-animation-1.html: Added.
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r112239 r112240  
     12012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Enable animVal support for SVGAnimatedString
     4        https://bugs.webkit.org/show_bug.cgi?id=82316
     5
     6        Reviewed by Zoltan Herczeg.
     7
     8        Add new test covering animVal+SVGAnimatedString.
     9
     10        * svg/animations/script-tests/svgstring-animation-1.js: Added.
     11        (sample1):
     12        (sample2):
     13        (sample3):
     14        (executeTest):
     15        * svg/animations/svgstring-animation-1-expected.txt: Added.
     16        * svg/animations/svgstring-animation-1.html: Added.
     17
    1182012-03-27  Philippe Normand  <pnormand@igalia.com>
    219
  • trunk/Source/WebCore/ChangeLog

    r112238 r112240  
     12012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Enable animVal support for SVGAnimatedString
     4        https://bugs.webkit.org/show_bug.cgi?id=82316
     5
     6        Reviewed by Zoltan Herczeg.
     7
     8        Enable animVal support for SVGAnimatedString. Very simple now that everything is prepared.
     9        All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedStringAnimator.
     10
     11        Test: svg/animations/svgstring-animation-1.html
     12
     13        * svg/SVGAnimatedString.cpp:
     14        (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
     15        (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
     16        (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
     17        (WebCore::SVGAnimatedStringAnimator::animValWillChange):
     18        (WebCore::SVGAnimatedStringAnimator::animValDidChange):
     19        * svg/SVGAnimatedString.h:
     20        (SVGAnimatedStringAnimator):
     21        * svg/SVGAnimatedType.cpp:
     22        (WebCore::SVGAnimatedType::supportsAnimVal):
     23
    1242012-03-27  Levi Weintraub  <leviw@chromium.org>
    225
  • trunk/Source/WebCore/svg/SVGAnimatedString.cpp

    r95901 r112240  
    3737    animatedType->string() = string;
    3838    return animatedType.release();
     39}
     40
     41PassOwnPtr<SVGAnimatedType> SVGAnimatedStringAnimator::startAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties)
     42{
     43    return SVGAnimatedType::createString(constructFromOneBaseValue<String, SVGAnimatedString>(properties));
     44}
     45
     46void SVGAnimatedStringAnimator::stopAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties)
     47{
     48    SVGAnimatedTypeAnimator::stopAnimValAnimationForType<SVGAnimatedString>(properties);
     49}
     50
     51void SVGAnimatedStringAnimator::resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>& properties, SVGAnimatedType* type)
     52{
     53    resetFromOneBaseValue<String, SVGAnimatedString>(properties, type, &SVGAnimatedType::string);
     54}
     55
     56void SVGAnimatedStringAnimator::animValWillChange(const Vector<SVGAnimatedProperty*>& properties)
     57{
     58    animValWillChangeForType<SVGAnimatedString>(properties);
     59}
     60
     61void SVGAnimatedStringAnimator::animValDidChange(const Vector<SVGAnimatedProperty*>& properties)
     62{
     63    animValDidChangeForType<SVGAnimatedString>(properties);
    3964}
    4065
  • trunk/Source/WebCore/svg/SVGAnimatedString.h

    r95901 r112240  
    4040
    4141class SVGAnimatedStringAnimator : public SVGAnimatedTypeAnimator {
    42 
    4342public:
    4443    SVGAnimatedStringAnimator(SVGAnimationElement*, SVGElement*);
     
    4645
    4746    virtual PassOwnPtr<SVGAnimatedType> constructFromString(const String&);
     47    virtual PassOwnPtr<SVGAnimatedType> startAnimValAnimation(const Vector<SVGAnimatedProperty*>&);
     48    virtual void stopAnimValAnimation(const Vector<SVGAnimatedProperty*>&);
     49    virtual void resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>&, SVGAnimatedType*);
     50    virtual void animValWillChange(const Vector<SVGAnimatedProperty*>&);
     51    virtual void animValDidChange(const Vector<SVGAnimatedProperty*>&);
    4852
    4953    virtual void calculateFromAndToValues(OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, const String& fromString, const String& toString);
  • trunk/Source/WebCore/svg/SVGAnimatedType.cpp

    r112231 r112240  
    480480    case AnimatedNumberList:
    481481    case AnimatedNumberOptionalNumber:
     482    case AnimatedString:
    482483    case AnimatedTransformList:
    483484        return true;
     
    488489    case AnimatedPreserveAspectRatio:
    489490    case AnimatedRect:
    490     case AnimatedString:
    491491    case AnimatedUnknown:
    492492        return false;
Note: See TracChangeset for help on using the changeset viewer.