Bug 817442 Part 3: Remove nsIDOMSVGAnimatedBoolean r=bz, jwatt

This commit is contained in:
David Zbarsky 2012-12-22 23:54:22 -05:00
parent e1c5bd10c0
commit c19ee4290a
10 changed files with 7 additions and 60 deletions

View File

@ -31,13 +31,9 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedBoolean)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedBoolean)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedBoolean)
NS_INTERFACE_MAP_END
DOMCI_DATA(SVGAnimatedBoolean, SVGAnimatedBoolean)
JSObject*
SVGAnimatedBoolean::WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap)
{

View File

@ -5,7 +5,6 @@
#pragma once
#include "nsIDOMSVGAnimatedBoolean.h"
#include "nsWrapperCache.h"
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
@ -14,7 +13,7 @@
namespace mozilla {
namespace dom {
class SVGAnimatedBoolean MOZ_FINAL : public nsIDOMSVGAnimatedBoolean,
class SVGAnimatedBoolean MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@ -27,23 +26,11 @@ class SVGAnimatedBoolean MOZ_FINAL : public nsIDOMSVGAnimatedBoolean,
}
~SVGAnimatedBoolean();
NS_IMETHOD GetBaseVal(bool* aResult)
{ *aResult = BaseVal(); return NS_OK; }
NS_IMETHOD SetBaseVal(bool aValue)
{ mVal->SetBaseValue(aValue, mSVGElement); return NS_OK; }
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
NS_IMETHOD GetAnimVal(bool* aResult)
{
*aResult = AnimVal();
return NS_OK;
}
// WebIDL
// WebIDL
nsSVGElement* GetParentObject() const { return mSVGElement; }
virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap);
bool BaseVal() const { return mVal->GetBaseValue(); }
void SetBaseVal(bool aValue) { mVal->SetBaseValue(aValue, mSVGElement); }
bool AnimVal() const { mSVGElement->FlushAnimations(); return mVal->GetAnimValue(); }
protected:

View File

@ -107,7 +107,7 @@ nsSVGBoolean::SetAnimValue(bool aValue, nsSVGElement *aSVGElement)
}
nsresult
nsSVGBoolean::ToDOMAnimatedBoolean(nsIDOMSVGAnimatedBoolean **aResult,
nsSVGBoolean::ToDOMAnimatedBoolean(nsISupports **aResult,
nsSVGElement *aSVGElement)
{
nsRefPtr<SVGAnimatedBoolean> domAnimatedBoolean =

View File

@ -9,7 +9,6 @@
#include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsError.h"
#include "nsIDOMSVGAnimatedBoolean.h"
#include "nsISMILAttr.h"
#include "nsISupportsImpl.h"
#include "nsSVGElement.h"
@ -39,7 +38,7 @@ public:
bool GetAnimValue() const
{ return mAnimVal; }
nsresult ToDOMAnimatedBoolean(nsIDOMSVGAnimatedBoolean **aResult,
nsresult ToDOMAnimatedBoolean(nsISupports **aResult,
nsSVGElement* aSVGElement);
// Returns a new nsISMILAttr object that the caller must delete
nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);

View File

@ -4114,7 +4114,7 @@ NS_IMETHODIMP nsSVGFEConvolveMatrixElement::GetEdgeMode(nsIDOMSVGAnimatedEnumera
return mEnumAttributes[EDGEMODE].ToDOMAnimatedEnum(aEdgeMode, this);
}
NS_IMETHODIMP nsSVGFEConvolveMatrixElement::GetPreserveAlpha(nsIDOMSVGAnimatedBoolean * *aPreserveAlpha)
NS_IMETHODIMP nsSVGFEConvolveMatrixElement::GetPreserveAlpha(nsISupports * *aPreserveAlpha)
{
return mBooleanAttributes[PRESERVEALPHA].ToDOMAnimatedBoolean(aPreserveAlpha, this);
}

View File

@ -314,7 +314,6 @@
#include "nsIDOMSVGAltGlyphElement.h"
#include "nsIDOMSVGAngle.h"
#include "nsIDOMSVGAnimatedAngle.h"
#include "nsIDOMSVGAnimatedBoolean.h"
#include "nsIDOMSVGAnimatedEnum.h"
#include "nsIDOMSVGAnimatedInteger.h"
#include "nsIDOMSVGAnimatedLength.h"
@ -1229,8 +1228,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedAngle, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedBoolean, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedEnumeration, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedInteger, nsDOMGenericSH,
@ -3549,10 +3546,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedAngle)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedBoolean, nsIDOMSVGAnimatedBoolean)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedBoolean)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedEnumeration, nsIDOMSVGAnimatedEnumeration)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
DOM_CLASSINFO_MAP_END

View File

@ -257,7 +257,6 @@ DOMCI_CLASS(SVGViewElement)
// other SVG classes
DOMCI_CLASS(SVGAngle)
DOMCI_CLASS(SVGAnimatedAngle)
DOMCI_CLASS(SVGAnimatedBoolean)
DOMCI_CLASS(SVGAnimatedEnumeration)
DOMCI_CLASS(SVGAnimatedInteger)
DOMCI_CLASS(SVGAnimatedLength)

View File

@ -21,7 +21,6 @@ XPIDLSRCS = \
nsIDOMSVGAltGlyphElement.idl \
nsIDOMSVGAngle.idl \
nsIDOMSVGAnimatedAngle.idl \
nsIDOMSVGAnimatedBoolean.idl \
nsIDOMSVGAnimatedEnum.idl \
nsIDOMSVGAnimatedInteger.idl \
nsIDOMSVGAnimatedLength.idl \

View File

@ -1,25 +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"
/**
* The nsIDOMSVGAnimatedBoolean interface is the interface to an SVG
* animated boolean.
*
* For more information on this interface please see
* http://www.w3.org/TR/SVG11/types.html
*
*/
[scriptable, uuid(7e325385-cc82-4763-bd14-e2c92edd5462)]
interface nsIDOMSVGAnimatedBoolean : nsISupports
{
attribute boolean baseVal;
// raises DOMException on setting
readonly attribute boolean animVal;
};

View File

@ -12,7 +12,6 @@ interface nsIDOMSVGAnimatedNumber;
interface nsIDOMSVGAnimatedEnumeration;
interface nsIDOMSVGAnimatedNumberList;
interface nsIDOMSVGAnimatedInteger;
interface nsIDOMSVGAnimatedBoolean;
[scriptable, uuid(117CFA4C-B0EB-4C0F-A590-F77FBF42E76D)]
interface nsIDOMSVGFilterPrimitiveStandardAttributes : nsIDOMSVGElement
@ -218,7 +217,7 @@ interface nsIDOMSVGFEConvolveMatrixElement : nsIDOMSVGFilterPrimitiveStandardAtt
readonly attribute nsIDOMSVGAnimatedEnumeration edgeMode;
readonly attribute nsIDOMSVGAnimatedNumber kernelUnitLengthX;
readonly attribute nsIDOMSVGAnimatedNumber kernelUnitLengthY;
readonly attribute nsIDOMSVGAnimatedBoolean preserveAlpha;
readonly attribute nsISupports preserveAlpha;
};
[scriptable, uuid(43662657-4DA9-4B64-8891-033B08DBD11B)]