[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zimmermann at webkit.org zimmermann at webkit.org
Wed Dec 22 15:17:03 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 042ddc91d71395aafce4d0b9b560cc1a117c222d
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 29 20:33:16 2010 +0000

    2010-10-29  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Dirk Schulze.
    
            ASSERT when SVGAnimatedProperty instance is assigned to multiple elements.
            https://bugs.webkit.org/show_bug.cgi?id=48555
    
            Test: svg/custom/insertItemBefore-from-non-list-origin.svg
    
            * bindings/scripts/CodeGeneratorJS.pm: Include SVGAnimatedPropertyTearOff.h instead of SVGPropertyTearOff.h
            * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
            * bindings/scripts/CodeGeneratorV8.pm: Ditto.
            * svg/properties/SVGAnimatedListPropertyTearOff.h:
            (WebCore::SVGAnimatedListPropertyTearOff::isAnimatedListTearOff): Return true.
            (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList): Devirtualize function.
            * svg/properties/SVGAnimatedProperty.h:
            (WebCore::SVGAnimatedProperty::isAnimatedListTearOff): Return false.
            * svg/properties/SVGListPropertyTearOff.h:
            (WebCore::SVGListPropertyTearOff::removeItemFromListIfNeeded): Only try to remove the passed item from its list, if its actually a list and not just a SVGAnimatedProperty.
    
    2010-10-29  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Dirk Schulze.
    
            ASSERT when SVGAnimatedProperty instance is assigned to multiple elements.
            https://bugs.webkit.org/show_bug.cgi?id=48555
    
            * svg/custom/insertItemBefore-from-non-list-origin-expected.txt: Added.
            * svg/custom/insertItemBefore-from-non-list-origin.svg: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70918 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 72ee1ed..5848219 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-29  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        ASSERT when SVGAnimatedProperty instance is assigned to multiple elements.
+        https://bugs.webkit.org/show_bug.cgi?id=48555
+
+        * svg/custom/insertItemBefore-from-non-list-origin-expected.txt: Added.
+        * svg/custom/insertItemBefore-from-non-list-origin.svg: Added.
+
 2010-10-29  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/LayoutTests/svg/custom/insertItemBefore-from-non-list-origin-expected.txt b/LayoutTests/svg/custom/insertItemBefore-from-non-list-origin-expected.txt
new file mode 100644
index 0000000..b9417d0
--- /dev/null
+++ b/LayoutTests/svg/custom/insertItemBefore-from-non-list-origin-expected.txt
@@ -0,0 +1 @@
+This test passed, if it doesn't crash in a debug build (fires assertion).
diff --git a/LayoutTests/svg/custom/insertItemBefore-from-non-list-origin.svg b/LayoutTests/svg/custom/insertItemBefore-from-non-list-origin.svg
new file mode 100644
index 0000000..fe0c19b
--- /dev/null
+++ b/LayoutTests/svg/custom/insertItemBefore-from-non-list-origin.svg
@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<text x="10" y="50">This test passed, if it doesn't crash in a debug build (fires assertion).</text>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+}
+
+var oFEConvolveMatrix = document.createElementNS("http://www.w3.org/2000/svg", "feConvolveMatrix");
+document.createElementNS("http://www.w3.org/2000/svg", "altGlyph").x.baseVal.insertItemBefore(oFEConvolveMatrix.width.baseVal, 0);
+</script>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 825fe57..f3e093d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-10-29  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        ASSERT when SVGAnimatedProperty instance is assigned to multiple elements.
+        https://bugs.webkit.org/show_bug.cgi?id=48555
+
+        Test: svg/custom/insertItemBefore-from-non-list-origin.svg
+
+        * bindings/scripts/CodeGeneratorJS.pm: Include SVGAnimatedPropertyTearOff.h instead of SVGPropertyTearOff.h
+        * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
+        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+        * svg/properties/SVGAnimatedListPropertyTearOff.h:
+        (WebCore::SVGAnimatedListPropertyTearOff::isAnimatedListTearOff): Return true.
+        (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList): Devirtualize function.
+        * svg/properties/SVGAnimatedProperty.h:
+        (WebCore::SVGAnimatedProperty::isAnimatedListTearOff): Return false.
+        * svg/properties/SVGListPropertyTearOff.h:
+        (WebCore::SVGListPropertyTearOff::removeItemFromListIfNeeded): Only try to remove the passed item from its list, if its actually a list and not just a SVGAnimatedProperty.
+
 2010-10-29  David Hyatt  <hyatt at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index baf96f8..9244bc6 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -2503,11 +2503,11 @@ sub GetSVGPropertyTypes
     if ($svgNativeType =~ /SVGPropertyTearOff/) {
         $svgPropertyType = $svgWrappedNativeType;
         $headerIncludes{"$svgWrappedNativeType.h"} = 1;
-        $headerIncludes{"SVGPropertyTearOff.h"} = 1;
+        $headerIncludes{"SVGAnimatedPropertyTearOff.h"} = 1;
     } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) {
         $svgListPropertyType = $svgWrappedNativeType;
         $headerIncludes{"$svgWrappedNativeType.h"} = 1;
-        $headerIncludes{"SVGListPropertyTearOff.h"} = 1;
+        $headerIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
     }
 
     return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 374a99e..8351c87 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -1013,9 +1013,8 @@ sub GenerateHeader
         @internalHeaderContent = split("\r", $implementationLicenseTemplate);
 
         push(@internalHeaderContent, "\n#import <WebCore/$className.h>\n\n");
-        push(@internalHeaderContent, "#import <WebCore/SVGAnimatedProperty.h>\n\n") if $svgPropertyType or $svgListPropertyType;
-        push(@internalHeaderContent, "#import <WebCore/SVGPropertyTearOff.h>\n\n") if $svgPropertyType;
-        push(@internalHeaderContent, "#import <WebCore/SVGListPropertyTearOff.h>\n\n") if $svgListPropertyType;
+        push(@internalHeaderContent, "#import <WebCore/SVGAnimatedPropertyTearOff.h>\n\n") if $svgPropertyType;
+        push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n") if $svgListPropertyType;
         push(@internalHeaderContent, $interfaceAvailabilityVersionCheck) if length $interfaceAvailabilityVersion;
 
         if ($interfaceName eq "Node") {
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 78992d1..8cbd63d 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -231,10 +231,10 @@ sub GetSVGPropertyTypes
     my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implType);
     if ($svgNativeType =~ /SVGPropertyTearOff/) {
         $svgPropertyType = $svgWrappedNativeType;
-        $implIncludes{"SVGPropertyTearOff.h"} = 1,
+        $implIncludes{"SVGAnimatedPropertyTearOff.h"} = 1,
     } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) {
         $svgListPropertyType = $svgWrappedNativeType;
-        $implIncludes{"SVGListPropertyTearOff.h"} = 1,
+        $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1,
     }
 
     return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
diff --git a/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h b/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
index 31617da..c002d09 100644
--- a/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
@@ -46,7 +46,9 @@ public:
         return m_animVal.get();
     }
 
-    virtual int removeItemFromList(SVGProperty* property, bool shouldSynchronizeWrappers)
+    virtual bool isAnimatedListTearOff() const { return true; }
+
+    int removeItemFromList(SVGProperty* property, bool shouldSynchronizeWrappers)
     {
         // FIXME: No animVal support.
         if (!m_baseVal)
diff --git a/WebCore/svg/properties/SVGAnimatedProperty.h b/WebCore/svg/properties/SVGAnimatedProperty.h
index c2186cb..1c25935 100644
--- a/WebCore/svg/properties/SVGAnimatedProperty.h
+++ b/WebCore/svg/properties/SVGAnimatedProperty.h
@@ -43,11 +43,7 @@ public:
         m_contextElement->svgAttributeChanged(m_attributeName);
     }
 
-    virtual int removeItemFromList(SVGProperty*, bool)
-    {
-        ASSERT_NOT_REACHED();
-        return -1;
-    }
+    virtual bool isAnimatedListTearOff() const { return false; }
 
     // Caching facilities.
     typedef HashMap<SVGAnimatedPropertyDescription, RefPtr<SVGAnimatedProperty>, SVGAnimatedPropertyDescriptionHash, SVGAnimatedPropertyDescriptionHashTraits> Cache;
diff --git a/WebCore/svg/properties/SVGListPropertyTearOff.h b/WebCore/svg/properties/SVGListPropertyTearOff.h
index bc01eb6..2801168 100644
--- a/WebCore/svg/properties/SVGListPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGListPropertyTearOff.h
@@ -340,12 +340,12 @@ private:
     {
         // Spec: If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
         SVGAnimatedProperty* animatedPropertyOfItem = newItem->animatedProperty();
-        if (!animatedPropertyOfItem)
+        if (!animatedPropertyOfItem || !animatedPropertyOfItem->isAnimatedListTearOff())
             return;
 
         // 'newItem' is already living in another list. If it's not our list, synchronize the other lists wrappers after the removal.
         bool livesInOtherList = animatedPropertyOfItem != m_animatedProperty;
-        int removedIndex = animatedPropertyOfItem->removeItemFromList(newItem, livesInOtherList);
+        int removedIndex = static_cast<SVGAnimatedListPropertyTearOff<PropertyType>*>(animatedPropertyOfItem)->removeItemFromList(newItem, livesInOtherList);
         ASSERT(removedIndex != -1);
 
         if (!indexToModify)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list