[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

dino at apple.com dino at apple.com
Sun Feb 20 22:48:56 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 58727b66930e2df7884ae68331cd65f46e5c0272
Author: dino at apple.com <dino at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 11 21:03:44 2011 +0000

    2011-01-11  Dean Jackson  <dino at apple.com>
    
            Reviewed by Simon Fraser.
    
            https://bugs.webkit.org/show_bug.cgi?id=52233
    
            WebKitCSSMatrix constructor should accept 'none'
            as a valid string parameter.
    
            * css/WebKitCSSMatrix.cpp:
            (WebCore::WebKitCSSMatrix::setMatrixValue):
    
    2011-01-11  Dean Jackson  <dino at apple.com>
    
            Reviewed by Simon Fraser.
    
            https://bugs.webkit.org/show_bug.cgi?id=52233
    
            Update WebKitCSSMatrix test to cover a constructor
            that accepts 'none' as input.
    
            * transforms/cssmatrix-2d-interface-expected.txt:
            * transforms/cssmatrix-2d-interface.xhtml:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75542 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0307058..21bd2d3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-11  Dean Jackson  <dino at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        https://bugs.webkit.org/show_bug.cgi?id=52233
+
+        Update WebKitCSSMatrix test to cover a constructor
+        that accepts 'none' as input.
+
+        * transforms/cssmatrix-2d-interface-expected.txt:
+        * transforms/cssmatrix-2d-interface.xhtml:
+
 2011-01-11  Dimitri Glazkov  <dglazkov at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt b/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt
index 9cf03b1..d45df70 100644
--- a/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt
+++ b/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt
@@ -4,9 +4,13 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 CSSMatrix constructors
-PASS default constructor
-PASS object constructor
-PASS string constructor
+PASS m is non-null.
+PASS new WebKitCSSMatrix() is non-null.
+PASS new WebKitCSSMatrix(m) is non-null.
+PASS new WebKitCSSMatrix("matrix(1, 0, 0, 1, 0, 0)") is non-null.
+PASS new WebKitCSSMatrix("") is non-null.
+PASS new WebKitCSSMatrix("none") is non-null.
+PASS new WebKitCSSMatrix("   none   ") is non-null.
 
 Test toString
 PASS a[0] is "matrix"
diff --git a/LayoutTests/transforms/cssmatrix-2d-interface.xhtml b/LayoutTests/transforms/cssmatrix-2d-interface.xhtml
index 80ee2a8..8f0d0b6 100644
--- a/LayoutTests/transforms/cssmatrix-2d-interface.xhtml
+++ b/LayoutTests/transforms/cssmatrix-2d-interface.xhtml
@@ -14,24 +14,15 @@ description("This test exercises the CSSMatrix interface");
 debug("");
 debug("CSSMatrix constructors");
 
-var m = null;
-m = new WebKitCSSMatrix();
-if (m)
-  testPassed("default constructor");
-else
-  testFailed("default constructor");
-
-var m2 = new WebKitCSSMatrix(m);
-if (m2)
-  testPassed("object constructor");
-else
-  testFailed("object constructor");
-
-m = new WebKitCSSMatrix("matrix(1, 0, 0, 1, 0, 0)");
-if (m)
-  testPassed("string constructor");
-else
-  testFailed("string constructor");
+
+var m = new WebKitCSSMatrix();
+shouldBeNonNull('m');
+shouldBeNonNull('new WebKitCSSMatrix()');
+shouldBeNonNull('new WebKitCSSMatrix(m)');
+shouldBeNonNull('new WebKitCSSMatrix("matrix(1, 0, 0, 1, 0, 0)")');
+shouldBeNonNull('new WebKitCSSMatrix("")');
+shouldBeNonNull('new WebKitCSSMatrix("none")');
+shouldBeNonNull('new WebKitCSSMatrix("   none   ")');
 
 debug("");
 debug("Test toString");
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 67fb77f..2f564bd 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-11  Dean Jackson  <dino at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        https://bugs.webkit.org/show_bug.cgi?id=52233
+
+        WebKitCSSMatrix constructor should accept 'none'
+        as a valid string parameter.
+
+        * css/WebKitCSSMatrix.cpp:
+        (WebCore::WebKitCSSMatrix::setMatrixValue):
+
 2011-01-11  James Robinson  <jamesr at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/Source/WebCore/css/WebKitCSSMatrix.cpp b/Source/WebCore/css/WebKitCSSMatrix.cpp
index a4af7f8..7d60f8c 100644
--- a/Source/WebCore/css/WebKitCSSMatrix.cpp
+++ b/Source/WebCore/css/WebKitCSSMatrix.cpp
@@ -30,6 +30,7 @@
 #include "CSSStyleSelector.h"
 #include "CSSMutableStyleDeclaration.h"
 #include "CSSPropertyNames.h"
+#include "CSSValueKeywords.h"
 #include "ExceptionCode.h"
 #include "RenderStyle.h"
 #include <wtf/MathExtras.h>
@@ -57,9 +58,14 @@ void WebKitCSSMatrix::setMatrixValue(const String& string, ExceptionCode& ec)
     if (p.parseValue(styleDeclaration.get(), CSSPropertyWebkitTransform, string, true)) {
         // Convert to TransformOperations. This can fail if a property 
         // requires style (i.e., param uses 'ems' or 'exs')
-        PassRefPtr<CSSValue> val =  styleDeclaration->getPropertyCSSValue(CSSPropertyWebkitTransform);
+        RefPtr<CSSValue> value = styleDeclaration->getPropertyCSSValue(CSSPropertyWebkitTransform);
+
+        // Check for a "none" or empty transform. In these cases we can use the default identity matrix.
+        if (!value || (value->isPrimitiveValue() && (static_cast<CSSPrimitiveValue*>(value.get()))->getIdent() == CSSValueNone))
+            return;
+
         TransformOperations operations;
-        if (!CSSStyleSelector::createTransformOperations(val.get(), 0, 0, operations)) {
+        if (!CSSStyleSelector::createTransformOperations(value.get(), 0, 0, operations)) {
             ec = SYNTAX_ERR;
             return;
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list