Title: [130011] trunk/Source/WebCore
Revision
130011
Author
p...@google.com
Date
2012-10-01 01:01:29 -0700 (Mon, 01 Oct 2012)

Log Message

Remove overzealous assert in SVGElement::localAttributeToPropertyMap
https://bugs.webkit.org/show_bug.cgi?id=97291

Reviewed by Nikolas Zimmermann.

This patch removes an assert where we did not expect
SVGElement::localAttributeToPropertyMap where we did not to be called. This
function turns out to be useful and this patch removes that assert.

If we encounter a non-SVG tag during SVG parsing (e.g. <svg><price></svg>) we return a
vanilla SVGElement instance from SVGElementFactory::createSVGElement. Previously,
trying to animate this would ASSERT because it was not possible to determine the
animated type. After this patch, an empty localAttributeToPropertyMap is used so
that the animated type returned from SVGAnimateElement::determineAnimatedPropertyType
is AnimatedUnknown.

This patch simply removes an ASSERT so no test is provided.

* svg/SVGElement.cpp:
(WebCore::SVGElement::localAttributeToPropertyMap):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (130010 => 130011)


--- trunk/Source/WebCore/ChangeLog	2012-10-01 07:58:59 UTC (rev 130010)
+++ trunk/Source/WebCore/ChangeLog	2012-10-01 08:01:29 UTC (rev 130011)
@@ -1,3 +1,26 @@
+2012-10-01  Philip Rogers  <p...@google.com>
+
+        Remove overzealous assert in SVGElement::localAttributeToPropertyMap
+        https://bugs.webkit.org/show_bug.cgi?id=97291
+
+        Reviewed by Nikolas Zimmermann.
+
+        This patch removes an assert where we did not expect
+        SVGElement::localAttributeToPropertyMap where we did not to be called. This
+        function turns out to be useful and this patch removes that assert.
+
+        If we encounter a non-SVG tag during SVG parsing (e.g. <svg><price></svg>) we return a
+        vanilla SVGElement instance from SVGElementFactory::createSVGElement. Previously,
+        trying to animate this would ASSERT because it was not possible to determine the
+        animated type. After this patch, an empty localAttributeToPropertyMap is used so
+        that the animated type returned from SVGAnimateElement::determineAnimatedPropertyType
+        is AnimatedUnknown.
+
+        This patch simply removes an ASSERT so no test is provided.
+
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::localAttributeToPropertyMap):
+
 2012-10-01  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r130004.

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (130010 => 130011)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2012-10-01 07:58:59 UTC (rev 130010)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2012-10-01 08:01:29 UTC (rev 130011)
@@ -569,10 +569,8 @@
 
 SVGAttributeToPropertyMap& SVGElement::localAttributeToPropertyMap()
 {
-    ASSERT_NOT_REACHED();
-
-    DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, dummyMap, ());
-    return dummyMap;
+    DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, emptyMap, ());
+    return emptyMap;
 }
 
 void SVGElement::synchronizeRequiredFeatures(void* contextElement)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to