From c19ee4290a997e44dd73a258f984197f27ffee05 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Sat, 22 Dec 2012 23:54:22 -0500 Subject: [PATCH] Bug 817442 Part 3: Remove nsIDOMSVGAnimatedBoolean r=bz, jwatt --- .../svg/content/src/SVGAnimatedBoolean.cpp | 4 --- content/svg/content/src/SVGAnimatedBoolean.h | 19 +++----------- content/svg/content/src/nsSVGBoolean.cpp | 2 +- content/svg/content/src/nsSVGBoolean.h | 3 +-- content/svg/content/src/nsSVGFilters.cpp | 2 +- dom/base/nsDOMClassInfo.cpp | 7 ------ dom/base/nsDOMClassInfoClasses.h | 1 - dom/interfaces/svg/Makefile.in | 1 - .../svg/nsIDOMSVGAnimatedBoolean.idl | 25 ------------------- dom/interfaces/svg/nsIDOMSVGFilters.idl | 3 +-- 10 files changed, 7 insertions(+), 60 deletions(-) delete mode 100644 dom/interfaces/svg/nsIDOMSVGAnimatedBoolean.idl diff --git a/content/svg/content/src/SVGAnimatedBoolean.cpp b/content/svg/content/src/SVGAnimatedBoolean.cpp index 751bb92b5f2..ef045edc77c 100644 --- a/content/svg/content/src/SVGAnimatedBoolean.cpp +++ b/content/svg/content/src/SVGAnimatedBoolean.cpp @@ -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) { diff --git a/content/svg/content/src/SVGAnimatedBoolean.h b/content/svg/content/src/SVGAnimatedBoolean.h index f91f91ab8c8..1a4f192f8d1 100644 --- a/content/svg/content/src/SVGAnimatedBoolean.h +++ b/content/svg/content/src/SVGAnimatedBoolean.h @@ -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: diff --git a/content/svg/content/src/nsSVGBoolean.cpp b/content/svg/content/src/nsSVGBoolean.cpp index cf71613f83b..a87878d3098 100644 --- a/content/svg/content/src/nsSVGBoolean.cpp +++ b/content/svg/content/src/nsSVGBoolean.cpp @@ -107,7 +107,7 @@ nsSVGBoolean::SetAnimValue(bool aValue, nsSVGElement *aSVGElement) } nsresult -nsSVGBoolean::ToDOMAnimatedBoolean(nsIDOMSVGAnimatedBoolean **aResult, +nsSVGBoolean::ToDOMAnimatedBoolean(nsISupports **aResult, nsSVGElement *aSVGElement) { nsRefPtr domAnimatedBoolean = diff --git a/content/svg/content/src/nsSVGBoolean.h b/content/svg/content/src/nsSVGBoolean.h index e9d9bcb846b..2a0aac7849e 100644 --- a/content/svg/content/src/nsSVGBoolean.h +++ b/content/svg/content/src/nsSVGBoolean.h @@ -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); diff --git a/content/svg/content/src/nsSVGFilters.cpp b/content/svg/content/src/nsSVGFilters.cpp index 5fd508a36a2..5683b2e8982 100644 --- a/content/svg/content/src/nsSVGFilters.cpp +++ b/content/svg/content/src/nsSVGFilters.cpp @@ -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); } diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index b6117b6f5ca..4f9fb357dee 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -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 diff --git a/dom/base/nsDOMClassInfoClasses.h b/dom/base/nsDOMClassInfoClasses.h index 9d6ee3513a3..de559348342 100644 --- a/dom/base/nsDOMClassInfoClasses.h +++ b/dom/base/nsDOMClassInfoClasses.h @@ -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) diff --git a/dom/interfaces/svg/Makefile.in b/dom/interfaces/svg/Makefile.in index edc4eff9b1b..cfd2fb41dfb 100644 --- a/dom/interfaces/svg/Makefile.in +++ b/dom/interfaces/svg/Makefile.in @@ -21,7 +21,6 @@ XPIDLSRCS = \ nsIDOMSVGAltGlyphElement.idl \ nsIDOMSVGAngle.idl \ nsIDOMSVGAnimatedAngle.idl \ - nsIDOMSVGAnimatedBoolean.idl \ nsIDOMSVGAnimatedEnum.idl \ nsIDOMSVGAnimatedInteger.idl \ nsIDOMSVGAnimatedLength.idl \ diff --git a/dom/interfaces/svg/nsIDOMSVGAnimatedBoolean.idl b/dom/interfaces/svg/nsIDOMSVGAnimatedBoolean.idl deleted file mode 100644 index 767036d22cd..00000000000 --- a/dom/interfaces/svg/nsIDOMSVGAnimatedBoolean.idl +++ /dev/null @@ -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; -}; - - diff --git a/dom/interfaces/svg/nsIDOMSVGFilters.idl b/dom/interfaces/svg/nsIDOMSVGFilters.idl index 582c3b5f010..a826619e503 100644 --- a/dom/interfaces/svg/nsIDOMSVGFilters.idl +++ b/dom/interfaces/svg/nsIDOMSVGFilters.idl @@ -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)]