Bug 885959 - Remove nsIDOMSVGAnimatedLength r=Ms2ger

This commit is contained in:
David Zbarsky 2013-06-24 12:31:52 -07:00
parent 64525ebd6f
commit ba14d5e905
8 changed files with 3 additions and 44 deletions

View File

@ -18,7 +18,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedLength)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedLength)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedLength)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END

View File

@ -8,7 +8,6 @@
#include "mozilla/Attributes.h"
#include "nsSVGElement.h"
#include "nsIDOMSVGAnimatedLength.h"
class nsSVGLength2;
class nsIDOMSVGLength;
@ -16,7 +15,7 @@ class nsIDOMSVGLength;
namespace mozilla {
namespace dom {
class SVGAnimatedLength MOZ_FINAL : public nsIDOMSVGAnimatedLength,
class SVGAnimatedLength MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
public:
@ -29,12 +28,6 @@ public:
~SVGAnimatedLength();
NS_IMETHOD GetBaseVal(nsIDOMSVGLength **aBaseVal) MOZ_OVERRIDE
{ *aBaseVal = BaseVal().get(); return NS_OK; }
NS_IMETHOD GetAnimVal(nsIDOMSVGLength **aAnimVal) MOZ_OVERRIDE
{ *aAnimVal = AnimVal().get(); return NS_OK; }
// WebIDL
nsSVGElement* GetParentObject() { return mSVGElement; }
virtual JSObject* WrapObject(JSContext* aCx,

View File

@ -7,7 +7,6 @@
#include "nsISVGPoint.h"
#include "nsSVGTextContainerFrame.h"
#include "nsSVGTextFrame2.h"
#include "nsIDOMSVGAnimatedLength.h"
#include "mozilla/dom/SVGIRect.h"
#include "nsIDOMSVGAnimatedEnum.h"

View File

@ -471,14 +471,6 @@ nsSVGLength2::SetAnimValue(float aValue, nsSVGElement *aSVGElement)
aSVGElement);
}
nsresult
nsSVGLength2::ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
nsSVGElement *aSVGElement)
{
*aResult = ToDOMAnimatedLength(aSVGElement).get();
return NS_OK;
}
already_AddRefed<SVGAnimatedLength>
nsSVGLength2::ToDOMAnimatedLength(nsSVGElement* aSVGElement)
{

View File

@ -11,7 +11,6 @@
#include "nsCoord.h"
#include "nsCycleCollectionParticipant.h"
#include "nsError.h"
#include "nsIDOMSVGAnimatedLength.h"
#include "nsIDOMSVGLength.h"
#include "nsISMILAttr.h"
#include "nsMathUtils.h"
@ -89,9 +88,6 @@ public:
// useable, and represents the default base value of the attribute.
bool IsExplicitlySet() const
{ return mIsAnimated || mIsBaseSet; }
nsresult ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
nsSVGElement* aSVGElement);
already_AddRefed<mozilla::dom::SVGAnimatedLength>
ToDOMAnimatedLength(nsSVGElement* aSVGElement);

View File

@ -7,7 +7,6 @@
XPIDL_SOURCES += [
'nsIDOMSVGAnimatedEnum.idl',
'nsIDOMSVGAnimatedInteger.idl',
'nsIDOMSVGAnimatedLength.idl',
'nsIDOMSVGAnimatedNumber.idl',
'nsIDOMSVGElement.idl',
'nsIDOMSVGLength.idl',

View File

@ -1,16 +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 nsIDOMSVGLength;
[scriptable, uuid(a52f0322-7f4d-418d-af6d-a7b14abd5cdf)]
interface nsIDOMSVGAnimatedLength : nsISupports
{
readonly attribute nsIDOMSVGLength baseVal;
readonly attribute nsIDOMSVGLength animVal;
};

View File

@ -12,7 +12,6 @@
#include "nsIContentViewer.h"
#include "nsIDocument.h"
#include "nsIDocumentLoaderFactory.h"
#include "nsIDOMSVGAnimatedLength.h"
#include "nsIDOMSVGLength.h"
#include "nsIHttpChannel.h"
#include "nsIObserverService.h"
@ -86,14 +85,12 @@ SVGDocumentWrapper::GetWidthOrHeight(Dimension aDimension,
NS_ENSURE_TRUE(domAnimLength, false);
// Get the animated value from the object
nsRefPtr<nsIDOMSVGLength> domLength;
nsresult rv = domAnimLength->GetAnimVal(getter_AddRefs(domLength));
NS_ENSURE_SUCCESS(rv, false);
nsRefPtr<nsIDOMSVGLength> domLength = domAnimLength->AnimVal();
NS_ENSURE_TRUE(domLength, false);
// Check if it's a percent value (and fail if so)
uint16_t unitType;
rv = domLength->GetUnitType(&unitType);
nsresult rv = domLength->GetUnitType(&unitType);
NS_ENSURE_SUCCESS(rv, false);
if (unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
return false;