--- a/dom/base/DOMMatrix.cpp
+++ b/dom/base/DOMMatrix.cpp
@@ -17,23 +17,60 @@
#include "nsStyleTransformMatrix.h"
#include "nsGlobalWindowInner.h"
#include <math.h>
namespace mozilla {
namespace dom {
+template <typename T>
+static void
+SetDataInMatrix(DOMMatrixReadOnly* aMatrix, const T* aData, int aLength, ErrorResult& aRv);
+
static const double radPerDegree = 2.0 * M_PI / 360.0;
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMMatrixReadOnly, mParent)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMMatrixReadOnly, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMMatrixReadOnly, Release)
+JSObject*
+DOMMatrixReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+{
+ return DOMMatrixReadOnlyBinding::Wrap(aCx, this, aGivenProto);
+}
+
+already_AddRefed<DOMMatrixReadOnly>
+DOMMatrixReadOnly::Constructor(
+ const GlobalObject& aGlobal,
+ const Optional<StringOrUnrestrictedDoubleSequence>& aArg,
+ ErrorResult& aRv)
+{
+ RefPtr<DOMMatrixReadOnly> rval = new DOMMatrixReadOnly(aGlobal.GetAsSupports());
+ if (!aArg.WasPassed()) {
+ return rval.forget();
+ }
+
+ const auto& arg = aArg.Value();
+ if (arg.IsString()) {
+ nsCOMPtr<nsPIDOMWindowInner> win = do_QueryInterface(aGlobal.GetAsSupports());
+ if (!win) {
+ aRv.ThrowTypeError<MSG_ILLEGAL_CONSTRUCTOR>();
+ return nullptr;
+ }
+ rval->SetMatrixValue(arg.GetAsString(), aRv);
+ } else {
+ const auto& sequence = arg.GetAsUnrestrictedDoubleSequence();
+ SetDataInMatrix(rval, sequence.Elements(), sequence.Length(), aRv);
+ }
+
+ return rval.forget();
+}
+
already_AddRefed<DOMMatrix>
DOMMatrixReadOnly::Translate(double aTx,
double aTy,
double aTz) const
{
RefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
retval->TranslateSelf(aTx, aTy, aTz);
@@ -360,17 +397,19 @@ DOMMatrix::Constructor(const GlobalObjec
already_AddRefed<DOMMatrix>
DOMMatrix::Constructor(const GlobalObject& aGlobal, const DOMMatrixReadOnly& aOther, ErrorResult& aRv)
{
RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports(), aOther);
return obj.forget();
}
-template <typename T> void SetDataInMatrix(DOMMatrix* aMatrix, const T* aData, int aLength, ErrorResult& aRv)
+template <typename T>
+static void
+SetDataInMatrix(DOMMatrixReadOnly* aMatrix, const T* aData, int aLength, ErrorResult& aRv)
{
if (aLength == 16) {
aMatrix->SetM11(aData[0]);
aMatrix->SetM12(aData[1]);
aMatrix->SetM13(aData[2]);
aMatrix->SetM14(aData[3]);
aMatrix->SetM21(aData[4]);
aMatrix->SetM22(aData[5]);
@@ -387,17 +426,19 @@ template <typename T> void SetDataInMatr
} else if (aLength == 6) {
aMatrix->SetA(aData[0]);
aMatrix->SetB(aData[1]);
aMatrix->SetC(aData[2]);
aMatrix->SetD(aData[3]);
aMatrix->SetE(aData[4]);
aMatrix->SetF(aData[5]);
} else {
- aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
+ nsAutoString lengthStr;
+ lengthStr.AppendInt(aLength);
+ aRv.ThrowTypeError<MSG_MATRIX_INIT_LENGTH_WRONG>(lengthStr);
}
}
already_AddRefed<DOMMatrix>
DOMMatrix::Constructor(const GlobalObject& aGlobal, const Float32Array& aArray32, ErrorResult& aRv)
{
RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
aArray32.ComputeLengthAndData();
@@ -420,17 +461,18 @@ already_AddRefed<DOMMatrix>
DOMMatrix::Constructor(const GlobalObject& aGlobal, const Sequence<double>& aNumberSequence, ErrorResult& aRv)
{
RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
SetDataInMatrix(obj, aNumberSequence.Elements(), aNumberSequence.Length(), aRv);
return obj.forget();
}
-void DOMMatrix::Ensure3DMatrix()
+void
+DOMMatrixReadOnly::Ensure3DMatrix()
{
if (!mMatrix3D) {
mMatrix3D = new gfx::Matrix4x4(gfx::Matrix4x4::From2D(*mMatrix2D));
mMatrix2D = nullptr;
}
}
DOMMatrix*
@@ -647,18 +689,18 @@ DOMMatrix::InvertSelf()
mMatrix3D = new gfx::Matrix4x4();
mMatrix3D->SetNAN();
}
return this;
}
-DOMMatrix*
-DOMMatrix::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv)
+DOMMatrixReadOnly*
+DOMMatrixReadOnly::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv)
{
// An empty string is a no-op.
if (aTransformList.IsEmpty()) {
return this;
}
gfx::Matrix4x4 transform;
bool contains3dTransform = false;
@@ -682,16 +724,23 @@ DOMMatrix::SetMatrixValue(const nsAStrin
} else {
mMatrix3D = new gfx::Matrix4x4(transform);
mMatrix2D = nullptr;
}
return this;
}
+DOMMatrix*
+DOMMatrix::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv)
+{
+ DOMMatrixReadOnly::SetMatrixValue(aTransformList, aRv);
+ return this;
+}
+
JSObject*
DOMMatrix::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMMatrixBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
--- a/dom/base/DOMMatrix.h
+++ b/dom/base/DOMMatrix.h
@@ -18,16 +18,17 @@
#include "mozilla/gfx/Matrix.h" // for Matrix4x4
namespace mozilla {
namespace dom {
class GlobalObject;
class DOMMatrix;
class DOMPoint;
+class StringOrUnrestrictedDoubleSequence;
struct DOMPointInit;
class DOMMatrixReadOnly : public nsWrapperCache
{
public:
explicit DOMMatrixReadOnly(nsISupports* aParent)
: mParent(aParent)
, mMatrix2D(new gfx::Matrix())
@@ -48,16 +49,24 @@ public:
: mParent(aParent)
{
mMatrix3D = new gfx::Matrix4x4(aMatrix);
}
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMMatrixReadOnly)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMMatrixReadOnly)
+ nsISupports* GetParentObject() const { return mParent; }
+ virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
+
+ static already_AddRefed<DOMMatrixReadOnly> Constructor(
+ const GlobalObject& aGlobal,
+ const Optional<StringOrUnrestrictedDoubleSequence>& aArg,
+ ErrorResult& aRv);
+
#define GetMatrixMember(entry2D, entry3D, default) \
{ \
if (mMatrix3D) { \
return mMatrix3D->entry3D; \
} \
return mMatrix2D->entry2D; \
}
@@ -91,16 +100,62 @@ public:
double M41() const GetMatrixMember(_31, _41, 0)
double M42() const GetMatrixMember(_32, _42, 0)
double M43() const Get3DMatrixMember(_43, 0)
double M44() const Get3DMatrixMember(_44, 1.0)
#undef GetMatrixMember
#undef Get3DMatrixMember
+ // Defined here so we can construct DOMMatrixReadOnly objects.
+#define Set2DMatrixMember(entry2D, entry3D) \
+{ \
+ if (mMatrix3D) { \
+ mMatrix3D->entry3D = v; \
+ } else { \
+ mMatrix2D->entry2D = v; \
+ } \
+}
+
+#define Set3DMatrixMember(entry3D, default) \
+{ \
+ if (mMatrix3D || (v != default)) { \
+ Ensure3DMatrix(); \
+ mMatrix3D->entry3D = v; \
+ } \
+}
+
+ void SetA(double v) Set2DMatrixMember(_11, _11)
+ void SetB(double v) Set2DMatrixMember(_12, _12)
+ void SetC(double v) Set2DMatrixMember(_21, _21)
+ void SetD(double v) Set2DMatrixMember(_22, _22)
+ void SetE(double v) Set2DMatrixMember(_31, _41)
+ void SetF(double v) Set2DMatrixMember(_32, _42)
+
+ void SetM11(double v) Set2DMatrixMember(_11, _11)
+ void SetM12(double v) Set2DMatrixMember(_12, _12)
+ void SetM13(double v) Set3DMatrixMember(_13, 0)
+ void SetM14(double v) Set3DMatrixMember(_14, 0)
+ void SetM21(double v) Set2DMatrixMember(_21, _21)
+ void SetM22(double v) Set2DMatrixMember(_22, _22)
+ void SetM23(double v) Set3DMatrixMember(_23, 0)
+ void SetM24(double v) Set3DMatrixMember(_24, 0)
+ void SetM31(double v) Set3DMatrixMember(_31, 0)
+ void SetM32(double v) Set3DMatrixMember(_32, 0)
+ void SetM33(double v) Set3DMatrixMember(_33, 1.0)
+ void SetM34(double v) Set3DMatrixMember(_34, 0)
+ void SetM41(double v) Set2DMatrixMember(_31, _41)
+ void SetM42(double v) Set2DMatrixMember(_32, _42)
+ void SetM43(double v) Set3DMatrixMember(_43, 0)
+ void SetM44(double v) Set3DMatrixMember(_44, 1.0)
+
+#undef Set2DMatrixMember
+#undef Set3DMatrixMember
+
+
already_AddRefed<DOMMatrix> Translate(double aTx,
double aTy,
double aTz = 0) const;
already_AddRefed<DOMMatrix> Scale(double aScale,
double aOriginX = 0,
double aOriginY = 0) const;
already_AddRefed<DOMMatrix> Scale3d(double aScale,
double aOriginX = 0,
@@ -140,16 +195,19 @@ public:
void Stringify(nsAString& aResult);
protected:
nsCOMPtr<nsISupports> mParent;
nsAutoPtr<gfx::Matrix> mMatrix2D;
nsAutoPtr<gfx::Matrix4x4> mMatrix3D;
virtual ~DOMMatrixReadOnly() {}
+ DOMMatrixReadOnly* SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv);
+ void Ensure3DMatrix();
+
private:
DOMMatrixReadOnly() = delete;
DOMMatrixReadOnly(const DOMMatrixReadOnly&) = delete;
DOMMatrixReadOnly& operator=(const DOMMatrixReadOnly&) = delete;
};
class DOMMatrix : public DOMMatrixReadOnly
{
@@ -174,63 +232,18 @@ public:
Constructor(const GlobalObject& aGlobal, const DOMMatrixReadOnly& aOther, ErrorResult& aRv);
static already_AddRefed<DOMMatrix>
Constructor(const GlobalObject& aGlobal, const Float32Array& aArray32, ErrorResult& aRv);
static already_AddRefed<DOMMatrix>
Constructor(const GlobalObject& aGlobal, const Float64Array& aArray64, ErrorResult& aRv);
static already_AddRefed<DOMMatrix>
Constructor(const GlobalObject& aGlobal, const Sequence<double>& aNumberSequence, ErrorResult& aRv);
- nsISupports* GetParentObject() const { return mParent; }
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-#define Set2DMatrixMember(entry2D, entry3D) \
-{ \
- if (mMatrix3D) { \
- mMatrix3D->entry3D = v; \
- } else { \
- mMatrix2D->entry2D = v; \
- } \
-}
-
-#define Set3DMatrixMember(entry3D, default) \
-{ \
- if (mMatrix3D || (v != default)) { \
- Ensure3DMatrix(); \
- mMatrix3D->entry3D = v; \
- } \
-}
-
- void SetA(double v) Set2DMatrixMember(_11, _11)
- void SetB(double v) Set2DMatrixMember(_12, _12)
- void SetC(double v) Set2DMatrixMember(_21, _21)
- void SetD(double v) Set2DMatrixMember(_22, _22)
- void SetE(double v) Set2DMatrixMember(_31, _41)
- void SetF(double v) Set2DMatrixMember(_32, _42)
-
- void SetM11(double v) Set2DMatrixMember(_11, _11)
- void SetM12(double v) Set2DMatrixMember(_12, _12)
- void SetM13(double v) Set3DMatrixMember(_13, 0)
- void SetM14(double v) Set3DMatrixMember(_14, 0)
- void SetM21(double v) Set2DMatrixMember(_21, _21)
- void SetM22(double v) Set2DMatrixMember(_22, _22)
- void SetM23(double v) Set3DMatrixMember(_23, 0)
- void SetM24(double v) Set3DMatrixMember(_24, 0)
- void SetM31(double v) Set3DMatrixMember(_31, 0)
- void SetM32(double v) Set3DMatrixMember(_32, 0)
- void SetM33(double v) Set3DMatrixMember(_33, 1.0)
- void SetM34(double v) Set3DMatrixMember(_34, 0)
- void SetM41(double v) Set2DMatrixMember(_31, _41)
- void SetM42(double v) Set2DMatrixMember(_32, _42)
- void SetM43(double v) Set3DMatrixMember(_43, 0)
- void SetM44(double v) Set3DMatrixMember(_44, 1.0)
-
-#undef Set2DMatrixMember
-#undef Set3DMatrixMember
-
DOMMatrix* MultiplySelf(const DOMMatrix& aOther);
DOMMatrix* PreMultiplySelf(const DOMMatrix& aOther);
DOMMatrix* TranslateSelf(double aTx,
double aTy,
double aTz = 0);
DOMMatrix* ScaleSelf(double aScale,
double aOriginX = 0,
double aOriginY = 0);
@@ -252,18 +265,16 @@ public:
DOMMatrix* RotateAxisAngleSelf(double aX,
double aY,
double aZ,
double aAngle);
DOMMatrix* SkewXSelf(double aSx);
DOMMatrix* SkewYSelf(double aSy);
DOMMatrix* InvertSelf();
DOMMatrix* SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv);
-protected:
- void Ensure3DMatrix();
virtual ~DOMMatrix() {}
};
} // namespace dom
} // namespace mozilla
#endif /*MOZILLA_DOM_DOMMATRIX_H_*/
--- a/dom/base/DOMPoint.cpp
+++ b/dom/base/DOMPoint.cpp
@@ -12,19 +12,42 @@
using namespace mozilla;
using namespace mozilla::dom;
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMPointReadOnly, mParent)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMPointReadOnly, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMPointReadOnly, Release)
+already_AddRefed<DOMPointReadOnly>
+DOMPointReadOnly::FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams)
+{
+ RefPtr<DOMPointReadOnly> obj =
+ new DOMPointReadOnly(aGlobal.GetAsSupports(), aParams.mX, aParams.mY,
+ aParams.mZ, aParams.mW);
+ return obj.forget();
+}
+
+already_AddRefed<DOMPointReadOnly>
+DOMPointReadOnly::Constructor(const GlobalObject& aGlobal, double aX, double aY,
+ double aZ, double aW, ErrorResult& aRV)
+{
+ RefPtr<DOMPointReadOnly> obj =
+ new DOMPointReadOnly(aGlobal.GetAsSupports(), aX, aY, aZ, aW);
+ return obj.forget();
+}
+
+JSObject*
+DOMPointReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+{
+ return DOMPointReadOnlyBinding::Wrap(aCx, this, aGivenProto);
+}
+
already_AddRefed<DOMPoint>
-DOMPoint::Constructor(const GlobalObject& aGlobal, const DOMPointInit& aParams,
- ErrorResult& aRV)
+DOMPoint::FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams)
{
RefPtr<DOMPoint> obj =
new DOMPoint(aGlobal.GetAsSupports(), aParams.mX, aParams.mY,
aParams.mZ, aParams.mW);
return obj.forget();
}
already_AddRefed<DOMPoint>
--- a/dom/base/DOMPoint.h
+++ b/dom/base/DOMPoint.h
@@ -29,47 +29,54 @@ public:
: mParent(aParent)
, mX(aX)
, mY(aY)
, mZ(aZ)
, mW(aW)
{
}
+ static already_AddRefed<DOMPointReadOnly>
+ FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams);
+ static already_AddRefed<DOMPointReadOnly>
+ Constructor(const GlobalObject& aGlobal, double aX, double aY,
+ double aZ, double aW, ErrorResult& aRV);
+
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMPointReadOnly)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMPointReadOnly)
double X() const { return mX; }
double Y() const { return mY; }
double Z() const { return mZ; }
double W() const { return mW; }
+ nsISupports* GetParentObject() const { return mParent; }
+ virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+
protected:
virtual ~DOMPointReadOnly() {}
nsCOMPtr<nsISupports> mParent;
double mX, mY, mZ, mW;
};
class DOMPoint final : public DOMPointReadOnly
{
public:
explicit DOMPoint(nsISupports* aParent, double aX = 0.0, double aY = 0.0,
double aZ = 0.0, double aW = 1.0)
: DOMPointReadOnly(aParent, aX, aY, aZ, aW)
{}
static already_AddRefed<DOMPoint>
- Constructor(const GlobalObject& aGlobal, const DOMPointInit& aParams,
- ErrorResult& aRV);
+ FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams);
static already_AddRefed<DOMPoint>
Constructor(const GlobalObject& aGlobal, double aX, double aY,
double aZ, double aW, ErrorResult& aRV);
- nsISupports* GetParentObject() const { return mParent; }
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
void SetX(double aX) { mX = aX; }
void SetY(double aY) { mY = aY; }
void SetZ(double aZ) { mZ = aZ; }
void SetW(double aW) { mW = aW; }
};
--- a/dom/base/DOMQuad.cpp
+++ b/dom/base/DOMQuad.cpp
@@ -10,17 +10,17 @@
#include "mozilla/dom/DOMPoint.h"
#include "mozilla/dom/DOMRect.h"
#include <algorithm>
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::gfx;
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMQuad, mParent, mBounds, mPoints[0],
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMQuad, mParent, mPoints[0],
mPoints[1], mPoints[2], mPoints[3])
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMQuad, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMQuad, Release)
DOMQuad::DOMQuad(nsISupports* aParent, CSSPoint aPoints[4])
: mParent(aParent)
{
@@ -48,20 +48,20 @@ already_AddRefed<DOMQuad>
DOMQuad::Constructor(const GlobalObject& aGlobal,
const DOMPointInit& aP1,
const DOMPointInit& aP2,
const DOMPointInit& aP3,
const DOMPointInit& aP4,
ErrorResult& aRV)
{
RefPtr<DOMQuad> obj = new DOMQuad(aGlobal.GetAsSupports());
- obj->mPoints[0] = DOMPoint::Constructor(aGlobal, aP1, aRV);
- obj->mPoints[1] = DOMPoint::Constructor(aGlobal, aP2, aRV);
- obj->mPoints[2] = DOMPoint::Constructor(aGlobal, aP3, aRV);
- obj->mPoints[3] = DOMPoint::Constructor(aGlobal, aP4, aRV);
+ obj->mPoints[0] = DOMPoint::FromPoint(aGlobal, aP1);
+ obj->mPoints[1] = DOMPoint::FromPoint(aGlobal, aP2);
+ obj->mPoints[2] = DOMPoint::FromPoint(aGlobal, aP3);
+ obj->mPoints[3] = DOMPoint::FromPoint(aGlobal, aP4);
return obj.forget();
}
already_AddRefed<DOMQuad>
DOMQuad::Constructor(const GlobalObject& aGlobal, const DOMRectReadOnly& aRect,
ErrorResult& aRV)
{
CSSPoint points[4];
@@ -69,92 +69,49 @@ DOMQuad::Constructor(const GlobalObject&
points[0] = CSSPoint(x, y);
points[1] = CSSPoint(x + w, y);
points[2] = CSSPoint(x + w, y + h);
points[3] = CSSPoint(x, y + h);
RefPtr<DOMQuad> obj = new DOMQuad(aGlobal.GetAsSupports(), points);
return obj.forget();
}
-class DOMQuad::QuadBounds final : public DOMRectReadOnly
+void
+DOMQuad::GetHorizontalMinMax(double* aX1, double* aX2) const
{
-public:
- explicit QuadBounds(DOMQuad* aQuad)
- : DOMRectReadOnly(aQuad->GetParentObject())
- , mQuad(aQuad)
- {}
-
- NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(QuadBounds, DOMRectReadOnly)
- NS_DECL_ISUPPORTS_INHERITED
-
- virtual double X() const override
- {
- double x1, x2;
- GetHorizontalMinMax(&x1, &x2);
- return x1;
+ double x1, x2;
+ x1 = x2 = Point(0)->X();
+ for (uint32_t i = 1; i < 4; ++i) {
+ double x = Point(i)->X();
+ x1 = std::min(x1, x);
+ x2 = std::max(x2, x);
}
- virtual double Y() const override
- {
- double y1, y2;
- GetVerticalMinMax(&y1, &y2);
- return y1;
- }
- virtual double Width() const override
- {
- double x1, x2;
- GetHorizontalMinMax(&x1, &x2);
- return x2 - x1;
- }
- virtual double Height() const override
- {
- double y1, y2;
- GetVerticalMinMax(&y1, &y2);
- return y2 - y1;
- }
+ *aX1 = x1;
+ *aX2 = x2;
+}
- void GetHorizontalMinMax(double* aX1, double* aX2) const
- {
- double x1, x2;
- x1 = x2 = mQuad->Point(0)->X();
- for (uint32_t i = 1; i < 4; ++i) {
- double x = mQuad->Point(i)->X();
- x1 = std::min(x1, x);
- x2 = std::max(x2, x);
- }
- *aX1 = x1;
- *aX2 = x2;
+void
+DOMQuad::GetVerticalMinMax(double* aY1, double* aY2) const
+{
+ double y1, y2;
+ y1 = y2 = Point(0)->Y();
+ for (uint32_t i = 1; i < 4; ++i) {
+ double y = Point(i)->Y();
+ y1 = std::min(y1, y);
+ y2 = std::max(y2, y);
}
+ *aY1 = y1;
+ *aY2 = y2;
+}
- void GetVerticalMinMax(double* aY1, double* aY2) const
- {
- double y1, y2;
- y1 = y2 = mQuad->Point(0)->Y();
- for (uint32_t i = 1; i < 4; ++i) {
- double y = mQuad->Point(i)->Y();
- y1 = std::min(y1, y);
- y2 = std::max(y2, y);
- }
- *aY1 = y1;
- *aY2 = y2;
- }
-
-protected:
- virtual ~QuadBounds() {}
+already_AddRefed<DOMRectReadOnly>
+DOMQuad::GetBounds() const
+{
+ double x1, x2;
+ double y1, y2;
- RefPtr<DOMQuad> mQuad;
-};
-
-NS_IMPL_CYCLE_COLLECTION_INHERITED(DOMQuad::QuadBounds, DOMRectReadOnly, mQuad)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMQuad::QuadBounds)
-NS_INTERFACE_MAP_END_INHERITING(DOMRectReadOnly)
+ GetHorizontalMinMax(&x1, &x2);
+ GetVerticalMinMax(&y1, &y2);
-NS_IMPL_ADDREF_INHERITED(DOMQuad::QuadBounds, DOMRectReadOnly)
-NS_IMPL_RELEASE_INHERITED(DOMQuad::QuadBounds, DOMRectReadOnly)
-
-DOMRectReadOnly*
-DOMQuad::Bounds() const
-{
- if (!mBounds) {
- mBounds = new QuadBounds(const_cast<DOMQuad*>(this));
- }
- return mBounds;
+ RefPtr<DOMRectReadOnly> rval = new DOMRectReadOnly(GetParentObject(),
+ x1, y1, x2 - x1, y2 - y1);
+ return rval.forget();
}
--- a/dom/base/DOMQuad.h
+++ b/dom/base/DOMQuad.h
@@ -43,28 +43,28 @@ public:
const DOMPointInit& aP2,
const DOMPointInit& aP3,
const DOMPointInit& aP4,
ErrorResult& aRV);
static already_AddRefed<DOMQuad>
Constructor(const GlobalObject& aGlobal, const DOMRectReadOnly& aRect,
ErrorResult& aRV);
- DOMRectReadOnly* Bounds() const;
+ already_AddRefed<DOMRectReadOnly> GetBounds() const;
DOMPoint* P1() const { return mPoints[0]; }
DOMPoint* P2() const { return mPoints[1]; }
DOMPoint* P3() const { return mPoints[2]; }
DOMPoint* P4() const { return mPoints[3]; }
- DOMPoint* Point(uint32_t aIndex) { return mPoints[aIndex]; }
+ DOMPoint* Point(uint32_t aIndex) const { return mPoints[aIndex]; }
protected:
- class QuadBounds;
+ void GetHorizontalMinMax(double* aX1, double* aX2) const;
+ void GetVerticalMinMax(double* aY1, double* aY2) const;
nsCOMPtr<nsISupports> mParent;
RefPtr<DOMPoint> mPoints[4];
- mutable RefPtr<QuadBounds> mBounds; // allocated lazily
};
} // namespace dom
} // namespace mozilla
#endif /*MOZILLA_DOMRECT_H_*/
--- a/dom/base/DOMRect.cpp
+++ b/dom/base/DOMRect.cpp
@@ -23,36 +23,37 @@ NS_INTERFACE_MAP_END
JSObject*
DOMRectReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
MOZ_ASSERT(mParent);
return DOMRectReadOnlyBinding::Wrap(aCx, this, aGivenProto);
}
+already_AddRefed<DOMRectReadOnly>
+DOMRectReadOnly::Constructor(const GlobalObject& aGlobal, double aX, double aY,
+ double aWidth, double aHeight, ErrorResult& aRv)
+{
+ RefPtr<DOMRectReadOnly> obj =
+ new DOMRectReadOnly(aGlobal.GetAsSupports(), aX, aY, aWidth, aHeight);
+ return obj.forget();
+}
+
// -----------------------------------------------------------------------------
JSObject*
DOMRect::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
MOZ_ASSERT(mParent);
return DOMRectBinding::Wrap(aCx, this, aGivenProto);
}
already_AddRefed<DOMRect>
-DOMRect::Constructor(const GlobalObject& aGlobal, ErrorResult& aRV)
-{
- RefPtr<DOMRect> obj =
- new DOMRect(aGlobal.GetAsSupports(), 0.0, 0.0, 0.0, 0.0);
- return obj.forget();
-}
-
-already_AddRefed<DOMRect>
DOMRect::Constructor(const GlobalObject& aGlobal, double aX, double aY,
- double aWidth, double aHeight, ErrorResult& aRV)
+ double aWidth, double aHeight, ErrorResult& aRv)
{
RefPtr<DOMRect> obj =
new DOMRect(aGlobal.GetAsSupports(), aX, aY, aWidth, aHeight);
return obj.forget();
}
// -----------------------------------------------------------------------------
--- a/dom/base/DOMRect.h
+++ b/dom/base/DOMRect.h
@@ -26,32 +26,54 @@ class DOMRectReadOnly : public nsISuppor
{
protected:
virtual ~DOMRectReadOnly() {}
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMRectReadOnly)
- explicit DOMRectReadOnly(nsISupports* aParent)
+ explicit DOMRectReadOnly(nsISupports* aParent, double aX = 0, double aY = 0,
+ double aWidth = 0, double aHeight = 0)
: mParent(aParent)
+ , mX(aX)
+ , mY(aY)
+ , mWidth(aWidth)
+ , mHeight(aHeight)
{
}
nsISupports* GetParentObject() const
{
MOZ_ASSERT(mParent);
return mParent;
}
+
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
- virtual double X() const = 0;
- virtual double Y() const = 0;
- virtual double Width() const = 0;
- virtual double Height() const = 0;
+ static already_AddRefed<DOMRectReadOnly>
+ Constructor(const GlobalObject& aGlobal, double aX, double aY,
+ double aWidth, double aHeight, ErrorResult& aRv);
+
+ double X() const
+ {
+ return mX;
+ }
+ double Y() const
+ {
+ return mY;
+ }
+ double Width() const
+ {
+ return mWidth;
+ }
+ double Height() const
+ {
+ return mHeight;
+ }
double Left() const
{
double x = X(), w = Width();
return std::min(x, x + w);
}
double Top() const
{
@@ -66,63 +88,41 @@ public:
double Bottom() const
{
double y = Y(), h = Height();
return std::max(y, y + h);
}
protected:
nsCOMPtr<nsISupports> mParent;
+ double mX, mY, mWidth, mHeight;
};
class DOMRect final : public DOMRectReadOnly
{
public:
explicit DOMRect(nsISupports* aParent, double aX = 0, double aY = 0,
double aWidth = 0, double aHeight = 0)
- : DOMRectReadOnly(aParent)
- , mX(aX)
- , mY(aY)
- , mWidth(aWidth)
- , mHeight(aHeight)
+ : DOMRectReadOnly(aParent, aX, aY, aWidth, aHeight)
{
}
NS_INLINE_DECL_REFCOUNTING_INHERITED(DOMRect, DOMRectReadOnly)
static already_AddRefed<DOMRect>
- Constructor(const GlobalObject& aGlobal, ErrorResult& aRV);
- static already_AddRefed<DOMRect>
Constructor(const GlobalObject& aGlobal, double aX, double aY,
- double aWidth, double aHeight, ErrorResult& aRV);
+ double aWidth, double aHeight, ErrorResult& aRv);
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
void SetRect(float aX, float aY, float aWidth, float aHeight) {
mX = aX; mY = aY; mWidth = aWidth; mHeight = aHeight;
}
void SetLayoutRect(const nsRect& aLayoutRect);
- virtual double X() const override
- {
- return mX;
- }
- virtual double Y() const override
- {
- return mY;
- }
- virtual double Width() const override
- {
- return mWidth;
- }
- virtual double Height() const override
- {
- return mHeight;
- }
-
void SetX(double aX)
{
mX = aX;
}
void SetY(double aY)
{
mY = aY;
}
@@ -135,21 +135,18 @@ public:
mHeight = aHeight;
}
static DOMRect* FromSupports(nsISupports* aSupports)
{
return static_cast<DOMRect*>(aSupports);
}
-protected:
- double mX, mY, mWidth, mHeight;
-
private:
- ~DOMRect() {};
+ ~DOMRect() {}
};
class DOMRectList final : public nsISupports,
public nsWrapperCache
{
~DOMRectList() {}
public:
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -238,22 +238,20 @@ DOMInterfaces = {
'binaryNames': {
'message': 'messageMoz',
},
'implicitJSContext': [ 'filename', 'lineNumber', 'stack' ],
},
'DOMMatrixReadOnly': {
'headerFile': 'mozilla/dom/DOMMatrix.h',
- 'concrete': False,
},
'DOMPointReadOnly': {
'headerFile': 'mozilla/dom/DOMPoint.h',
- 'concrete': False,
},
'DOMRectList': {
'headerFile': 'mozilla/dom/DOMRect.h',
},
'DOMRectReadOnly': {
'headerFile': 'mozilla/dom/DOMRect.h',
--- a/dom/bindings/Errors.msg
+++ b/dom/bindings/Errors.msg
@@ -98,8 +98,9 @@ MSG_DEF(MSG_INVALID_EASING_ERROR, 1, JSE
MSG_DEF(MSG_USELESS_SETTIMEOUT, 1, JSEXN_TYPEERR, "Useless {0} call (missing quotes around argument?)")
MSG_DEF(MSG_TOKENLIST_NO_SUPPORTED_TOKENS, 2, JSEXN_TYPEERR, "{0} attribute of <{1}> does not define any supported tokens")
MSG_DEF(MSG_CACHE_STREAM_CLOSED, 0, JSEXN_TYPEERR, "Response body is a cache file stream that has already been closed.")
MSG_DEF(MSG_TIME_VALUE_OUT_OF_RANGE, 1, JSEXN_TYPEERR, "{0} is outside the supported range for time values.")
MSG_DEF(MSG_ONLY_IF_CACHED_WITHOUT_SAME_ORIGIN, 1, JSEXN_TYPEERR, "Request mode '{0}' was used, but request cache mode 'only-if-cached' can only be used with request mode 'same-origin'.")
MSG_DEF(MSG_THRESHOLD_RANGE_ERROR, 0, JSEXN_RANGEERR, "Threshold values must all be in the range [0, 1].")
MSG_DEF(MSG_WORKER_THREAD_SHUTTING_DOWN, 0, JSEXN_TYPEERR, "The Worker thread is shutting down.")
MSG_DEF(MSG_CACHE_OPEN_FAILED, 0, JSEXN_TYPEERR, "CacheStorage.open() failed to access the storage system.")
+MSG_DEF(MSG_MATRIX_INIT_LENGTH_WRONG, 1, JSEXN_TYPEERR, "Matrix init sequence must have a length of 6 or 16 (actual value: {0})")
--- a/dom/webidl/DOMMatrix.webidl
+++ b/dom/webidl/DOMMatrix.webidl
@@ -5,17 +5,18 @@
*
* The origin of this IDL file is
* http://dev.w3.org/fxtf/geometry/
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
-[Pref="layout.css.DOMMatrix.enabled"]
+[Pref="layout.css.DOMMatrix.enabled",
+ Constructor(optional (DOMString or sequence<unrestricted double>) init)]
interface DOMMatrixReadOnly {
// These attributes are simple aliases for certain elements of the 4x4 matrix
readonly attribute unrestricted double a;
readonly attribute unrestricted double b;
readonly attribute unrestricted double c;
readonly attribute unrestricted double d;
readonly attribute unrestricted double e;
readonly attribute unrestricted double f;
@@ -72,16 +73,17 @@ interface DOMMatrixReadOnly {
// Helper methods
readonly attribute boolean is2D;
readonly attribute boolean isIdentity;
DOMPoint transformPoint(optional DOMPointInit point);
[Throws] Float32Array toFloat32Array();
[Throws] Float64Array toFloat64Array();
stringifier;
+ [Default] object toJSON();
};
[Pref="layout.css.DOMMatrix.enabled",
Constructor,
Constructor(DOMString transformList),
Constructor(DOMMatrixReadOnly other),
Constructor(Float32Array array32),
Constructor(Float64Array array64),
--- a/dom/webidl/DOMPoint.webidl
+++ b/dom/webidl/DOMPoint.webidl
@@ -5,33 +5,40 @@
*
* The origin of this IDL file is
* http://dev.w3.org/fxtf/geometry/
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
-[Pref="layout.css.DOMPoint.enabled"]
+[Pref="layout.css.DOMPoint.enabled",
+ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+ optional unrestricted double z = 0, optional unrestricted double w = 1)]
interface DOMPointReadOnly {
+ [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other);
+
readonly attribute unrestricted double x;
readonly attribute unrestricted double y;
readonly attribute unrestricted double z;
readonly attribute unrestricted double w;
+
+ [Default] object toJSON();
};
[Pref="layout.css.DOMPoint.enabled",
- Constructor(optional DOMPointInit point),
- Constructor(unrestricted double x, unrestricted double y,
+ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
optional unrestricted double z = 0, optional unrestricted double w = 1)]
interface DOMPoint : DOMPointReadOnly {
+ [NewObject] static DOMPoint fromPoint(optional DOMPointInit other);
+
inherit attribute unrestricted double x;
inherit attribute unrestricted double y;
inherit attribute unrestricted double z;
inherit attribute unrestricted double w;
};
dictionary DOMPointInit {
unrestricted double x = 0;
unrestricted double y = 0;
unrestricted double z = 0;
unrestricted double w = 1;
-};
\ No newline at end of file
+};
--- a/dom/webidl/DOMQuad.webidl
+++ b/dom/webidl/DOMQuad.webidl
@@ -14,10 +14,12 @@
Constructor(optional DOMPointInit p1, optional DOMPointInit p2,
optional DOMPointInit p3, optional DOMPointInit p4),
Constructor(DOMRectReadOnly rect)]
interface DOMQuad {
[SameObject] readonly attribute DOMPoint p1;
[SameObject] readonly attribute DOMPoint p2;
[SameObject] readonly attribute DOMPoint p3;
[SameObject] readonly attribute DOMPoint p4;
- [SameObject] readonly attribute DOMRectReadOnly bounds;
-};
\ No newline at end of file
+ [NewObject] DOMRectReadOnly getBounds();
+
+ [Default] object toJSON();
+};
--- a/dom/webidl/DOMRect.webidl
+++ b/dom/webidl/DOMRect.webidl
@@ -5,36 +5,39 @@
*
* The origin of this IDL file is
* http://dev.w3.org/fxtf/geometry/
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
-[Constructor,
- Constructor(unrestricted double x, unrestricted double y,
- unrestricted double width, unrestricted double height)]
+[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+ optional unrestricted double width = 0, optional unrestricted double height = 0)]
interface DOMRect : DOMRectReadOnly {
inherit attribute unrestricted double x;
inherit attribute unrestricted double y;
inherit attribute unrestricted double width;
inherit attribute unrestricted double height;
};
-[ProbablyShortLivingWrapper]
+[ProbablyShortLivingWrapper,
+ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+ optional unrestricted double width = 0, optional unrestricted double height = 0)]
interface DOMRectReadOnly {
readonly attribute unrestricted double x;
readonly attribute unrestricted double y;
readonly attribute unrestricted double width;
readonly attribute unrestricted double height;
readonly attribute unrestricted double top;
readonly attribute unrestricted double right;
readonly attribute unrestricted double bottom;
readonly attribute unrestricted double left;
+
+ [Default] object toJSON();
};
dictionary DOMRectInit {
unrestricted double x = 0;
unrestricted double y = 0;
unrestricted double width = 0;
unrestricted double height = 0;
};
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -547182,17 +547182,17 @@
"aa00e3456bf951230fb85999874795c918964cf4",
"testharness"
],
"css/geometry/DOMMatrixInit-validate-fixup.html": [
"bb27ad23e388ea50a26618bc50709d78997f1081",
"testharness"
],
"css/geometry/DOMPoint-001.html": [
- "02bf66acde06025e22d65c762234a2a37fbaab68",
+ "5c174b7b7616867e5b306c935ee5069024ba2110",
"testharness"
],
"css/geometry/DOMPoint-002.html": [
"68b09f967ee8d221b11e949a32cc27a17082633b",
"testharness"
],
"css/geometry/DOMQuad-001.html": [
"cd82e18b88904531ffbfa88f11d90dfef571a30a",
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-001.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-001.html.ini
@@ -51,179 +51,29 @@
expected: FAIL
[new DOMMatrix(sequence)]
expected: FAIL
[new DOMMatrix(matrix)]
expected: FAIL
- [new DOMMatrix(sequence) 17 elements]
- expected: FAIL
-
- [new DOMMatrix(sequence) 15 elements]
- expected: FAIL
-
- [new DOMMatrix(sequence) 5 elements]
- expected: FAIL
-
- [new DOMMatrix(sequence) 0 elements]
- expected: FAIL
-
- [new DOMMatrixReadOnly()]
- expected: FAIL
-
- [new DOMMatrixReadOnly(undefined)]
- expected: FAIL
-
- [new DOMMatrixReadOnly(new DOMMatrixReadOnly())]
- expected: FAIL
-
- [new DOMMatrixReadOnly("none")]
- expected: FAIL
-
- [new DOMMatrixReadOnly(" none")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("none ")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("NONE")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("none/**/")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("/**/none")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("")]
- expected: FAIL
-
[new DOMMatrixReadOnly(float32Array) 16 elements]
expected: FAIL
- [new DOMMatrixReadOnly(float32Array) 6 elements]
- expected: FAIL
-
[new DOMMatrixReadOnly(float64Array) 16 elements]
expected: FAIL
- [new DOMMatrixReadOnly((float64Array) 6 elements]
- expected: FAIL
-
[new DOMMatrixReadOnly(sequence) 16 elements]
expected: FAIL
- [new DOMMatrixReadOnly(sequence) 6 elements]
- expected: FAIL
-
- [new DOMMatrixReadOnly("scale(2) translateX(5px) translateY(5px)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("scale(2 2) translateX(5) translateY(5)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("scale(2, 2), translateX(5) ,translateY(5)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX (5px)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("scale(2)translateX(5px)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5em)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5ex)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5ch)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5rem)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5vw)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5vh)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5vmin)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5vmax)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("translateX(5%)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly(" ")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("/**/")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("\\0")]
- expected: FAIL
-
- [new DOMMatrixReadOnly(";")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("none;")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("null")]
- expected: FAIL
-
- [new DOMMatrixReadOnly(null)]
- expected: FAIL
-
- [new DOMMatrixReadOnly("undefined")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("inherit")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("initial")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("unset")]
- expected: FAIL
-
[new DOMMatrixReadOnly(sequence)]
expected: FAIL
[new DOMMatrixReadOnly(matrix)]
expected: FAIL
- [new DOMMatrixReadOnly("scale(2, 2), translateX(5px) translateY(5px)")]
- expected: FAIL
-
[new DOMMatrix("scale(2) translateX(5px) translateY(5px) rotate(5deg) rotate(-5deg)")]
expected: FAIL
- [new DOMMatrixReadOnly("scale(2, 2) translateX(5px) translateY(5px)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("scale(2)translateX(5px)translateY(5px)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("scale(2) translateX(calc(2 * 2.5px)) translateY(5px)")]
- expected: FAIL
-
[new DOMMatrixReadOnly("scale(2) translateX(5px) translateY(5px) rotate(5deg) rotate(-5deg)")]
expected: FAIL
- [new DOMMatrixReadOnly("rotate(5)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("rotate(5, 5, 5)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("rotate(5, 5px, 5px)")]
- expected: FAIL
-
- [new DOMMatrixReadOnly("rotate(5deg, 5px, 5px)")]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
@@ -32,15 +32,8 @@
[test multiply with inverse is identity]
expected: FAIL
[test flipX()]
expected: FAIL
[test flipY()]
expected: FAIL
-
- [test transformPoint() - 2d matrix]
- expected: FAIL
-
- [test transformPoint() - 3d matrix]
- expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-a-f-alias.html.ini
+++ /dev/null
@@ -1,37 +0,0 @@
-[DOMMatrix-a-f-alias.html]
- [DOMMatrixReadOnly getting a with throwing getter for m11]
- expected: FAIL
-
- [DOMMatrixReadOnly getting m11 with throwing getter for a]
- expected: FAIL
-
- [DOMMatrixReadOnly getting b with throwing getter for m12]
- expected: FAIL
-
- [DOMMatrixReadOnly getting m12 with throwing getter for b]
- expected: FAIL
-
- [DOMMatrixReadOnly getting c with throwing getter for m21]
- expected: FAIL
-
- [DOMMatrixReadOnly getting m21 with throwing getter for c]
- expected: FAIL
-
- [DOMMatrixReadOnly getting d with throwing getter for m22]
- expected: FAIL
-
- [DOMMatrixReadOnly getting m22 with throwing getter for d]
- expected: FAIL
-
- [DOMMatrixReadOnly getting e with throwing getter for m41]
- expected: FAIL
-
- [DOMMatrixReadOnly getting m41 with throwing getter for e]
- expected: FAIL
-
- [DOMMatrixReadOnly getting f with throwing getter for m42]
- expected: FAIL
-
- [DOMMatrixReadOnly getting m42 with throwing getter for f]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-newobject.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-newobject.html.ini
@@ -47,27 +47,8 @@
[DOMMatrixReadOnly skewX]
expected: FAIL
[DOMMatrixReadOnly skewY]
expected: FAIL
[DOMMatrixReadOnly multiply]
expected: FAIL
-
- [DOMMatrixReadOnly flipX]
- expected: FAIL
-
- [DOMMatrixReadOnly flipY]
- expected: FAIL
-
- [DOMMatrixReadOnly inverse]
- expected: FAIL
-
- [DOMMatrixReadOnly transformPoint]
- expected: FAIL
-
- [DOMMatrixReadOnly toFloat32Array]
- expected: FAIL
-
- [DOMMatrixReadOnly toFloat64Array]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-stringifier.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-stringifier.html.ini
@@ -66,19 +66,16 @@
expected: FAIL
[DOMMatrix stringifier: Number.MIN_VALUE (3d)]
expected: FAIL
[DOMMatrix stringifier: throwing getters (3d)]
expected: FAIL
- [DOMMatrixReadOnly stringifier: identity (2d)]
- expected: FAIL
-
[DOMMatrixReadOnly stringifier: identity (3d)]
expected: FAIL
[DOMMatrixReadOnly stringifier: NaN (2d)]
expected: FAIL
[DOMMatrixReadOnly stringifier: NaN (3d)]
expected: FAIL
@@ -138,19 +135,16 @@
expected: FAIL
[DOMMatrixReadOnly stringifier: Number.MIN_VALUE (2d)]
expected: FAIL
[DOMMatrixReadOnly stringifier: Number.MIN_VALUE (3d)]
expected: FAIL
- [DOMMatrixReadOnly stringifier: throwing getters (2d)]
- expected: FAIL
-
[DOMMatrixReadOnly stringifier: throwing getters (3d)]
expected: FAIL
[WebKitCSSMatrix stringifier: identity (3d)]
expected: FAIL
[WebKitCSSMatrix stringifier: NaN (2d)]
expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/css/geometry/DOMPoint-001.html.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[DOMPoint-001.html]
- [testConstructor2undefined]
- expected: FAIL
-
- [testConstructor1]
- expected: FAIL
-
- [DOMPointReadOnly constructor with no values]
- expected: FAIL
-
- [DOMPointReadOnly constructor with 4 values]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/DOMPoint-002.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMPoint-002.html.ini
@@ -1,94 +1,6 @@
[DOMPoint-002.html]
- [test DOMPoint Constructor one args]
- expected: FAIL
-
- [test DOMPoint Constructor with undefined]
- expected: FAIL
-
- [test DOMPoint Constructor with empty object]
- expected: FAIL
-
- [test DOMPoint fromPoint with empty object]
- expected: FAIL
-
- [test DOMPoint fromPoint with x]
- expected: FAIL
-
- [test DOMPoint fromPoint with x, y]
- expected: FAIL
-
- [test DOMPoint fromPoint with x, y, z]
- expected: FAIL
-
- [test DOMPoint fromPoint with x, y, z, w]
- expected: FAIL
-
- [test DOMPoint fromPoint with x, y, z, w, v]
- expected: FAIL
-
- [test DOMPoint fromPoint with x, z]
- expected: FAIL
-
- [test DOMPoint fromPoint with undefined value]
- expected: FAIL
-
[test DOMPoint matrixTransform]
expected: FAIL
- [test DOMPointReadOnly Constructor no args]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor one args]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor two args]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor three args]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor four args]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor more then four args]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor with undefined]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor with string]
- expected: FAIL
-
- [test DOMPointReadOnly Constructor with object]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with empty object]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with x]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with x, y]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with x, y, z]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with x, y, z, w]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with x, y, z, w, v]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with x, z]
- expected: FAIL
-
- [test DOMPointReadOnly fromPoint with undefined value]
- expected: FAIL
-
[test DOMPointReadOnly matrixTransform]
expected: FAIL
-
- [test DOMPointReadOnly Attributes undefined]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/DOMQuad-001.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMQuad-001.html.ini
@@ -1,48 +1,18 @@
[DOMQuad-001.html]
- [testConstructor0: bounds]
- expected: FAIL
-
[testConstructor5: bounds]
expected: FAIL
[testConstructor6: bounds]
expected: FAIL
[testConstructor7: bounds]
expected: FAIL
- [testConstructor8: bounds]
- expected: FAIL
-
- [testConstructor9: bounds]
- expected: FAIL
-
- [testConstructor10: bounds]
- expected: FAIL
-
- [testConstructor11: bounds]
- expected: FAIL
-
- [testConstructor12: bounds]
- expected: FAIL
-
- [testConstructor13: bounds]
- expected: FAIL
-
- [testConstructor14: bounds]
- expected: FAIL
-
- [testConstructor16: bounds]
- expected: FAIL
-
- [p1Top4Attributes0: bounds]
- expected: FAIL
-
[p1Top4Attributes1: bounds]
expected: FAIL
[boundsAttribute0: bounds]
expected: FAIL
[fromRect() method on DOMQuad: points]
expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/css/geometry/DOMRect-001.html.ini
+++ /dev/null
@@ -1,58 +0,0 @@
-[DOMRect-001.html]
- [testConstructor1]
- expected: FAIL
-
- [testConstructor2]
- expected: FAIL
-
- [testConstructor3]
- expected: FAIL
-
- [testConstructorUndefined1]
- expected: FAIL
-
- [testReadOnlyConstructor0]
- expected: FAIL
-
- [testReadOnlyConstructor1]
- expected: FAIL
-
- [testReadOnlyConstructor2]
- expected: FAIL
-
- [testReadOnlyConstructor3]
- expected: FAIL
-
- [testReadOnlyConstructor4]
- expected: FAIL
-
- [testReadOnlyConstructor5]
- expected: FAIL
-
- [testReadOnlyConstructorNegativeWidth]
- expected: FAIL
-
- [testReadOnlyConstructorNegativeHeight]
- expected: FAIL
-
- [testReadOnlyConstructorNegativeWidthHeight]
- expected: FAIL
-
- [testReadOnlyConstructorUndefined1]
- expected: FAIL
-
- [testReadOnlyConstructorUndefined2]
- expected: FAIL
-
- [testReadOnlyConstructorString1]
- expected: FAIL
-
- [testReadOnlyConstructorString2]
- expected: FAIL
-
- [testReadOnlySetReadOnlyAttributes]
- expected: FAIL
-
- [testReadOnlySetAttributes]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/DOMRect-002.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMRect-002.html.ini
@@ -1,64 +1,7 @@
[DOMRect-002.html]
- [DOMRect constructor with one parameter]
- expected: FAIL
-
- [DOMRect constructor with two parameters]
- expected: FAIL
-
- [DOMRect constructor with three parameters]
- expected: FAIL
-
- [DOMRect constructor with undefined]
- expected: FAIL
-
- [DOMRectReadOnly constructor without parameter]
- expected: FAIL
-
- [DOMRectReadOnly constructor with one parameter]
- expected: FAIL
-
- [DOMRectReadOnly constructor with two parameters]
- expected: FAIL
-
- [DOMRectReadOnly constructor with three parameters]
- expected: FAIL
-
- [DOMRectReadOnly constructor with four parameters]
- expected: FAIL
-
- [DOMRectReadOnly constructor with five parameters]
- expected: FAIL
-
- [DOMRectReadOnly constructor with negative width]
- expected: FAIL
-
- [DOMRectReadOnly constructor with negative height]
- expected: FAIL
-
- [DOMRectReadOnly constructor with negative width and height]
- expected: FAIL
-
- [DOMRectReadOnly constructor with undefined]
- expected: FAIL
-
- [DOMRectReadOnly constructor with NaN and infinity and null]
- expected: FAIL
-
- [DOMRectReadOnly constructor with number string]
- expected: FAIL
-
- [DOMRectReadOnly constructor with character string]
- expected: FAIL
-
- [DOMRectReadOnly: set top/right/bottom/left]
- expected: FAIL
-
- [DOMRectReadOnly: set x/y/width/height]
- expected: FAIL
-
[DOMRect.fromRect]
expected: FAIL
[DOMRectReadOnly.fromRect]
expected: FAIL
--- a/testing/web-platform/meta/css/geometry/historical.html.ini
+++ b/testing/web-platform/meta/css/geometry/historical.html.ini
@@ -53,12 +53,8 @@
[DOMMatrixReadOnly multiply number of required arguments]
expected: FAIL
[DOMMatrix multiplySelf number of required arguments]
expected: FAIL
[DOMMatrix preMultiplySelf number of required arguments]
expected: FAIL
-
- [DOMQuad bounds must be nuked]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/interfaces.html.ini
+++ b/testing/web-platform/meta/css/geometry/interfaces.html.ini
@@ -1,114 +1,45 @@
[interfaces.html]
- [DOMPointReadOnly interface: operation fromPoint(DOMPointInit)]
- expected: FAIL
-
[DOMPointReadOnly interface: operation matrixTransform(DOMMatrixInit)]
expected: FAIL
- [DOMPointReadOnly must be primary interface of new DOMPointReadOnly()]
- expected: FAIL
-
- [Stringification of new DOMPointReadOnly()]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "fromPoint" with the proper type (0)]
- expected: FAIL
-
- [DOMPointReadOnly interface: calling fromPoint(DOMPointInit) on new DOMPointReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "x" with the proper type (1)]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "y" with the proper type (2)]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "z" with the proper type (3)]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "w" with the proper type (4)]
- expected: FAIL
-
[DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "matrixTransform" with the proper type (5)]
expected: FAIL
[DOMPointReadOnly interface: calling matrixTransform(DOMMatrixInit) on new DOMPointReadOnly() with too few arguments must throw TypeError]
expected: FAIL
[DOMPoint interface: legacy window alias]
expected: FAIL
- [DOMPoint interface: operation fromPoint(DOMPointInit)]
- expected: FAIL
-
[DOMPointReadOnly interface: new DOMPoint() must inherit property "matrixTransform" with the proper type (5)]
expected: FAIL
[DOMPointReadOnly interface: calling matrixTransform(DOMMatrixInit) on new DOMPoint() with too few arguments must throw TypeError]
expected: FAIL
[DOMRectReadOnly interface: operation fromRect(DOMRectInit)]
expected: FAIL
- [DOMRectReadOnly must be primary interface of new DOMRectReadOnly()]
- expected: FAIL
-
- [Stringification of new DOMRectReadOnly()]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "fromRect" with the proper type (0)]
- expected: FAIL
-
[DOMRectReadOnly interface: calling fromRect(DOMRectInit) on new DOMRectReadOnly() with too few arguments must throw TypeError]
expected: FAIL
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "x" with the proper type (1)]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "y" with the proper type (2)]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "width" with the proper type (3)]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "height" with the proper type (4)]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "top" with the proper type (5)]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "right" with the proper type (6)]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "bottom" with the proper type (7)]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "left" with the proper type (8)]
- expected: FAIL
-
[DOMRect interface: legacy window alias]
expected: FAIL
[DOMRect interface: operation fromRect(DOMRectInit)]
expected: FAIL
[DOMQuad interface: operation fromRect(DOMRectInit)]
expected: FAIL
[DOMQuad interface: operation fromQuad(DOMQuadInit)]
expected: FAIL
- [DOMQuad interface: operation getBounds()]
- expected: FAIL
-
- [DOMQuad interface: new DOMQuad() must inherit property "getBounds" with the proper type (6)]
- expected: FAIL
-
[DOMMatrixReadOnly interface: operation fromMatrix(DOMMatrixInit)]
expected: FAIL
[DOMMatrixReadOnly interface: operation fromFloat32Array(Float32Array)]
expected: FAIL
[DOMMatrixReadOnly interface: operation fromFloat64Array(Float64Array)]
expected: FAIL
@@ -135,187 +66,25 @@
expected: FAIL
[DOMMatrixReadOnly interface: operation skewY(unrestricted double)]
expected: FAIL
[DOMMatrixReadOnly interface: operation multiply(DOMMatrixInit)]
expected: FAIL
- [DOMMatrixReadOnly must be primary interface of new DOMMatrixReadOnly()]
- expected: FAIL
-
- [Stringification of new DOMMatrixReadOnly()]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "fromMatrix" with the proper type (0)]
- expected: FAIL
-
[DOMMatrixReadOnly interface: calling fromMatrix(DOMMatrixInit) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
expected: FAIL
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "fromFloat32Array" with the proper type (1)]
- expected: FAIL
-
[DOMMatrixReadOnly interface: calling fromFloat32Array(Float32Array) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
expected: FAIL
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "fromFloat64Array" with the proper type (2)]
- expected: FAIL
-
[DOMMatrixReadOnly interface: calling fromFloat64Array(Float64Array) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
expected: FAIL
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "a" with the proper type (3)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "b" with the proper type (4)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "c" with the proper type (5)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "d" with the proper type (6)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "e" with the proper type (7)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "f" with the proper type (8)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m11" with the proper type (9)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m12" with the proper type (10)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m13" with the proper type (11)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m14" with the proper type (12)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m21" with the proper type (13)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m22" with the proper type (14)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m23" with the proper type (15)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m24" with the proper type (16)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m31" with the proper type (17)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m32" with the proper type (18)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m33" with the proper type (19)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m34" with the proper type (20)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m41" with the proper type (21)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m42" with the proper type (22)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m43" with the proper type (23)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m44" with the proper type (24)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "is2D" with the proper type (25)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "isIdentity" with the proper type (26)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "translate" with the proper type (27)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling translate(unrestricted double,unrestricted double,unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "scale" with the proper type (28)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling scale(unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "scale3d" with the proper type (29)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling scale3d(unrestricted double,unrestricted double,unrestricted double,unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "rotate" with the proper type (30)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling rotate(unrestricted double,unrestricted double,unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "rotateFromVector" with the proper type (31)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling rotateFromVector(unrestricted double,unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "rotateAxisAngle" with the proper type (32)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling rotateAxisAngle(unrestricted double,unrestricted double,unrestricted double,unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "skewX" with the proper type (33)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling skewX(unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "skewY" with the proper type (34)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling skewY(unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "multiply" with the proper type (35)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling multiply(DOMMatrixInit) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "flipX" with the proper type (36)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "flipY" with the proper type (37)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "inverse" with the proper type (38)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "transformPoint" with the proper type (39)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling transformPoint(DOMPointInit) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "toFloat32Array" with the proper type (40)]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "toFloat64Array" with the proper type (41)]
- expected: FAIL
-
[DOMMatrixReadOnly must be primary interface of DOMMatrixReadOnly.fromMatrix({is2D: false})]
expected: FAIL
[Stringification of DOMMatrixReadOnly.fromMatrix({is2D: false})]
expected: FAIL
[DOMMatrixReadOnly interface: DOMMatrixReadOnly.fromMatrix({is2D: false}) must inherit property "fromMatrix" with the proper type (0)]
expected: FAIL
@@ -849,85 +618,34 @@
expected: FAIL
[DOMMatrixReadOnly interface: DOMMatrix.fromMatrix({is2D: false}) must inherit property "toFloat64Array" with the proper type (41)]
expected: FAIL
[Stringification of [object DOMRect\]]
expected: FAIL
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "fromPoint(DOMPointInit)" with the proper type]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "x" with the proper type]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "y" with the proper type]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "z" with the proper type]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "w" with the proper type]
- expected: FAIL
-
[DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "matrixTransform(DOMMatrixInit)" with the proper type]
expected: FAIL
- [DOMPoint interface: calling fromPoint(DOMPointInit) on new DOMPoint() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMPointReadOnly interface: calling fromPoint(DOMPointInit) on new DOMPoint() with too few arguments must throw TypeError]
- expected: FAIL
-
[DOMPointReadOnly interface: new DOMPoint() must inherit property "matrixTransform(DOMMatrixInit)" with the proper type]
expected: FAIL
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "fromRect(DOMRectInit)" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "x" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "y" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "width" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "height" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "top" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "right" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "bottom" with the proper type]
- expected: FAIL
-
- [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "left" with the proper type]
- expected: FAIL
-
[DOMRect interface: calling fromRect(DOMRectInit) on new DOMRect() with too few arguments must throw TypeError]
expected: FAIL
[DOMRectReadOnly interface: calling fromRect(DOMRectInit) on new DOMRect() with too few arguments must throw TypeError]
expected: FAIL
[DOMQuad interface: calling fromRect(DOMRectInit) on new DOMQuad() with too few arguments must throw TypeError]
expected: FAIL
[DOMQuad interface: calling fromQuad(DOMQuadInit) on new DOMQuad() with too few arguments must throw TypeError]
expected: FAIL
- [DOMQuad interface: new DOMQuad() must inherit property "getBounds()" with the proper type]
- expected: FAIL
-
[DOMMatrixReadOnly interface: operation translate(unrestricted double, unrestricted double, unrestricted double)]
expected: FAIL
[DOMMatrixReadOnly interface: operation scale(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
expected: FAIL
[DOMMatrixReadOnly interface: operation scale3d(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
expected: FAIL
@@ -936,160 +654,16 @@
expected: FAIL
[DOMMatrixReadOnly interface: operation rotateFromVector(unrestricted double, unrestricted double)]
expected: FAIL
[DOMMatrixReadOnly interface: operation rotateAxisAngle(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
expected: FAIL
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "fromMatrix(DOMMatrixInit)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "fromFloat32Array(Float32Array)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "fromFloat64Array(Float64Array)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "a" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "b" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "c" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "d" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "e" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "f" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m11" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m12" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m13" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m14" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m21" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m22" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m23" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m24" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m31" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m32" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m33" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m34" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m41" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m42" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m43" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "m44" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "is2D" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "isIdentity" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "translate(unrestricted double, unrestricted double, unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling translate(unrestricted double, unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "scale(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling scale(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "scale3d(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling scale3d(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "rotate(unrestricted double, unrestricted double, unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling rotate(unrestricted double, unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "rotateFromVector(unrestricted double, unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling rotateFromVector(unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "rotateAxisAngle(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: calling rotateAxisAngle(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "skewX(unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "skewY(unrestricted double)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "multiply(DOMMatrixInit)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "flipX()" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "flipY()" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "inverse()" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "transformPoint(DOMPointInit)" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "toFloat32Array()" with the proper type]
- expected: FAIL
-
- [DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "toFloat64Array()" with the proper type]
- expected: FAIL
-
[DOMMatrixReadOnly interface: DOMMatrixReadOnly.fromMatrix({is2D: false}) must inherit property "fromMatrix(DOMMatrixInit)" with the proper type]
expected: FAIL
[DOMMatrixReadOnly interface: DOMMatrixReadOnly.fromMatrix({is2D: false}) must inherit property "fromFloat32Array(Float32Array)" with the proper type]
expected: FAIL
[DOMMatrixReadOnly interface: DOMMatrixReadOnly.fromMatrix({is2D: false}) must inherit property "fromFloat64Array(Float64Array)" with the proper type]
expected: FAIL
@@ -1532,18 +1106,8 @@
[DOMMatrixReadOnly interface: DOMMatrix.fromMatrix({is2D: false}) must inherit property "transformPoint(DOMPointInit)" with the proper type]
expected: FAIL
[DOMMatrixReadOnly interface: DOMMatrix.fromMatrix({is2D: false}) must inherit property "toFloat32Array()" with the proper type]
expected: FAIL
[DOMMatrixReadOnly interface: DOMMatrix.fromMatrix({is2D: false}) must inherit property "toFloat64Array()" with the proper type]
expected: FAIL
-
- [Test driver]
- expected: FAIL
-
- [DOMPointReadOnly interface: operation toJSON()]
- expected: FAIL
-
- [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "toJSON()" with the proper type]
- expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/spec-examples.html.ini
+++ b/testing/web-platform/meta/css/geometry/spec-examples.html.ini
@@ -1,13 +1,10 @@
[spec-examples.html]
[matrixTransform]
expected: FAIL
[DOMQuad]
expected: FAIL
- [DOMQuad irregular]
- expected: FAIL
-
[DOMMatrix NaN]
expected: FAIL
--- a/testing/web-platform/tests/css/geometry/DOMPoint-001.html
+++ b/testing/web-platform/tests/css/geometry/DOMPoint-001.html
@@ -31,50 +31,32 @@
},'testConstructor3');
test(function() {
checkDOMPoint(new DOMPoint(1, 2, 3, 4), {x:1, y:2, z:3, w:4});
},'testConstructor4');
test(function() {
checkDOMPoint(new DOMPoint(1, 2, 3, 4, 5), {x:1, y:2, z:3, w:4});
},'testConstructor5');
test(function() {
- checkDOMPoint(new DOMPoint({}), {x:0, y:0, z:0, w:1});
+ checkDOMPoint(new DOMPoint({}), {x:NaN, y:0, z:0, w:1});
},'testConstructorDictionary0');
test(function() {
- checkDOMPoint(new DOMPoint({x:1}), {x:1, y:0, z:0, w:1});
+ checkDOMPoint(new DOMPoint({x:1}), {x:NaN, y:0, z:0, w:1});
},'testConstructorDictionary1');
test(function() {
- checkDOMPoint(new DOMPoint({x:1, y:2}), {x:1, y:2, z:0, w:1});
+ checkDOMPoint(new DOMPoint({x:1, y:2}), {x:NaN, y:0, z:0, w:1});
},'testConstructorDictionary2');
test(function() {
- checkDOMPoint(new DOMPoint({x:1, y:2, z:3}), {x:1, y:2, z:3, w:1});
- },'testConstructorDictionary3');
- test(function() {
- checkDOMPoint(new DOMPoint({x:1, y:2, z:3, w:4}), {x:1, y:2, z:3, w:4});
- },'testConstructorDictionary4');
- test(function() {
- checkDOMPoint(new DOMPoint({x:1, y:2, z:3, w:4, v:5}), {x:1, y:2, z:3, w:4});
- },'testConstructorDictionary5');
- test(function() {
- checkDOMPoint(new DOMPoint({x:1, z:3}), {x:1, y:0, z:3, w:1});
- },'testConstructorDictionary2irregular');
- test(function() {
- checkDOMPoint(new DOMPoint({x:1, y: undefined, z:3}), {x:1, y:0, z:3, w:1});
- },'testConstructorDictionary2undefined');
- test(function() {
- checkDOMPoint(new DOMPoint({x:1, z:3}), {x:1, y:0, z:3, w:1});
- },'testConstructorDOMPoint');
- test(function() {
checkDOMPoint(new DOMPoint(1, undefined), {x:1, y:0, z:0, w:1});
},'testConstructor2undefined');
test(function() {
checkDOMPoint(new DOMPoint("a", "b"), {x:NaN, y:NaN, z:0, w:1});
},'testConstructorUndefined1');
test(function() {
- checkDOMPoint(new DOMPoint({x:"a", y:"b"}), {x:NaN, y:NaN, z:0, w:1});
+ checkDOMPoint(new DOMPoint({x:"a", y:"b"}), {x:NaN, y:0, z:0, w:1});
},'testConstructorUndefined2');
test(function() {
checkDOMPoint(new DOMPointReadOnly(), {x:0, y:0, z:0, w:1});
},'DOMPointReadOnly constructor with no values');
test(function() {
checkDOMPoint(new DOMPointReadOnly(1, 2, 3, 4), {x:1, y:2, z:3, w:4});
},'DOMPointReadOnly constructor with 4 values');
test(function() {