Bug 1186265 - Remove DOMPoint constructor taking a DOMPointInit. r=bz

The Web IDL for DOMPoint no longer has this constructor. As far as I can tell,
it is still unused, so let's follow the spec.

MozReview-Commit-ID: 6Lz1BN5YAV5

--HG--
extra : rebase_source : 04b70b673e63d7cea1e528009526285a4af8f472
This commit is contained in:
Blake Kaplan 2018-03-29 16:19:31 -07:00
Родитель 6e06627ff1
Коммит 3e329eb8bb
4 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -18,8 +18,7 @@ NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMPointReadOnly, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMPointReadOnly, Release)
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,

Просмотреть файл

@ -58,8 +58,7 @@ public:
{}
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);

Просмотреть файл

@ -53,10 +53,10 @@ DOMQuad::Constructor(const GlobalObject& aGlobal,
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();
}

Просмотреть файл

@ -19,10 +19,11 @@ interface DOMPointReadOnly {
};
[Pref="layout.css.DOMPoint.enabled",
Constructor(optional DOMPointInit point),
Constructor(unrestricted double x, unrestricted double y,
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;
@ -34,4 +35,4 @@ dictionary DOMPointInit {
unrestricted double y = 0;
unrestricted double z = 0;
unrestricted double w = 1;
};
};