Title: [91880] trunk/Source/WebCore
Revision
91880
Author
[email protected]
Date
2011-07-27 16:18:34 -0700 (Wed, 27 Jul 2011)

Log Message

Switch transform operations to FloatSize
https://bugs.webkit.org/show_bug.cgi?id=64301

Reviewed by Simon Fraser.

Changing TransformOperation and its progeny to operate on FloatSizes instead of IntSizes.

* platform/graphics/transforms/IdentityTransformOperation.h:
(WebCore::IdentityTransformOperation::apply):
* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::blend):
* platform/graphics/transforms/Matrix3DTransformOperation.h:
(WebCore::Matrix3DTransformOperation::apply):
* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::MatrixTransformOperation::blend):
* platform/graphics/transforms/MatrixTransformOperation.h:
(WebCore::MatrixTransformOperation::apply):
* platform/graphics/transforms/PerspectiveTransformOperation.h:
(WebCore::PerspectiveTransformOperation::apply):
* platform/graphics/transforms/RotateTransformOperation.h:
(WebCore::RotateTransformOperation::apply):
* platform/graphics/transforms/ScaleTransformOperation.h:
(WebCore::ScaleTransformOperation::apply):
* platform/graphics/transforms/SkewTransformOperation.h:
(WebCore::SkewTransformOperation::apply):
* platform/graphics/transforms/TransformOperation.h:
* platform/graphics/transforms/TransformOperations.h:
(WebCore::TransformOperations::apply):
* platform/graphics/transforms/TranslateTransformOperation.h:
(WebCore::TranslateTransformOperation::x):
(WebCore::TranslateTransformOperation::y):
(WebCore::TranslateTransformOperation::z):
(WebCore::TranslateTransformOperation::apply):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91879 => 91880)


--- trunk/Source/WebCore/ChangeLog	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/ChangeLog	2011-07-27 23:18:34 UTC (rev 91880)
@@ -1,5 +1,41 @@
 2011-07-27  Levi Weintraub  <[email protected]>
 
+        Switch transform operations to FloatSize
+        https://bugs.webkit.org/show_bug.cgi?id=64301
+
+        Reviewed by Simon Fraser.
+
+        Changing TransformOperation and its progeny to operate on FloatSizes instead of IntSizes.
+
+        * platform/graphics/transforms/IdentityTransformOperation.h:
+        (WebCore::IdentityTransformOperation::apply):
+        * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
+        (WebCore::Matrix3DTransformOperation::blend):
+        * platform/graphics/transforms/Matrix3DTransformOperation.h:
+        (WebCore::Matrix3DTransformOperation::apply):
+        * platform/graphics/transforms/MatrixTransformOperation.cpp:
+        (WebCore::MatrixTransformOperation::blend):
+        * platform/graphics/transforms/MatrixTransformOperation.h:
+        (WebCore::MatrixTransformOperation::apply):
+        * platform/graphics/transforms/PerspectiveTransformOperation.h:
+        (WebCore::PerspectiveTransformOperation::apply):
+        * platform/graphics/transforms/RotateTransformOperation.h:
+        (WebCore::RotateTransformOperation::apply):
+        * platform/graphics/transforms/ScaleTransformOperation.h:
+        (WebCore::ScaleTransformOperation::apply):
+        * platform/graphics/transforms/SkewTransformOperation.h:
+        (WebCore::SkewTransformOperation::apply):
+        * platform/graphics/transforms/TransformOperation.h:
+        * platform/graphics/transforms/TransformOperations.h:
+        (WebCore::TransformOperations::apply):
+        * platform/graphics/transforms/TranslateTransformOperation.h:
+        (WebCore::TranslateTransformOperation::x):
+        (WebCore::TranslateTransformOperation::y):
+        (WebCore::TranslateTransformOperation::z):
+        (WebCore::TranslateTransformOperation::apply):
+
+2011-07-27  Levi Weintraub  <[email protected]>
+
         unicode-bidi:-webkit-plaintext does not work on <textarea>
         https://bugs.webkit.org/show_bug.cgi?id=65074
 

Modified: trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -46,7 +46,7 @@
         return isSameType(o);
     }
 
-    virtual bool apply(TransformationMatrix&, const IntSize&) const
+    virtual bool apply(TransformationMatrix&, const FloatSize&) const
     {
         return false;
     }

Modified: trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp	2011-07-27 23:18:34 UTC (rev 91880)
@@ -38,7 +38,7 @@
         return this;
 
     // Convert the TransformOperations into matrices
-    IntSize size;
+    FloatSize size;
     TransformationMatrix fromT;
     TransformationMatrix toT;
     if (from)

Modified: trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -53,7 +53,7 @@
         return m_matrix == m->m_matrix;
     }
 
-    virtual bool apply(TransformationMatrix& transform, const IntSize&) const
+    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
     {
         transform.multiply(TransformationMatrix(m_matrix));
         return false;

Modified: trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp	2011-07-27 23:18:34 UTC (rev 91880)
@@ -34,7 +34,7 @@
         return this;
 
     // convert the TransformOperations into matrices
-    IntSize size;
+    FloatSize size;
     TransformationMatrix fromT;
     TransformationMatrix toT(m_a, m_b, m_c, m_d, m_e, m_f);
     if (from) {

Modified: trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -59,7 +59,7 @@
         return m_a == m->m_a && m_b == m->m_b && m_c == m->m_c && m_d == m->m_d && m_e == m->m_e && m_f == m->m_f;
     }
 
-    virtual bool apply(TransformationMatrix& transform, const IntSize&) const
+    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
     {
         TransformationMatrix matrix(m_a, m_b, m_c, m_d, m_e, m_f);
         transform.multiply(matrix);

Modified: trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -53,7 +53,7 @@
         return m_p == p->m_p;
     }
 
-    virtual bool apply(TransformationMatrix& transform, const IntSize&) const
+    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
     {
         transform.applyPerspective(m_p.calcFloatValue(1));
         return false;

Modified: trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -60,7 +60,7 @@
         return m_x == r->m_x && m_y == r->m_y && m_z == r->m_z && m_angle == r->m_angle;
     }
 
-    virtual bool apply(TransformationMatrix& transform, const IntSize& /*borderBoxSize*/) const
+    virtual bool apply(TransformationMatrix& transform, const FloatSize& /*borderBoxSize*/) const
     {
         transform.rotate3d(m_x, m_y, m_z, m_angle);
         return false;

Modified: trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -59,7 +59,7 @@
         return m_x == s->m_x && m_y == s->m_y && m_z == s->m_z;
     }
 
-    virtual bool apply(TransformationMatrix& transform, const IntSize&) const
+    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
     {
         transform.scale3d(m_x, m_y, m_z);
         return false;

Modified: trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -52,7 +52,7 @@
         return m_angleX == s->m_angleX && m_angleY == s->m_angleY;
     }
 
-    virtual bool apply(TransformationMatrix& transform, const IntSize&) const
+    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
     {
         transform.skew(m_angleX, m_angleY);
         return false;

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -25,8 +25,8 @@
 #ifndef TransformOperation_h
 #define TransformOperation_h
 
+#include "FloatSize.h"
 #include "TransformationMatrix.h"
-#include "IntSize.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
@@ -59,7 +59,7 @@
     virtual bool isIdentity() const = 0;
 
     // Return true if the borderBoxSize was used in the computation, false otherwise.
-    virtual bool apply(TransformationMatrix&, const IntSize& borderBoxSize) const = 0;
+    virtual bool apply(TransformationMatrix&, const FloatSize& borderBoxSize) const = 0;
 
     virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) = 0;
 

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -42,7 +42,7 @@
         return !(*this == o);
     }
     
-    void apply(const IntSize& sz, TransformationMatrix& t) const
+    void apply(const FloatSize& sz, TransformationMatrix& t) const
     {
         for (unsigned i = 0; i < m_operations.size(); ++i)
             m_operations[i]->apply(t, sz);

Modified: trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h (91879 => 91880)


--- trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h	2011-07-27 23:16:25 UTC (rev 91879)
+++ trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h	2011-07-27 23:18:34 UTC (rev 91880)
@@ -42,9 +42,9 @@
         return adoptRef(new TranslateTransformOperation(tx, ty, tz, type));
     }
 
-    double x(const IntSize& borderBoxSize) const { return m_x.calcFloatValue(borderBoxSize.width()); }
-    double y(const IntSize& borderBoxSize) const { return m_y.calcFloatValue(borderBoxSize.height()); }
-    double z(const IntSize&) const { return m_z.calcFloatValue(1); }
+    double x(const FloatSize& borderBoxSize) const { return m_x.calcFloatValue(borderBoxSize.width()); }
+    double y(const FloatSize& borderBoxSize) const { return m_y.calcFloatValue(borderBoxSize.height()); }
+    double z(const FloatSize&) const { return m_z.calcFloatValue(1); }
 
     Length x() const { return m_x; }
     Length y() const { return m_y; }
@@ -64,7 +64,7 @@
         return m_x == t->m_x && m_y == t->m_y && m_z == t->m_z;
     }
 
-    virtual bool apply(TransformationMatrix& transform, const IntSize& borderBoxSize) const
+    virtual bool apply(TransformationMatrix& transform, const FloatSize& borderBoxSize) const
     {
         transform.translate3d(x(borderBoxSize), y(borderBoxSize), z(borderBoxSize));
         return m_x.type() == Percent || m_y.type() == Percent;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to