[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
ariya at webkit.org
ariya at webkit.org
Fri Jan 21 14:37:05 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 24639731f0d436ea3ae248faa8a50d91fbe0cc6e
Author: ariya at webkit.org <ariya at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 23 06:55:52 2010 +0000
2010-12-22 Ariya Hidayat <ariya at sencha.com>
Reviewed by Simon Fraser.
Implement skewX() and skewY() for CSSMatrix.
https://bugs.webkit.org/show_bug.cgi?id=38335
* fast/dom/Window/window-properties-expected.txt: Adjusted.
* transforms/cssmatrix-2d-interface.xhtml: Added tests for skewX() and skewY().
* transforms/cssmatrix-2d-interface-expected.txt: Adjusted.
2010-12-22 Ariya Hidayat <ariya at sencha.com>
Reviewed by Simon Fraser.
Implement skewX() and skewY() for CSSMatrix.
https://bugs.webkit.org/show_bug.cgi?id=38335
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::skew): Implemented skewX() and skewY().
* css/WebKitCSSMatrix.h: Added skewX() and skewY().
* css/WebKitCSSMatrix.idl: Added skewX() and skewY().
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 53d5221..575399d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-22 Ariya Hidayat <ariya at sencha.com>
+
+ Reviewed by Simon Fraser.
+
+ Implement skewX() and skewY() for CSSMatrix.
+ https://bugs.webkit.org/show_bug.cgi?id=38335
+
+ * fast/dom/Window/window-properties-expected.txt: Adjusted.
+ * transforms/cssmatrix-2d-interface.xhtml: Added tests for skewX() and skewY().
+ * transforms/cssmatrix-2d-interface-expected.txt: Adjusted.
+
2010-12-22 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
diff --git a/LayoutTests/fast/dom/Window/window-properties-expected.txt b/LayoutTests/fast/dom/Window/window-properties-expected.txt
index c7f7a95..f9bfff5 100644
--- a/LayoutTests/fast/dom/Window/window-properties-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-properties-expected.txt
@@ -1976,6 +1976,8 @@ window.WebKitCSSMatrix.prototype.rotate [function]
window.WebKitCSSMatrix.prototype.rotateAxisAngle [function]
window.WebKitCSSMatrix.prototype.scale [function]
window.WebKitCSSMatrix.prototype.setMatrixValue [function]
+window.WebKitCSSMatrix.prototype.skewX [function]
+window.WebKitCSSMatrix.prototype.skewY [function]
window.WebKitCSSMatrix.prototype.toString [function]
window.WebKitCSSMatrix.prototype.translate [function]
window.WebKitCSSTransformValue [object WebKitCSSTransformValueConstructor]
diff --git a/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt b/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt
index 59a4856..9cf03b1 100644
--- a/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt
+++ b/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt
@@ -122,6 +122,38 @@ PASS parseFloat(m.d) is 1
PASS parseFloat(m.e) is 0
PASS parseFloat(m.f) is 0
+Test skew in horizontal direction
+PASS parseFloat(m2.a) is 1
+PASS parseFloat(m2.b) is 0
+PASS parseFloat(m2.c.toPrecision(6)) is 0.176327
+PASS parseFloat(m2.d) is 1
+PASS parseFloat(m2.e) is 0
+PASS parseFloat(m2.f) is 0
+
+Test immutability of horizontal skew
+PASS parseFloat(m.a) is 1
+PASS parseFloat(m.b) is 0
+PASS parseFloat(m.c) is 0
+PASS parseFloat(m.d) is 1
+PASS parseFloat(m.e) is 0
+PASS parseFloat(m.f) is 0
+
+Test skew in vertical direction
+PASS parseFloat(m2.a) is 1
+PASS parseFloat(m2.b.toPrecision(6)) is 0.700208
+PASS parseFloat(m2.c) is 0
+PASS parseFloat(m2.d) is 1
+PASS parseFloat(m2.e) is 0
+PASS parseFloat(m2.f) is 0
+
+Test immutability of vertical skew
+PASS parseFloat(m.a) is 1
+PASS parseFloat(m.b) is 0
+PASS parseFloat(m.c) is 0
+PASS parseFloat(m.d) is 1
+PASS parseFloat(m.e) is 0
+PASS parseFloat(m.f) is 0
+
Test multiply
PASS parseFloat(m3.a) is 31
PASS parseFloat(m3.b) is 46
diff --git a/LayoutTests/transforms/cssmatrix-2d-interface.xhtml b/LayoutTests/transforms/cssmatrix-2d-interface.xhtml
index 8788c3c..80ee2a8 100644
--- a/LayoutTests/transforms/cssmatrix-2d-interface.xhtml
+++ b/LayoutTests/transforms/cssmatrix-2d-interface.xhtml
@@ -181,6 +181,46 @@ shouldBe('parseFloat(m.e)', '0');
shouldBe('parseFloat(m.f)', '0');
debug("");
+debug("Test skew in horizontal direction");
+m = new WebKitCSSMatrix();
+m2 = m.skewX(10);
+shouldBe('parseFloat(m2.a)', '1');
+shouldBe('parseFloat(m2.b)', '0');
+shouldBe('parseFloat(m2.c.toPrecision(6))', '0.176327');
+shouldBe('parseFloat(m2.d)', '1');
+shouldBe('parseFloat(m2.e)', '0');
+shouldBe('parseFloat(m2.f)', '0');
+
+debug("");
+debug("Test immutability of horizontal skew");
+shouldBe('parseFloat(m.a)', '1');
+shouldBe('parseFloat(m.b)', '0');
+shouldBe('parseFloat(m.c)', '0');
+shouldBe('parseFloat(m.d)', '1');
+shouldBe('parseFloat(m.e)', '0');
+shouldBe('parseFloat(m.f)', '0');
+
+debug("");
+debug("Test skew in vertical direction");
+m = new WebKitCSSMatrix();
+m2 = m.skewY(35);
+shouldBe('parseFloat(m2.a)', '1');
+shouldBe('parseFloat(m2.b.toPrecision(6))', '0.700208');
+shouldBe('parseFloat(m2.c)', '0');
+shouldBe('parseFloat(m2.d)', '1');
+shouldBe('parseFloat(m2.e)', '0');
+shouldBe('parseFloat(m2.f)', '0');
+
+debug("");
+debug("Test immutability of vertical skew");
+shouldBe('parseFloat(m.a)', '1');
+shouldBe('parseFloat(m.b)', '0');
+shouldBe('parseFloat(m.c)', '0');
+shouldBe('parseFloat(m.d)', '1');
+shouldBe('parseFloat(m.e)', '0');
+shouldBe('parseFloat(m.f)', '0');
+
+debug("");
debug("Test multiply");
m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)");
m2 = new WebKitCSSMatrix("matrix(7, 8, 9, 10, 11, 12)");
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4a6e743..269c81b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-22 Ariya Hidayat <ariya at sencha.com>
+
+ Reviewed by Simon Fraser.
+
+ Implement skewX() and skewY() for CSSMatrix.
+ https://bugs.webkit.org/show_bug.cgi?id=38335
+
+ * css/WebKitCSSMatrix.cpp:
+ (WebCore::WebKitCSSMatrix::skew): Implemented skewX() and skewY().
+ * css/WebKitCSSMatrix.h: Added skewX() and skewY().
+ * css/WebKitCSSMatrix.idl: Added skewX() and skewY().
+
2010-12-22 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/css/WebKitCSSMatrix.cpp b/WebCore/css/WebKitCSSMatrix.cpp
index 33cc91e..a4af7f8 100644
--- a/WebCore/css/WebKitCSSMatrix.cpp
+++ b/WebCore/css/WebKitCSSMatrix.cpp
@@ -156,6 +156,19 @@ PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::rotateAxisAngle(double x, double y,
return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).rotate3d(x, y, z, angle));
}
+PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::skewX(double angle) const
+{
+ if (isnan(angle))
+ angle = 0;
+ return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).skewX(angle));
+}
+
+PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::skewY(double angle) const
+{
+ if (isnan(angle))
+ angle = 0;
+ return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).skewY(angle));
+}
String WebKitCSSMatrix::toString() const
{
diff --git a/WebCore/css/WebKitCSSMatrix.h b/WebCore/css/WebKitCSSMatrix.h
index 2357a69..107bf8b 100644
--- a/WebCore/css/WebKitCSSMatrix.h
+++ b/WebCore/css/WebKitCSSMatrix.h
@@ -131,6 +131,18 @@ public:
// the rotation values on the left (result = rotation(x,y,z,angle) * this)
PassRefPtr<WebKitCSSMatrix> rotateAxisAngle(double x, double y, double z, double angle) const;
+ // Return this matrix skewed along the X axis by the passed values.
+ // Passing a NaN will use a value of 0.
+ // Operation is performed as though the this matrix is multiplied by a matrix with
+ // the skew values on the left (result = skewX(angle) * this)
+ PassRefPtr<WebKitCSSMatrix> skewX(double angle) const;
+
+ // Return this matrix skewed along the Y axis by the passed values.
+ // Passing a NaN will use a value of 0.
+ // Operation is performed as though the this matrix is multiplied by a matrix with
+ // the skew values on the left (result = skewY(angle) * this)
+ PassRefPtr<WebKitCSSMatrix> skewY(double angle) const;
+
const TransformationMatrix& transform() const { return m_matrix; }
String toString() const;
diff --git a/WebCore/css/WebKitCSSMatrix.idl b/WebCore/css/WebKitCSSMatrix.idl
index fc45ebe..d32cd97 100644
--- a/WebCore/css/WebKitCSSMatrix.idl
+++ b/WebCore/css/WebKitCSSMatrix.idl
@@ -84,7 +84,15 @@ module css {
// Passing a NaN will use a value of 0. If the axis is (0,0,0) use a value
// of (0,0,1).
[Immutable] WebKitCSSMatrix rotateAxisAngle(in double x, in double y, in double z, in double angle);
-
+
+ // Returns this matrix skewed along the X axis by the passed values.
+ // Passing a NaN will use a value of 0.
+ [Immutable] WebKitCSSMatrix skewX(in double angle);
+
+ // Returns this matrix skewed along the Y axis by the passed values.
+ // Passing a NaN will use a value of 0.
+ [Immutable] WebKitCSSMatrix skewY(in double angle);
+
[DontEnum] DOMString toString();
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list