Bug 835195: Remove nsIDOMSVGTests r=bz

This commit is contained in:
David Zbarsky 2013-01-29 17:11:45 -05:00
parent 0d75da1695
commit 1b2502bb46
8 changed files with 13 additions and 64 deletions

View File

@ -13,7 +13,7 @@
using namespace mozilla;
NS_IMPL_ISUPPORTS1(DOMSVGTests, nsIDOMSVGTests)
NS_IMPL_ISUPPORTS0(DOMSVGTests)
nsIAtom** DOMSVGTests::sStringListNames[3] =
{
@ -27,14 +27,6 @@ DOMSVGTests::DOMSVGTests()
mStringListAttributes[LANGUAGE].SetIsCommaSeparated(true);
}
/* readonly attribute nsIDOMSVGStringList requiredFeatures; */
NS_IMETHODIMP
DOMSVGTests::GetRequiredFeatures(nsIDOMSVGStringList * *aRequiredFeatures)
{
*aRequiredFeatures = RequiredFeatures().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGStringList>
DOMSVGTests::RequiredFeatures()
{
@ -43,14 +35,6 @@ DOMSVGTests::RequiredFeatures()
&mStringListAttributes[FEATURES], element, true, FEATURES).get();
}
/* readonly attribute nsIDOMSVGStringList requiredExtensions; */
NS_IMETHODIMP
DOMSVGTests::GetRequiredExtensions(nsIDOMSVGStringList * *aRequiredExtensions)
{
*aRequiredExtensions = RequiredExtensions().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGStringList>
DOMSVGTests::RequiredExtensions()
{
@ -59,14 +43,6 @@ DOMSVGTests::RequiredExtensions()
&mStringListAttributes[EXTENSIONS], element, true, EXTENSIONS).get();
}
/* readonly attribute nsIDOMSVGStringList systemLanguage; */
NS_IMETHODIMP
DOMSVGTests::GetSystemLanguage(nsIDOMSVGStringList * *aSystemLanguage)
{
*aSystemLanguage = SystemLanguage().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGStringList>
DOMSVGTests::SystemLanguage()
{
@ -75,14 +51,6 @@ DOMSVGTests::SystemLanguage()
&mStringListAttributes[LANGUAGE], element, true, LANGUAGE).get();
}
/* boolean hasExtension (in DOMString extension); */
NS_IMETHODIMP
DOMSVGTests::HasExtension(const nsAString & extension, bool *_retval)
{
*_retval = HasExtension(extension);
return NS_OK;
}
bool
DOMSVGTests::HasExtension(const nsAString& aExtension)
{

View File

@ -6,24 +6,28 @@
#ifndef MOZILLA_DOMSVGTESTS_H__
#define MOZILLA_DOMSVGTESTS_H__
#include "nsIDOMSVGTests.h"
#include "nsStringFwd.h"
#include "SVGStringList.h"
#include "nsCOMPtr.h"
class nsAttrValue;
class nsIAtom;
class nsIDOMSVGStringList;
class nsString;
namespace mozilla {
class DOMSVGStringList;
}
class DOMSVGTests : public nsIDOMSVGTests
#define MOZILLA_DOMSVGTESTS_IID \
{ 0x92370da8, 0xda28, 0x4895, \
{0x9b, 0x1b, 0xe0, 0x06, 0x0d, 0xb7, 0x3f, 0xc3 } }
class DOMSVGTests : public nsISupports
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGTESTS_IID)
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMSVGTESTS
DOMSVGTests();
virtual ~DOMSVGTests() {}
@ -97,4 +101,6 @@ private:
static nsIAtom** sStringListNames[3];
};
NS_DEFINE_STATIC_IID_ACCESSOR(DOMSVGTests, MOZILLA_DOMSVGTESTS_IID)
#endif // MOZILLA_DOMSVGTESTS_H__

View File

@ -23,7 +23,7 @@ NS_IMPL_RELEASE_INHERITED(SVGAnimationElement, SVGAnimationElementBase)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimationElement)
NS_INTERFACE_MAP_ENTRY(nsISMILAnimationElement)
NS_INTERFACE_MAP_ENTRY(nsIDOMElementTimeControl)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGTests)
NS_INTERFACE_MAP_ENTRY(DOMSVGTests)
NS_INTERFACE_MAP_END_INHERITING(SVGAnimationElementBase)
// Cycle collection magic -- based on nsSVGUseElement

View File

@ -16,7 +16,7 @@ NS_IMPL_ADDREF_INHERITED(SVGGraphicsElement, SVGGraphicsElementBase)
NS_IMPL_RELEASE_INHERITED(SVGGraphicsElement, SVGGraphicsElementBase)
NS_INTERFACE_MAP_BEGIN(SVGGraphicsElement)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGTests)
NS_INTERFACE_MAP_ENTRY(DOMSVGTests)
NS_INTERFACE_MAP_END_INHERITING(SVGGraphicsElementBase)
//----------------------------------------------------------------------

View File

@ -28,7 +28,7 @@ NS_IMPL_RELEASE_INHERITED(SVGSymbolElement,SVGSymbolElementBase)
NS_INTERFACE_TABLE_HEAD(SVGSymbolElement)
NS_NODE_INTERFACE_TABLE6(SVGSymbolElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement, nsIDOMSVGFitToViewBox,
nsIDOMSVGSymbolElement, nsIDOMSVGTests)
nsIDOMSVGSymbolElement, DOMSVGTests)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGSymbolElement)
NS_INTERFACE_MAP_END_INHERITING(SVGSymbolElementBase)

View File

@ -358,7 +358,6 @@
#include "nsIDOMSVGSVGElement.h"
#include "nsIDOMSVGSwitchElement.h"
#include "nsIDOMSVGSymbolElement.h"
#include "nsIDOMSVGTests.h"
#include "nsIDOMSVGTextElement.h"
#include "nsIDOMSVGTextPathElement.h"
#include "nsIDOMSVGTitleElement.h"
@ -2992,7 +2991,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
#define DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES \
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests) \
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
// XXX - the proto chain stuff is sort of hackish, because of the MI in
@ -3026,7 +3024,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGAnimateElement, nsIDOMSVGAnimateElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimationElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimateElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMElementTimeControl)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
@ -3035,7 +3032,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGAnimateTransformElement,
nsIDOMSVGAnimateTransformElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimationElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimateTransformElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMElementTimeControl)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
@ -3044,7 +3040,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGAnimateMotionElement,
nsIDOMSVGAnimateMotionElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimationElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimateMotionElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMElementTimeControl)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
@ -3053,7 +3048,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGSetElement,
nsIDOMSVGSetElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimationElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSetElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMElementTimeControl)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
@ -3353,7 +3347,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGSymbolElement, nsIDOMSVGSymbolElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSymbolElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END

View File

@ -65,7 +65,6 @@ XPIDLSRCS = \
nsIDOMSVGStyleElement.idl \
nsIDOMSVGSwitchElement.idl \
nsIDOMSVGSymbolElement.idl \
nsIDOMSVGTests.idl \
nsIDOMSVGTextContentElement.idl \
nsIDOMSVGTextElement.idl \
nsIDOMSVGTextPathElement.idl \

View File

@ -1,17 +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 "nsIDOMSVGStringList.idl"
[scriptable, uuid(b6186ed0-0861-11e1-be50-0800200c9a66)]
interface nsIDOMSVGTests : nsISupports
{
readonly attribute nsIDOMSVGStringList requiredFeatures;
readonly attribute nsIDOMSVGStringList requiredExtensions;
readonly attribute nsIDOMSVGStringList systemLanguage;
boolean hasExtension(in DOMString extension);
};