Backed out changeset 92e5d79ec57f (bug 917755)

This commit is contained in:
Carsten "Tomcat" Book 2014-03-19 09:46:12 +01:00
parent de82eb9a6f
commit 73bc975564
8 changed files with 0 additions and 173 deletions

View File

@ -1,43 +0,0 @@
/* -*- 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_1(DOMPoint, mParent)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMPoint, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMPoint, 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, JS::Handle<JSObject*> aScope)
{
return DOMPointBinding::Wrap(aCx, aScope, this);
}

View File

@ -1,78 +0,0 @@
/* -*- 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/. */
#ifndef MOZILLA_DOMPOINT_H_
#define MOZILLA_DOMPOINT_H_
#include "nsWrapperCache.h"
#include "nsISupports.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "nsCOMPtr.h"
#include "mozilla/dom/BindingDeclarations.h"
namespace mozilla {
namespace dom {
class GlobalObject;
class DOMPointInit;
class DOMPointReadOnly : public nsWrapperCache
{
public:
DOMPointReadOnly(nsISupports* aParent, double aX, double aY,
double aZ, double aW)
: mParent(aParent)
, mX(aX)
, mY(aY)
, mZ(aZ)
, mW(aW)
{
SetIsDOMBinding();
}
double X() const { return mX; }
double Y() const { return mY; }
double Z() const { return mZ; }
double W() const { return mW; }
protected:
nsCOMPtr<nsISupports> mParent;
double mX, mY, mZ, mW;
};
class DOMPoint MOZ_FINAL : public DOMPointReadOnly
{
public:
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)
{}
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMPoint)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMPoint)
static already_AddRefed<DOMPoint>
Constructor(const GlobalObject& aGlobal, const DOMPointInit& aParams,
ErrorResult& aRV);
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*> aScope) MOZ_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; }
};
}
}
#endif /*MOZILLA_DOMPOINT_H_*/

View File

@ -65,7 +65,6 @@ EXPORTS.mozilla.dom += [
'DocumentType.h',
'DOMImplementation.h',
'DOMParser.h',
'DOMPoint.h',
'DOMRect.h',
'DOMStringList.h',
'EventSource.h',
@ -85,7 +84,6 @@ UNIFIED_SOURCES += [
'DocumentType.cpp',
'DOMImplementation.cpp',
'DOMParser.cpp',
'DOMPoint.cpp',
'DOMRect.cpp',
'DOMStringList.cpp',
'Element.cpp',

View File

@ -225,11 +225,6 @@ DOMInterfaces = {
'resultNotAddRefed': [ 'item' ]
},
'DOMPointReadOnly': {
'headerFile': 'mozilla/dom/DOMPoint.h',
'concrete': False,
},
'Console': {
'implicitJSContext': [ 'trace', 'time', 'timeEnd' ],
},

View File

@ -307,10 +307,6 @@ var interfaceNamesInGlobalScope =
"DOMMMIError",
// IMPORTANT: Do not change this list without review from a DOM peer!
"DOMParser",
// IMPORTANT: Do not change this list without review from a DOM peer!
"DOMPoint",
// IMPORTANT: Do not change this list without review from a DOM peer!
"DOMPointReadOnly",
// IMPORTANT: Do not change this list without review from a DOM peer!
"DOMRect",
// IMPORTANT: Do not change this list without review from a DOM peer!

View File

@ -1,37 +0,0 @@
/* -*- Mode: IDL; 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/.
*
* 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"]
interface DOMPointReadOnly {
readonly attribute unrestricted double x;
readonly attribute unrestricted double y;
readonly attribute unrestricted double z;
readonly attribute unrestricted double w;
};
[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 {
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;
};

View File

@ -83,7 +83,6 @@ WEBIDL_FILES = [
'DOMImplementation.webidl',
'DOMMMIError.webidl',
'DOMParser.webidl',
'DOMPoint.webidl',
'DOMRect.webidl',
'DOMRectList.webidl',
'DOMRequest.webidl',

View File

@ -1802,9 +1802,6 @@ pref("layout.css.sticky.enabled", true);
// Is support for CSS "will-change" enabled?
pref("layout.css.will-change.enabled", false);
// Is support for DOMPoint enabled?
pref("layout.css.DOMPoint.enabled", true);
// Is support for CSS "text-align: true X" enabled?
pref("layout.css.text-align-true-value.enabled", false);