mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
Issue #2241 - Part 4.1: Get DOMPoint, DOMQuad, DOMRect, DOMMatrix a bit closer to spec.
Backported from Mozilla bug 1186265's part 1.
This commit is contained in:
parent
d2c3ea08eb
commit
60c88dd11b
14 changed files with 252 additions and 198 deletions
|
|
@ -16,9 +16,32 @@ 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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue