mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 817442 Part 1: Remove nsIDOMSVGPointList r=bz, jwatt
This commit is contained in:
parent
a4094217c8
commit
a23823f27d
@ -57,15 +57,9 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
|||||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGPointList)
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGPointList)
|
||||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGPointList)
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGPointList)
|
||||||
|
|
||||||
} // namespace mozilla
|
|
||||||
DOMCI_DATA(SVGPointList, mozilla::DOMSVGPointList)
|
|
||||||
namespace mozilla {
|
|
||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGPointList)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGPointList)
|
||||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGPointList)
|
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGPointList)
|
|
||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
@ -171,13 +165,6 @@ DOMSVGPointList::InternalAList() const
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// nsIDOMSVGPointList implementation:
|
// nsIDOMSVGPointList implementation:
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::GetNumberOfItems(uint32_t *aNumberOfItems)
|
|
||||||
{
|
|
||||||
*aNumberOfItems = NumberOfItems();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DOMSVGPointList::Clear(ErrorResult& aError)
|
DOMSVGPointList::Clear(ErrorResult& aError)
|
||||||
{
|
{
|
||||||
@ -211,14 +198,6 @@ DOMSVGPointList::Clear(ErrorResult& aError)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::Clear()
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
Clear(rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<nsISVGPoint>
|
already_AddRefed<nsISVGPoint>
|
||||||
DOMSVGPointList::Initialize(nsISVGPoint& aNewItem, ErrorResult& aError)
|
DOMSVGPointList::Initialize(nsISVGPoint& aNewItem, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
@ -244,22 +223,10 @@ DOMSVGPointList::Initialize(nsISVGPoint& aNewItem, ErrorResult& aError)
|
|||||||
domItem = domItem->Clone(); // must do this before changing anything!
|
domItem = domItem->Clone(); // must do this before changing anything!
|
||||||
}
|
}
|
||||||
|
|
||||||
Clear();
|
|
||||||
return InsertItemBefore(*domItem, 0, aError);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::Initialize(nsIDOMSVGPoint *aNewItem,
|
|
||||||
nsIDOMSVGPoint **_retval)
|
|
||||||
{
|
|
||||||
nsCOMPtr<DOMSVGPoint> domItem = do_QueryInterface(aNewItem);
|
|
||||||
if (!domItem) {
|
|
||||||
*_retval = nullptr;
|
|
||||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
|
||||||
}
|
|
||||||
ErrorResult rv;
|
ErrorResult rv;
|
||||||
*_retval = Initialize(*domItem, rv).get();
|
Clear(rv);
|
||||||
return rv.ErrorCode();
|
MOZ_ASSERT(!rv.Failed());
|
||||||
|
return InsertItemBefore(*domItem, 0, aError);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsISVGPoint*
|
nsISVGPoint*
|
||||||
@ -277,15 +244,6 @@ DOMSVGPointList::IndexedGetter(uint32_t aIndex, bool& aFound,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::GetItem(uint32_t aIndex,
|
|
||||||
nsIDOMSVGPoint **_retval)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
NS_IF_ADDREF(*_retval = GetItem(aIndex, rv));
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<nsISVGPoint>
|
already_AddRefed<nsISVGPoint>
|
||||||
DOMSVGPointList::InsertItemBefore(nsISVGPoint& aNewItem, uint32_t aIndex,
|
DOMSVGPointList::InsertItemBefore(nsISVGPoint& aNewItem, uint32_t aIndex,
|
||||||
ErrorResult& aError)
|
ErrorResult& aError)
|
||||||
@ -338,21 +296,6 @@ DOMSVGPointList::InsertItemBefore(nsISVGPoint& aNewItem, uint32_t aIndex,
|
|||||||
return domItem.forget();
|
return domItem.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::InsertItemBefore(nsIDOMSVGPoint *aNewItem,
|
|
||||||
uint32_t aIndex,
|
|
||||||
nsIDOMSVGPoint **_retval)
|
|
||||||
{
|
|
||||||
nsCOMPtr<DOMSVGPoint> domItem = do_QueryInterface(aNewItem);
|
|
||||||
if (!domItem) {
|
|
||||||
*_retval = nullptr;
|
|
||||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
|
||||||
}
|
|
||||||
ErrorResult rv;
|
|
||||||
*_retval = InsertItemBefore(*domItem, aIndex, rv).get();
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<nsISVGPoint>
|
already_AddRefed<nsISVGPoint>
|
||||||
DOMSVGPointList::ReplaceItem(nsISVGPoint& aNewItem, uint32_t aIndex,
|
DOMSVGPointList::ReplaceItem(nsISVGPoint& aNewItem, uint32_t aIndex,
|
||||||
ErrorResult& aError)
|
ErrorResult& aError)
|
||||||
@ -397,21 +340,6 @@ DOMSVGPointList::ReplaceItem(nsISVGPoint& aNewItem, uint32_t aIndex,
|
|||||||
return domItem.forget();
|
return domItem.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::ReplaceItem(nsIDOMSVGPoint *aNewItem,
|
|
||||||
uint32_t aIndex,
|
|
||||||
nsIDOMSVGPoint **_retval)
|
|
||||||
{
|
|
||||||
nsCOMPtr<DOMSVGPoint> domItem = do_QueryInterface(aNewItem);
|
|
||||||
if (!domItem) {
|
|
||||||
*_retval = nullptr;
|
|
||||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
|
||||||
}
|
|
||||||
ErrorResult rv;
|
|
||||||
*_retval = ReplaceItem(*domItem, aIndex, rv).get();
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<nsISVGPoint>
|
already_AddRefed<nsISVGPoint>
|
||||||
DOMSVGPointList::RemoveItem(uint32_t aIndex, ErrorResult& aError)
|
DOMSVGPointList::RemoveItem(uint32_t aIndex, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
@ -451,36 +379,6 @@ DOMSVGPointList::RemoveItem(uint32_t aIndex, ErrorResult& aError)
|
|||||||
return result.forget();
|
return result.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::RemoveItem(uint32_t aIndex,
|
|
||||||
nsIDOMSVGPoint **_retval)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
*_retval = RemoveItem(aIndex, rv).get();
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::AppendItem(nsIDOMSVGPoint *aNewItem,
|
|
||||||
nsIDOMSVGPoint **_retval)
|
|
||||||
{
|
|
||||||
nsCOMPtr<DOMSVGPoint> domItem = do_QueryInterface(aNewItem);
|
|
||||||
if (!domItem) {
|
|
||||||
*_retval = nullptr;
|
|
||||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
|
||||||
}
|
|
||||||
ErrorResult rv;
|
|
||||||
*_retval = AppendItem(*domItem, rv).get();
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGPointList::GetLength(uint32_t *aLength)
|
|
||||||
{
|
|
||||||
*aLength = LengthNoFlush();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DOMSVGPointList::EnsureItemAt(uint32_t aIndex)
|
DOMSVGPointList::EnsureItemAt(uint32_t aIndex)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsDebug.h"
|
#include "nsDebug.h"
|
||||||
#include "nsIDOMSVGPointList.h"
|
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "SVGPointList.h" // IWYU pragma: keep
|
#include "SVGPointList.h" // IWYU pragma: keep
|
||||||
@ -50,7 +49,7 @@ class SVGAnimatedPointList;
|
|||||||
*
|
*
|
||||||
* Our DOM items are created lazily on demand as and when script requests them.
|
* Our DOM items are created lazily on demand as and when script requests them.
|
||||||
*/
|
*/
|
||||||
class DOMSVGPointList MOZ_FINAL : public nsIDOMSVGPointList,
|
class DOMSVGPointList MOZ_FINAL : public nsISupports,
|
||||||
public nsWrapperCache
|
public nsWrapperCache
|
||||||
{
|
{
|
||||||
friend class DOMSVGPoint;
|
friend class DOMSVGPoint;
|
||||||
@ -58,7 +57,6 @@ class DOMSVGPointList MOZ_FINAL : public nsIDOMSVGPointList,
|
|||||||
public:
|
public:
|
||||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPointList)
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPointList)
|
||||||
NS_DECL_NSIDOMSVGPOINTLIST
|
|
||||||
|
|
||||||
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
|
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
|
||||||
bool *triedToWrap);
|
bool *triedToWrap);
|
||||||
|
@ -34,18 +34,18 @@ nsSVGPolyElement::nsSVGPolyElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsIDOMSGAnimatedPoints methods:
|
// nsIDOMSGAnimatedPoints methods:
|
||||||
|
|
||||||
/* readonly attribute nsIDOMSVGPointList points; */
|
/* readonly attribute DOMSVGPointList points; */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSVGPolyElement::GetPoints(nsIDOMSVGPointList * *aPoints)
|
nsSVGPolyElement::GetPoints(nsISupports * *aPoints)
|
||||||
{
|
{
|
||||||
void *key = mPoints.GetBaseValKey();
|
void *key = mPoints.GetBaseValKey();
|
||||||
*aPoints = DOMSVGPointList::GetDOMWrapper(key, this, false).get();
|
*aPoints = DOMSVGPointList::GetDOMWrapper(key, this, false).get();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* readonly attribute nsIDOMSVGPointList animatedPoints; */
|
/* readonly attribute DOMSVGPointList animatedPoints; */
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSVGPolyElement::GetAnimatedPoints(nsIDOMSVGPointList * *aAnimatedPoints)
|
nsSVGPolyElement::GetAnimatedPoints(nsISupports * *aAnimatedPoints)
|
||||||
{
|
{
|
||||||
void *key = mPoints.GetAnimValKey();
|
void *key = mPoints.GetAnimValKey();
|
||||||
*aAnimatedPoints = DOMSVGPointList::GetDOMWrapper(key, this, true).get();
|
*aAnimatedPoints = DOMSVGPointList::GetDOMWrapper(key, this, true).get();
|
||||||
|
@ -365,7 +365,6 @@
|
|||||||
#include "nsIDOMSVGPathSegList.h"
|
#include "nsIDOMSVGPathSegList.h"
|
||||||
#include "nsIDOMSVGPatternElement.h"
|
#include "nsIDOMSVGPatternElement.h"
|
||||||
#include "nsIDOMSVGPoint.h"
|
#include "nsIDOMSVGPoint.h"
|
||||||
#include "nsIDOMSVGPointList.h"
|
|
||||||
#include "nsIDOMSVGPolygonElement.h"
|
#include "nsIDOMSVGPolygonElement.h"
|
||||||
#include "nsIDOMSVGPolylineElement.h"
|
#include "nsIDOMSVGPolylineElement.h"
|
||||||
#include "nsIDOMSVGPresAspectRatio.h"
|
#include "nsIDOMSVGPresAspectRatio.h"
|
||||||
@ -1308,8 +1307,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGPoint, nsDOMGenericSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGPoint, nsDOMGenericSH,
|
||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGPointList, nsDOMGenericSH,
|
|
||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGPreserveAspectRatio, nsDOMGenericSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGPreserveAspectRatio, nsDOMGenericSH,
|
||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGRect, nsDOMGenericSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGRect, nsDOMGenericSH,
|
||||||
@ -3730,10 +3727,6 @@ nsDOMClassInfo::Init()
|
|||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPoint)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPoint)
|
||||||
DOM_CLASSINFO_MAP_END
|
DOM_CLASSINFO_MAP_END
|
||||||
|
|
||||||
DOM_CLASSINFO_MAP_BEGIN(SVGPointList, nsIDOMSVGPointList)
|
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPointList)
|
|
||||||
DOM_CLASSINFO_MAP_END
|
|
||||||
|
|
||||||
DOM_CLASSINFO_MAP_BEGIN(SVGPreserveAspectRatio, nsIDOMSVGPreserveAspectRatio)
|
DOM_CLASSINFO_MAP_BEGIN(SVGPreserveAspectRatio, nsIDOMSVGPreserveAspectRatio)
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPreserveAspectRatio)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPreserveAspectRatio)
|
||||||
DOM_CLASSINFO_MAP_END
|
DOM_CLASSINFO_MAP_END
|
||||||
|
@ -40,7 +40,6 @@ class nsIDOMSVGNumberList;
|
|||||||
class nsIDOMSVGPathSeg;
|
class nsIDOMSVGPathSeg;
|
||||||
class nsIDOMSVGPathSegList;
|
class nsIDOMSVGPathSegList;
|
||||||
class nsIDOMSVGPoint;
|
class nsIDOMSVGPoint;
|
||||||
class nsIDOMSVGPointList;
|
|
||||||
class nsIDOMSVGStringList;
|
class nsIDOMSVGStringList;
|
||||||
class nsIDOMSVGTests;
|
class nsIDOMSVGTests;
|
||||||
class nsIDOMSVGTransform;
|
class nsIDOMSVGTransform;
|
||||||
|
@ -295,7 +295,6 @@ DOMCI_CLASS(SVGPathSegList)
|
|||||||
DOMCI_CLASS(SVGPathSegMovetoAbs)
|
DOMCI_CLASS(SVGPathSegMovetoAbs)
|
||||||
DOMCI_CLASS(SVGPathSegMovetoRel)
|
DOMCI_CLASS(SVGPathSegMovetoRel)
|
||||||
DOMCI_CLASS(SVGPoint)
|
DOMCI_CLASS(SVGPoint)
|
||||||
DOMCI_CLASS(SVGPointList)
|
|
||||||
DOMCI_CLASS(SVGPreserveAspectRatio)
|
DOMCI_CLASS(SVGPreserveAspectRatio)
|
||||||
DOMCI_CLASS(SVGRect)
|
DOMCI_CLASS(SVGRect)
|
||||||
DOMCI_CLASS(SVGStringList)
|
DOMCI_CLASS(SVGStringList)
|
||||||
|
@ -69,7 +69,6 @@ XPIDLSRCS = \
|
|||||||
nsIDOMSVGPathSegList.idl \
|
nsIDOMSVGPathSegList.idl \
|
||||||
nsIDOMSVGPatternElement.idl \
|
nsIDOMSVGPatternElement.idl \
|
||||||
nsIDOMSVGPoint.idl \
|
nsIDOMSVGPoint.idl \
|
||||||
nsIDOMSVGPointList.idl \
|
|
||||||
nsIDOMSVGPolygonElement.idl \
|
nsIDOMSVGPolygonElement.idl \
|
||||||
nsIDOMSVGPolylineElement.idl \
|
nsIDOMSVGPolylineElement.idl \
|
||||||
nsIDOMSVGPresAspectRatio.idl \
|
nsIDOMSVGPresAspectRatio.idl \
|
||||||
|
@ -6,11 +6,9 @@
|
|||||||
|
|
||||||
#include "domstubs.idl"
|
#include "domstubs.idl"
|
||||||
|
|
||||||
interface nsIDOMSVGPointList;
|
|
||||||
|
|
||||||
[scriptable, uuid(ebf334b3-86ef-4bf3-8a92-d775c72defa4)]
|
[scriptable, uuid(ebf334b3-86ef-4bf3-8a92-d775c72defa4)]
|
||||||
interface nsIDOMSVGAnimatedPoints : nsISupports
|
interface nsIDOMSVGAnimatedPoints : nsISupports
|
||||||
{
|
{
|
||||||
readonly attribute nsIDOMSVGPointList points;
|
readonly attribute nsISupports points;
|
||||||
readonly attribute nsIDOMSVGPointList animatedPoints;
|
readonly attribute nsISupports animatedPoints;
|
||||||
};
|
};
|
||||||
|
@ -1,30 +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/. */
|
|
||||||
|
|
||||||
#include "domstubs.idl"
|
|
||||||
|
|
||||||
interface nsIDOMSVGPoint;
|
|
||||||
|
|
||||||
[scriptable, uuid(1cc66e7d-c874-4429-9f73-a0e5f2c77a85)]
|
|
||||||
interface nsIDOMSVGPointList : nsISupports
|
|
||||||
{
|
|
||||||
readonly attribute unsigned long numberOfItems;
|
|
||||||
readonly attribute unsigned long length; // synonym for numberOfItems
|
|
||||||
|
|
||||||
void clear();
|
|
||||||
// raises( DOMException );
|
|
||||||
nsIDOMSVGPoint initialize(in nsIDOMSVGPoint newItem);
|
|
||||||
// raises( DOMException, SVGException );
|
|
||||||
nsIDOMSVGPoint getItem (in unsigned long index);
|
|
||||||
// raises( DOMException );
|
|
||||||
nsIDOMSVGPoint insertItemBefore(in nsIDOMSVGPoint newItem, in unsigned long index);
|
|
||||||
// raises( DOMException, SVGException );
|
|
||||||
nsIDOMSVGPoint replaceItem(in nsIDOMSVGPoint newItem, in unsigned long index);
|
|
||||||
// raises( DOMException, SVGException );
|
|
||||||
nsIDOMSVGPoint removeItem(in unsigned long index);
|
|
||||||
// raises( DOMException );
|
|
||||||
nsIDOMSVGPoint appendItem(in nsIDOMSVGPoint newItem);
|
|
||||||
// raises( DOMException, SVGException );
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user