2006-12-31 Eric Seidel <eric@webkit.org>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Jan 2007 05:15:28 +0000 (05:15 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Jan 2007 05:15:28 +0000 (05:15 +0000)
        Reviewed by olliej.

        Re-enable animateTransform (now that SVGList is fixed)
        (Things are only "less broken" not totally fixed yet.)

        * ksvg2/misc/KSVGTimeScheduler.cpp:
        (WebCore::SVGTimer::notifyAll):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18499 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/ksvg2/misc/KSVGTimeScheduler.cpp

index 870c140..765405e 100644 (file)
@@ -1,3 +1,13 @@
+2006-12-31  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by olliej.
+
+        Re-enable animateTransform (now that SVGList is fixed)
+        (Things are only "less broken" not totally fixed yet.)
+
+        * ksvg2/misc/KSVGTimeScheduler.cpp:
+        (WebCore::SVGTimer::notifyAll):
+
 2006-12-31  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Hyatt.
index a228e4c..5c105b6 100644 (file)
@@ -165,55 +165,38 @@ void SVGTimer::notifyAll()
             
             float percentage = calculateTimePercentage(elapsed, start, end, duration, repetitions);
                 
-            if(percentage <= 1.0 || animation->connected())
+            if (percentage <= 1.0 || animation->connected())
                 animation->handleTimerEvent(percentage);
 
-// FIXME: Disable animateTransform until SVGList can be fixed.
-#if 0
             // Special cases for animate* objects depending on 'additive' attribute
-            if(animation->hasTagName(SVGNames::animateTransformTag))
-            {
+            if (animation->hasTagName(SVGNames::animateTransformTag)) {
                 SVGAnimateTransformElement *animTransform = static_cast<SVGAnimateTransformElement *>(animation);
                 if(!animTransform)
                     continue;
 
-                RefPtr<SVGMatrix> transformMatrix = animTransform->transformMatrix();
-                if(!transformMatrix)
-                    continue;
-
-                RefPtr<SVGMatrix> initialMatrix = animTransform->initialMatrix();
-                RefPtr<SVGTransform> data = new SVGTransform();
+                AffineTransform transformMatrix = animTransform->transformMatrix();
+                RefPtr<SVGTransform> targetTransform = new SVGTransform();
 
-                if(!targetTransforms) // lazy creation, only if needed.
-                {
+                if (!targetTransforms) { // lazy creation, only if needed.
                     targetTransforms = new SVGTransformList();
 
-                    if(animation->isAdditive() && initialMatrix)
-                    {
-                        RefPtr<SVGMatrix> matrix = new SVGMatrix(initialMatrix->matrix());
-                        
-                        data->setMatrix(matrix.get());
-                        targetTransforms->appendItem(data.get());
-
-                        data = new SVGTransform();
+                    if (animation->isAdditive()) {
+                        targetTransform->setMatrix(animTransform->initialMatrix());
+                        targetTransforms->appendItem(targetTransform.get(), ec);
+                        targetTransform = new SVGTransform();
                     }
                 }
 
-                if(targetTransforms->numberOfItems() <= 1)
-                    data->setMatrix(transformMatrix.get());
-                else
-                {
-                    if(!animation->isAdditive())
-                        targetTransforms->clear();    
-                    
-                    data->setMatrix(transformMatrix.get());
+                if (targetTransforms->numberOfItems() <= 1)
+                    targetTransform->setMatrix(transformMatrix);
+                else {
+                    if (!animation->isAdditive())
+                        targetTransforms->clear(ec);
+                    targetTransform->setMatrix(transformMatrix);
                 }
 
-                targetTransforms->appendItem(data.get());
-            }
-            else
-#endif
-            if (animation->hasTagName(SVGNames::animateColorTag)) {
+                targetTransforms->appendItem(targetTransform.get(), ec);
+            } else if (animation->hasTagName(SVGNames::animateColorTag)) {
                 SVGAnimateColorElement* animColor = static_cast<SVGAnimateColorElement*>(animation);
                 if (!animColor)
                     continue;