WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2007 09:20:16 +0000 (09:20 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2007 09:20:16 +0000 (09:20 +0000)
        Reviewed by Alexey Proskuryakov.

        - apply matrix transforms on the correct side of the transformation
          matrix (not on the side where the vector is multiplied).

        Test: fast/transforms/matrix-02.html

        * rendering/RenderStyle.h:
        (WebCore::MatrixTransformOperation::apply):

LayoutTests:

        Reviewed by Alexey Proskuryakov.

        - test the matrix transforms are applied on the correct side

        * fast/transforms/matrix-02.html: Added.
        * platform/mac/fast/transforms/matrix-02-expected.checksum: Added.
        * platform/mac/fast/transforms/matrix-02-expected.png: Added.
        * platform/mac/fast/transforms/matrix-02-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/transforms/matrix-02.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/matrix-02-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/matrix-02-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/matrix-02-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderStyle.h

index 8d8a15daab66f5cd014a2e528ccb61eb171e771f..2d7174a834d5547fd590ee279f80467c2dd36801 100644 (file)
@@ -1,3 +1,14 @@
+2007-11-23  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Alexey Proskuryakov.
+
+        - test the matrix transforms are applied on the correct side
+
+        * fast/transforms/matrix-02.html: Added.
+        * platform/mac/fast/transforms/matrix-02-expected.checksum: Added.
+        * platform/mac/fast/transforms/matrix-02-expected.png: Added.
+        * platform/mac/fast/transforms/matrix-02-expected.txt: Added.
+
 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Maciej.
diff --git a/LayoutTests/fast/transforms/matrix-02.html b/LayoutTests/fast/transforms/matrix-02.html
new file mode 100644 (file)
index 0000000..3c9660f
--- /dev/null
@@ -0,0 +1,4 @@
+<body style="position: relative;">
+    <div style="width: 90px; height: 90px; position: absolute; top: 0; left: 0; -webkit-transform: matrix(.7071, .7071, -.7071, .7071, 0, 0) rotate(-45deg); border: 5px solid green;"></div>
+    <div style="width: 90px; height: 90px; position: absolute; top: 5px; left: 5px; background-color: green;"></div>
+</body>
diff --git a/LayoutTests/platform/mac/fast/transforms/matrix-02-expected.checksum b/LayoutTests/platform/mac/fast/transforms/matrix-02-expected.checksum
new file mode 100644 (file)
index 0000000..ae7a7bd
--- /dev/null
@@ -0,0 +1 @@
+18f1f64eab31dfb69467a497de9442d7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/transforms/matrix-02-expected.png b/LayoutTests/platform/mac/fast/transforms/matrix-02-expected.png
new file mode 100644 (file)
index 0000000..fc96c0b
Binary files /dev/null and b/LayoutTests/platform/mac/fast/transforms/matrix-02-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/transforms/matrix-02-expected.txt b/LayoutTests/platform/mac/fast/transforms/matrix-02-expected.txt
new file mode 100644 (file)
index 0000000..767b781
--- /dev/null
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+layer at (8,8) size 784x584
+  RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 100x100
+  RenderBlock (positioned) {DIV} at (0,0) size 100x100 [border: (5px solid #008000)]
+layer at (13,13) size 90x90
+  RenderBlock (positioned) {DIV} at (5,5) size 90x90 [bgcolor=#008000]
index 7fe88cb80e3e24a199749299199db584bea87ddb..5378dc29c92ce47cf259463f60fb79bc7c84c7cf 100644 (file)
@@ -1,3 +1,15 @@
+2007-11-23  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Alexey Proskuryakov.
+
+        - apply matrix transforms on the correct side of the transformation
+          matrix (not on the side where the vector is multiplied).
+
+        Test: fast/transforms/matrix-02.html
+
+        * rendering/RenderStyle.h:
+        (WebCore::MatrixTransformOperation::apply):
+
 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Maciej.
index a1bd5cc75a4e5a6a2d46b45da0c00741b35f79be..795391ece95dd052f564cd5fba54beea81a406ab 100644 (file)
@@ -787,7 +787,7 @@ public:
     virtual void apply(AffineTransform& transform, const IntSize& borderBoxSize)
     {
         AffineTransform matrix(m_a, m_b, m_c, m_d, m_e, m_f);
-        transform.multiply(matrix);
+        transform = matrix * transform;
     }
 
     virtual TransformOperation* blend(const TransformOperation* from, double progress, bool blendToIdentity = false);