Title: [124060] branches/safari-536.26-branch

Diff

Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (124059 => 124060)


--- branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-07-30 18:27:43 UTC (rev 124059)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-07-30 18:30:09 UTC (rev 124060)
@@ -1,5 +1,19 @@
 2012-07-30  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 116860
+
+    2012-05-12  Philip Rogers  <p...@google.com>
+
+            Cleanup before changing attributeName in SVG <animate>
+            https://bugs.webkit.org/show_bug.cgi?id=86100
+
+            Reviewed by Nikolas Zimmermann.
+
+            * svg/animations/dynamic-modify-attributename-crash-expected.txt: Added.
+            * svg/animations/dynamic-modify-attributename-crash.svg: Added.
+
+2012-07-30  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 116827
 
     2012-05-11  David Barton  <dbar...@mathscribe.com>

Copied: branches/safari-536.26-branch/LayoutTests/svg/animations/dynamic-modify-attributename-crash-expected.txt (from rev 116860, trunk/LayoutTests/svg/animations/dynamic-modify-attributename-crash-expected.txt) (0 => 124060)


--- branches/safari-536.26-branch/LayoutTests/svg/animations/dynamic-modify-attributename-crash-expected.txt	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/svg/animations/dynamic-modify-attributename-crash-expected.txt	2012-07-30 18:30:09 UTC (rev 124060)
@@ -0,0 +1 @@
+PASS

Copied: branches/safari-536.26-branch/LayoutTests/svg/animations/dynamic-modify-attributename-crash.svg (from rev 116860, trunk/LayoutTests/svg/animations/dynamic-modify-attributename-crash.svg) (0 => 124060)


--- branches/safari-536.26-branch/LayoutTests/svg/animations/dynamic-modify-attributename-crash.svg	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/svg/animations/dynamic-modify-attributename-crash.svg	2012-07-30 18:30:09 UTC (rev 124060)
@@ -0,0 +1,24 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <!-- Test for WK86100 - passes if there is no crash -->
+  <animate id="animate" attributeName="x" dur="9s"/>
+  <text id="log"/>
+  <script>
+  <![CDATA[
+    if (window.layoutTestController) {
+      layoutTestController.waitUntilDone();
+      layoutTestController.dumpAsText();
+    }
+
+    window.setTimeout(function() {
+      var elem = document.getElementById("animate");
+      elem.setAttribute("attributeName", "transform");
+    }, 10);
+
+    window.setTimeout(function() {
+      document.getElementById("log").appendChild(document.createTextNode("PASS"));
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }, 100);
+  ]]>
+  </script>
+</svg>

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (124059 => 124060)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-07-30 18:27:43 UTC (rev 124059)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-07-30 18:30:09 UTC (rev 124060)
@@ -1,5 +1,24 @@
 2012-07-30  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 116860
+
+    2012-05-12  Philip Rogers  <p...@google.com>
+
+            Cleanup before changing attributeName in SVG <animate>
+            https://bugs.webkit.org/show_bug.cgi?id=86100
+
+            Reviewed by Nikolas Zimmermann.
+
+            Changing attributeName caused a crash because references were not removed from the old target.
+            This change simply cleans up before changing attributeName in SVG animation elements.
+
+            Test: svg/animations/dynamic-modify-attributename-crash.svg
+
+            * svg/animation/SVGSMILElement.cpp:
+            (WebCore::SVGSMILElement::svgAttributeChanged):
+
+2012-07-30  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 116827
 
     2012-05-11  David Barton  <dbar...@mathscribe.com>

Modified: branches/safari-536.26-branch/Source/WebCore/svg/animation/SVGSMILElement.cpp (124059 => 124060)


--- branches/safari-536.26-branch/Source/WebCore/svg/animation/SVGSMILElement.cpp	2012-07-30 18:27:43 UTC (rev 124059)
+++ branches/safari-536.26-branch/Source/WebCore/svg/animation/SVGSMILElement.cpp	2012-07-30 18:30:09 UTC (rev 124060)
@@ -462,9 +462,13 @@
             beginListChanged(elapsed());
         else if (attrName == SVGNames::endAttr)
             endListChanged(elapsed());
-        else if (attrName == SVGNames::attributeNameAttr)
+        else if (attrName == SVGNames::attributeNameAttr) {
             m_attributeName = constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr));
-        else if (attrName.matches(XLinkNames::hrefAttr)) {
+            if (m_targetElement) {
+                resetTargetElement();
+                return;
+            }
+        } else if (attrName.matches(XLinkNames::hrefAttr)) {
             if (SVGElement* targetElement = this->targetElement())
                 document()->accessSVGExtensions()->removeAllAnimationElementsFromTarget(targetElement);
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to