mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58: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
|
|
@ -27,6 +27,15 @@ DOMRectReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
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();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(DOMRect, DOMRectReadOnly, nsIDOMClientRect)
|
||||
|
|
@ -53,17 +62,9 @@ DOMRect::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue