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

rwlbuis at webkit.org rwlbuis at webkit.org
Wed Dec 22 18:01:07 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e2c150def8cb79b65496123d61c313a35e1fbf03
Author: rwlbuis at webkit.org <rwlbuis at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Dec 5 20:13:17 2010 +0000

    2010-12-05  Rob Buis  <rwlbuis at gmail.com>
    
            Reviewed by Nikolas Zimmermann.
    
            createSVGTransformFromMatrix(undefined) => NULL ptr
            https://bugs.webkit.org/show_bug.cgi?id=49564
    
            Throw TYPE_MISMATCH_ERR when using undefined or null as value for matrix parameter.
    
            * svg/SVGTransformList.idl:
            * svg/properties/SVGTransformListPropertyTearOff.h:
            (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73345 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8452ddd..9dcc8c6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-05  Rob Buis  <rwlbuis at gmail.com>
+
+        Reviewed by Nikolas Zimmermann.
+
+        createSVGTransformFromMatrix(undefined) => NULL ptr
+        https://bugs.webkit.org/show_bug.cgi?id=49564
+
+        Extend existing test to make sure undefined or null as parameter
+        throw an exception.
+
+        * svg/dom/SVGTransformList-expected.txt:
+        * svg/dom/script-tests/SVGTransformList.js:
+
 2010-12-05  Robert Hogan  <robert at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/LayoutTests/svg/dom/SVGTransformList-expected.txt b/LayoutTests/svg/dom/SVGTransformList-expected.txt
index ca338f4..0157aaa 100644
--- a/LayoutTests/svg/dom/SVGTransformList-expected.txt
+++ b/LayoutTests/svg/dom/SVGTransformList-expected.txt
@@ -11,6 +11,8 @@ PASS transform.createSVGTransformFromMatrix(svgElement) threw exception TypeErro
 PASS transform.createSVGTransformFromMatrix('aString') threw exception TypeError: Type error.
 PASS transform.createSVGTransformFromMatrix(1) threw exception TypeError: Type error.
 PASS transform.createSVGTransformFromMatrix(true) threw exception TypeError: Type error.
+PASS transform.createSVGTransformFromMatrix(undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
+PASS transform.createSVGTransformFromMatrix(null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/svg/dom/script-tests/SVGTransformList.js b/LayoutTests/svg/dom/script-tests/SVGTransformList.js
index f5fd92f..7e8c158 100644
--- a/LayoutTests/svg/dom/script-tests/SVGTransformList.js
+++ b/LayoutTests/svg/dom/script-tests/SVGTransformList.js
@@ -12,5 +12,7 @@ shouldThrow("transform.createSVGTransformFromMatrix(svgElement)");
 shouldThrow("transform.createSVGTransformFromMatrix('aString')");
 shouldThrow("transform.createSVGTransformFromMatrix(1)");
 shouldThrow("transform.createSVGTransformFromMatrix(true)");
+shouldThrow("transform.createSVGTransformFromMatrix(undefined)");
+shouldThrow("transform.createSVGTransformFromMatrix(null)");
 
 successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 770ca1c..6c8e8a2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-05  Rob Buis  <rwlbuis at gmail.com>
+
+        Reviewed by Nikolas Zimmermann.
+
+        createSVGTransformFromMatrix(undefined) => NULL ptr
+        https://bugs.webkit.org/show_bug.cgi?id=49564
+
+        Throw TYPE_MISMATCH_ERR when using undefined or null as value for matrix parameter.
+
+        * svg/SVGTransformList.idl:
+        * svg/properties/SVGTransformListPropertyTearOff.h:
+        (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
+
 2010-12-05  Alejandro G. Castro  <alex at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/WebCore/svg/SVGTransformList.idl b/WebCore/svg/SVGTransformList.idl
index cdd813d..8bbb091 100644
--- a/WebCore/svg/SVGTransformList.idl
+++ b/WebCore/svg/SVGTransformList.idl
@@ -44,7 +44,9 @@ module svg {
         [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform appendItem(in SVGTransform item)
             raises(DOMException, SVGException);
 
-        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix);
+        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix)
+            raises(DOMException);
+
         SVGTransform consolidate()
             raises(DOMException);
     };
diff --git a/WebCore/svg/properties/SVGTransformListPropertyTearOff.h b/WebCore/svg/properties/SVGTransformListPropertyTearOff.h
index d3ad1ca..e496c81 100644
--- a/WebCore/svg/properties/SVGTransformListPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGTransformListPropertyTearOff.h
@@ -38,9 +38,12 @@ public:
         return adoptRef(new SVGTransformListPropertyTearOff(animatedProperty, role));
     }
 
-    PassRefPtr<SVGPropertyTearOff<SVGTransform> > createSVGTransformFromMatrix(SVGPropertyTearOff<SVGMatrix>* matrix)
+    PassRefPtr<SVGPropertyTearOff<SVGTransform> > createSVGTransformFromMatrix(SVGPropertyTearOff<SVGMatrix>* matrix, ExceptionCode& ec)
     {
-        ASSERT(matrix);
+        if (!matrix) {
+            ec = TYPE_MISMATCH_ERR;
+            return 0;
+        }
         SVGTransformList& values = m_animatedProperty->values();
         return SVGPropertyTearOff<SVGTransform>::create(values.createSVGTransformFromMatrix(matrix->propertyReference()));
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list