Diff
Modified: trunk/Source/WebCore/ChangeLog (184192 => 184193)
--- trunk/Source/WebCore/ChangeLog 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/ChangeLog 2015-05-12 09:53:27 UTC (rev 184193)
@@ -1,3 +1,39 @@
+2015-05-12 Zan Dobersek <[email protected]>
+
+ Move TransformOperation-based classes off of PassRefPtr
+ https://bugs.webkit.org/show_bug.cgi?id=144876
+
+ Reviewed by Darin Adler.
+
+ Remove uses of PassRefPtr from the TransformOperation class and its
+ derivatives, operating on Ref and RefPtr objects instead.
+
+ * platform/graphics/transforms/IdentityTransformOperation.h:
+ * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
+ (WebCore::Matrix3DTransformOperation::blend):
+ * platform/graphics/transforms/Matrix3DTransformOperation.h:
+ * platform/graphics/transforms/MatrixTransformOperation.cpp:
+ (WebCore::MatrixTransformOperation::blend):
+ * platform/graphics/transforms/MatrixTransformOperation.h:
+ * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
+ (WebCore::PerspectiveTransformOperation::blend):
+ * platform/graphics/transforms/PerspectiveTransformOperation.h:
+ * platform/graphics/transforms/RotateTransformOperation.cpp:
+ (WebCore::RotateTransformOperation::blend):
+ * platform/graphics/transforms/RotateTransformOperation.h:
+ * platform/graphics/transforms/ScaleTransformOperation.cpp:
+ (WebCore::ScaleTransformOperation::blend):
+ * platform/graphics/transforms/ScaleTransformOperation.h:
+ * platform/graphics/transforms/SkewTransformOperation.cpp:
+ (WebCore::SkewTransformOperation::blend):
+ * platform/graphics/transforms/SkewTransformOperation.h:
+ * platform/graphics/transforms/TransformOperation.h:
+ * platform/graphics/transforms/TransformOperations.cpp:
+ (WebCore::TransformOperations::blendByMatchingOperations):
+ * platform/graphics/transforms/TranslateTransformOperation.cpp:
+ (WebCore::TranslateTransformOperation::blend):
+ * platform/graphics/transforms/TranslateTransformOperation.h:
+
2015-05-12 Xabier Rodriguez Calvar <[email protected]> and Youenn Fablet <[email protected]>
[Streams API] ReadableStream reader should not be disposable when having pending promises
Modified: trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -26,17 +26,18 @@
#define IdentityTransformOperation_h
#include "TransformOperation.h"
+#include <wtf/Ref.h>
namespace WebCore {
class IdentityTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<IdentityTransformOperation> create()
+ static Ref<IdentityTransformOperation> create()
{
- return adoptRef(new IdentityTransformOperation());
+ return adoptRef(*new IdentityTransformOperation());
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
return create();
}
@@ -56,9 +57,9 @@
return false;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation*, double, bool = false) override
+ virtual Ref<TransformOperation> blend(const TransformOperation*, double, bool = false) override
{
- return this;
+ return *this;
}
IdentityTransformOperation()
Modified: trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -35,10 +35,10 @@
return isSameType(other) && m_matrix == downcast<Matrix3DTransformOperation>(other).m_matrix;
}
-PassRefPtr<TransformOperation> Matrix3DTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
+Ref<TransformOperation> Matrix3DTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
- return this;
+ return *this;
// Convert the TransformOperations into matrices
FloatSize size;
Modified: trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -27,19 +27,20 @@
#define Matrix3DTransformOperation_h
#include "TransformOperation.h"
+#include <wtf/Ref.h>
namespace WebCore {
class Matrix3DTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<Matrix3DTransformOperation> create(const TransformationMatrix& matrix)
+ static Ref<Matrix3DTransformOperation> create(const TransformationMatrix& matrix)
{
- return adoptRef(new Matrix3DTransformOperation(matrix));
+ return adoptRef(*new Matrix3DTransformOperation(matrix));
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
- return adoptRef(new Matrix3DTransformOperation(m_matrix));
+ return adoptRef(*new Matrix3DTransformOperation(m_matrix));
}
TransformationMatrix matrix() const {return m_matrix; }
@@ -59,7 +60,7 @@
return false;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
Matrix3DTransformOperation(const TransformationMatrix& mat)
{
Modified: trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -34,10 +34,10 @@
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;
}
-PassRefPtr<TransformOperation> MatrixTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
+Ref<TransformOperation> MatrixTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
- return this;
+ return *this;
// convert the TransformOperations into matrices
TransformationMatrix fromT;
Modified: trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -27,24 +27,25 @@
#include "TransformOperation.h"
#include "TransformationMatrix.h"
+#include <wtf/Ref.h>
namespace WebCore {
class MatrixTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<MatrixTransformOperation> create(double a, double b, double c, double d, double e, double f)
+ static Ref<MatrixTransformOperation> create(double a, double b, double c, double d, double e, double f)
{
- return adoptRef(new MatrixTransformOperation(a, b, c, d, e, f));
+ return adoptRef(*new MatrixTransformOperation(a, b, c, d, e, f));
}
- static PassRefPtr<MatrixTransformOperation> create(const TransformationMatrix& t)
+ static Ref<MatrixTransformOperation> create(const TransformationMatrix& t)
{
- return adoptRef(new MatrixTransformOperation(t));
+ return adoptRef(*new MatrixTransformOperation(t));
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
- return adoptRef(new MatrixTransformOperation(matrix()));
+ return adoptRef(*new MatrixTransformOperation(matrix()));
}
TransformationMatrix matrix() const { return TransformationMatrix(m_a, m_b, m_c, m_d, m_e, m_f); }
@@ -65,7 +66,7 @@
return false;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
MatrixTransformOperation(double a, double b, double c, double d, double e, double f)
: m_a(a)
Modified: trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -38,10 +38,10 @@
return m_p == downcast<PerspectiveTransformOperation>(other).m_p;
}
-PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
+Ref<TransformOperation> PerspectiveTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
- return this;
+ return *this;
if (blendToIdentity) {
double p = floatValueForLength(m_p, 1);
Modified: trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -29,19 +29,20 @@
#include "Length.h"
#include "LengthFunctions.h"
#include "TransformOperation.h"
+#include <wtf/Ref.h>
namespace WebCore {
class PerspectiveTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<PerspectiveTransformOperation> create(const Length& p)
+ static Ref<PerspectiveTransformOperation> create(const Length& p)
{
- return adoptRef(new PerspectiveTransformOperation(p));
+ return adoptRef(*new PerspectiveTransformOperation(p));
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
- return adoptRef(new PerspectiveTransformOperation(m_p));
+ return adoptRef(*new PerspectiveTransformOperation(m_p));
}
Length perspective() const { return m_p; }
@@ -61,7 +62,7 @@
return false;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
PerspectiveTransformOperation(const Length& p)
: m_p(p)
Modified: trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -36,10 +36,10 @@
return m_x == r.m_x && m_y == r.m_y && m_z == r.m_z && m_angle == r.m_angle;
}
-PassRefPtr<TransformOperation> RotateTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
+Ref<TransformOperation> RotateTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
- return this;
+ return *this;
if (blendToIdentity)
return RotateTransformOperation::create(m_x, m_y, m_z, m_angle - m_angle * progress, m_type);
Modified: trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -26,24 +26,25 @@
#define RotateTransformOperation_h
#include "TransformOperation.h"
+#include <wtf/Ref.h>
namespace WebCore {
class RotateTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<RotateTransformOperation> create(double angle, OperationType type)
+ static Ref<RotateTransformOperation> create(double angle, OperationType type)
{
- return adoptRef(new RotateTransformOperation(0, 0, 1, angle, type));
+ return adoptRef(*new RotateTransformOperation(0, 0, 1, angle, type));
}
- static PassRefPtr<RotateTransformOperation> create(double x, double y, double z, double angle, OperationType type)
+ static Ref<RotateTransformOperation> create(double x, double y, double z, double angle, OperationType type)
{
- return adoptRef(new RotateTransformOperation(x, y, z, angle, type));
+ return adoptRef(*new RotateTransformOperation(x, y, z, angle, type));
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
- return adoptRef(new RotateTransformOperation(m_x, m_y, m_z, m_angle, m_type));
+ return adoptRef(*new RotateTransformOperation(m_x, m_y, m_z, m_angle, m_type));
}
double x() const { return m_x; }
@@ -66,7 +67,7 @@
return false;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
RotateTransformOperation(double x, double y, double z, double angle, OperationType type)
: m_x(x)
Modified: trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -34,10 +34,10 @@
return m_x == s.m_x && m_y == s.m_y && m_z == s.m_z;
}
-PassRefPtr<TransformOperation> ScaleTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
+Ref<TransformOperation> ScaleTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
- return this;
+ return *this;
if (blendToIdentity)
return ScaleTransformOperation::create(WebCore::blend(m_x, 1.0, progress),
Modified: trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -26,24 +26,25 @@
#define ScaleTransformOperation_h
#include "TransformOperation.h"
+#include <wtf/Ref.h>
namespace WebCore {
class ScaleTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<ScaleTransformOperation> create(double sx, double sy, OperationType type)
+ static Ref<ScaleTransformOperation> create(double sx, double sy, OperationType type)
{
- return adoptRef(new ScaleTransformOperation(sx, sy, 1, type));
+ return adoptRef(*new ScaleTransformOperation(sx, sy, 1, type));
}
- static PassRefPtr<ScaleTransformOperation> create(double sx, double sy, double sz, OperationType type)
+ static Ref<ScaleTransformOperation> create(double sx, double sy, double sz, OperationType type)
{
- return adoptRef(new ScaleTransformOperation(sx, sy, sz, type));
+ return adoptRef(*new ScaleTransformOperation(sx, sy, sz, type));
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
- return adoptRef(new ScaleTransformOperation(m_x, m_y, m_z, m_type));
+ return adoptRef(*new ScaleTransformOperation(m_x, m_y, m_z, m_type));
}
double x() const { return m_x; }
@@ -65,7 +66,7 @@
return false;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
ScaleTransformOperation(double sx, double sy, double sz, OperationType type)
: m_x(sx)
Modified: trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -34,10 +34,10 @@
return m_angleX == s.m_angleX && m_angleY == s.m_angleY;
}
-PassRefPtr<TransformOperation> SkewTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
+Ref<TransformOperation> SkewTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
- return this;
+ return *this;
if (blendToIdentity)
return SkewTransformOperation::create(WebCore::blend(m_angleX, 0.0, progress), WebCore::blend(m_angleY, 0.0, progress), m_type);
Modified: trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -26,19 +26,20 @@
#define SkewTransformOperation_h
#include "TransformOperation.h"
+#include <wtf/Ref.h>
namespace WebCore {
class SkewTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<SkewTransformOperation> create(double angleX, double angleY, OperationType type)
+ static Ref<SkewTransformOperation> create(double angleX, double angleY, OperationType type)
{
- return adoptRef(new SkewTransformOperation(angleX, angleY, type));
+ return adoptRef(*new SkewTransformOperation(angleX, angleY, type));
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
- return adoptRef(new SkewTransformOperation(m_angleX, m_angleY, m_type));
+ return adoptRef(*new SkewTransformOperation(m_angleX, m_angleY, m_type));
}
double angleX() const { return m_angleX; }
@@ -59,7 +60,7 @@
return false;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
SkewTransformOperation(double angleX, double angleY, OperationType type)
: m_angleX(angleX)
Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -27,7 +27,7 @@
#include "FloatSize.h"
#include "TransformationMatrix.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
#include <wtf/TypeCasts.h>
@@ -54,7 +54,7 @@
virtual ~TransformOperation() { }
- virtual PassRefPtr<TransformOperation> clone() const = 0;
+ virtual Ref<TransformOperation> clone() const = 0;
virtual bool operator==(const TransformOperation&) const = 0;
bool operator!=(const TransformOperation& o) const { return !(*this == o); }
@@ -64,7 +64,7 @@
// Return true if the borderBoxSize was used in the computation, false otherwise.
virtual bool apply(TransformationMatrix&, const FloatSize& borderBoxSize) const = 0;
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) = 0;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) = 0;
virtual OperationType type() const = 0;
virtual bool isSameType(const TransformOperation&) const { return false; }
Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -82,7 +82,7 @@
for (unsigned i = 0; i < size; i++) {
RefPtr<TransformOperation> fromOperation = (i < fromSize) ? from.operations()[i].get() : nullptr;
RefPtr<TransformOperation> toOperation = (i < toSize) ? operations()[i].get() : nullptr;
- RefPtr<TransformOperation> blendedOperation = toOperation ? toOperation->blend(fromOperation.get(), progress) : (fromOperation ? fromOperation->blend(nullptr, progress, true) : nullptr);
+ RefPtr<TransformOperation> blendedOperation = toOperation ? toOperation->blend(fromOperation.get(), progress) : (fromOperation ? RefPtr<TransformOperation>(fromOperation->blend(nullptr, progress, true)) : nullptr);
if (blendedOperation)
result.operations().append(blendedOperation);
else {
Modified: trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.cpp (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.cpp 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.cpp 2015-05-12 09:53:27 UTC (rev 184193)
@@ -33,10 +33,10 @@
return m_x == t.m_x && m_y == t.m_y && m_z == t.m_z;
}
-PassRefPtr<TransformOperation> TranslateTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
+Ref<TransformOperation> TranslateTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
- return this;
+ return *this;
Length zeroLength(0, Fixed);
if (blendToIdentity)
Modified: trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h (184192 => 184193)
--- trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h 2015-05-12 09:36:13 UTC (rev 184192)
+++ trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h 2015-05-12 09:53:27 UTC (rev 184193)
@@ -28,24 +28,25 @@
#include "Length.h"
#include "LengthFunctions.h"
#include "TransformOperation.h"
+#include <wtf/Ref.h>
namespace WebCore {
class TranslateTransformOperation final : public TransformOperation {
public:
- static PassRefPtr<TranslateTransformOperation> create(const Length& tx, const Length& ty, OperationType type)
+ static Ref<TranslateTransformOperation> create(const Length& tx, const Length& ty, OperationType type)
{
- return adoptRef(new TranslateTransformOperation(tx, ty, Length(0, Fixed), type));
+ return adoptRef(*new TranslateTransformOperation(tx, ty, Length(0, Fixed), type));
}
- static PassRefPtr<TranslateTransformOperation> create(const Length& tx, const Length& ty, const Length& tz, OperationType type)
+ static Ref<TranslateTransformOperation> create(const Length& tx, const Length& ty, const Length& tz, OperationType type)
{
- return adoptRef(new TranslateTransformOperation(tx, ty, tz, type));
+ return adoptRef(*new TranslateTransformOperation(tx, ty, tz, type));
}
- virtual PassRefPtr<TransformOperation> clone() const override
+ virtual Ref<TransformOperation> clone() const override
{
- return adoptRef(new TranslateTransformOperation(m_x, m_y, m_z, m_type));
+ return adoptRef(*new TranslateTransformOperation(m_x, m_y, m_z, m_type));
}
double x(const FloatSize& borderBoxSize) const { return floatValueForLength(m_x, borderBoxSize.width()); }
@@ -70,7 +71,7 @@
return m_x.isPercent() || m_y.isPercent();
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+ virtual Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
TranslateTransformOperation(const Length& tx, const Length& ty, const Length& tz, OperationType type)
: m_x(tx)