mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
b8dd41d84c
Backed out changeset 12dd1ad43923 (bug 1096328) Backed out changeset 4a067de94f22 (bug 1096328) Backed out changeset 676112a4f092 (bug 1096328) Backed out changeset e2e64e751ece (bug 1096328) Backed out changeset 9ed945e9a8a5 (bug 1096328) Backed out changeset 47be69b84be5 (bug 1096328) Backed out changeset d6e68ba4846d (bug 1096328) Backed out changeset 899d8cd8c4e8 (bug 1096328) Backed out changeset 55c831086864 (bug 1096328) Backed out changeset 6005fd357342 (bug 1096328) Backed out changeset 0f330a5dd346 (bug 1096328) Backed out changeset c37e10cff765 (bug 1096328)
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "mozilla/dom/DOMPoint.h"
|
|
|
|
#include "mozilla/dom/DOMPointBinding.h"
|
|
#include "mozilla/dom/BindingDeclarations.h"
|
|
#include "nsAutoPtr.h"
|
|
|
|
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<DOMPoint>
|
|
DOMPoint::Constructor(const GlobalObject& aGlobal, const DOMPointInit& aParams,
|
|
ErrorResult& aRV)
|
|
{
|
|
nsRefPtr<DOMPoint> obj =
|
|
new DOMPoint(aGlobal.GetAsSupports(), aParams.mX, aParams.mY,
|
|
aParams.mZ, aParams.mW);
|
|
return obj.forget();
|
|
}
|
|
|
|
already_AddRefed<DOMPoint>
|
|
DOMPoint::Constructor(const GlobalObject& aGlobal, double aX, double aY,
|
|
double aZ, double aW, ErrorResult& aRV)
|
|
{
|
|
nsRefPtr<DOMPoint> obj =
|
|
new DOMPoint(aGlobal.GetAsSupports(), aX, aY, aZ, aW);
|
|
return obj.forget();
|
|
}
|
|
|
|
JSObject*
|
|
DOMPoint::WrapObject(JSContext* aCx)
|
|
{
|
|
return DOMPointBinding::Wrap(aCx, this);
|
|
}
|