mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 885959 - Remove nsIDOMSVGAnimatedLength r=Ms2ger
This commit is contained in:
parent
05cdcb0787
commit
21ce0909ad
@ -18,7 +18,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedLength)
|
|||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedLength)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedLength)
|
||||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedLength)
|
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "nsIDOMSVGAnimatedLength.h"
|
|
||||||
|
|
||||||
class nsSVGLength2;
|
class nsSVGLength2;
|
||||||
class nsIDOMSVGLength;
|
class nsIDOMSVGLength;
|
||||||
@ -16,7 +15,7 @@ class nsIDOMSVGLength;
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class SVGAnimatedLength MOZ_FINAL : public nsIDOMSVGAnimatedLength,
|
class SVGAnimatedLength MOZ_FINAL : public nsISupports,
|
||||||
public nsWrapperCache
|
public nsWrapperCache
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -29,12 +28,6 @@ public:
|
|||||||
|
|
||||||
~SVGAnimatedLength();
|
~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
|
// WebIDL
|
||||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||||
virtual JSObject* WrapObject(JSContext* aCx,
|
virtual JSObject* WrapObject(JSContext* aCx,
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include "nsISVGPoint.h"
|
#include "nsISVGPoint.h"
|
||||||
#include "nsSVGTextContainerFrame.h"
|
#include "nsSVGTextContainerFrame.h"
|
||||||
#include "nsSVGTextFrame2.h"
|
#include "nsSVGTextFrame2.h"
|
||||||
#include "nsIDOMSVGAnimatedLength.h"
|
|
||||||
#include "mozilla/dom/SVGIRect.h"
|
#include "mozilla/dom/SVGIRect.h"
|
||||||
#include "nsIDOMSVGAnimatedEnum.h"
|
#include "nsIDOMSVGAnimatedEnum.h"
|
||||||
|
|
||||||
|
@ -471,14 +471,6 @@ nsSVGLength2::SetAnimValue(float aValue, nsSVGElement *aSVGElement)
|
|||||||
aSVGElement);
|
aSVGElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
|
||||||
nsSVGLength2::ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
|
|
||||||
nsSVGElement *aSVGElement)
|
|
||||||
{
|
|
||||||
*aResult = ToDOMAnimatedLength(aSVGElement).get();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<SVGAnimatedLength>
|
already_AddRefed<SVGAnimatedLength>
|
||||||
nsSVGLength2::ToDOMAnimatedLength(nsSVGElement* aSVGElement)
|
nsSVGLength2::ToDOMAnimatedLength(nsSVGElement* aSVGElement)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "nsCoord.h"
|
#include "nsCoord.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsError.h"
|
#include "nsError.h"
|
||||||
#include "nsIDOMSVGAnimatedLength.h"
|
|
||||||
#include "nsIDOMSVGLength.h"
|
#include "nsIDOMSVGLength.h"
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
#include "nsMathUtils.h"
|
#include "nsMathUtils.h"
|
||||||
@ -89,9 +88,6 @@ public:
|
|||||||
// useable, and represents the default base value of the attribute.
|
// useable, and represents the default base value of the attribute.
|
||||||
bool IsExplicitlySet() const
|
bool IsExplicitlySet() const
|
||||||
{ return mIsAnimated || mIsBaseSet; }
|
{ return mIsAnimated || mIsBaseSet; }
|
||||||
|
|
||||||
nsresult ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
|
|
||||||
nsSVGElement* aSVGElement);
|
|
||||||
|
|
||||||
already_AddRefed<mozilla::dom::SVGAnimatedLength>
|
already_AddRefed<mozilla::dom::SVGAnimatedLength>
|
||||||
ToDOMAnimatedLength(nsSVGElement* aSVGElement);
|
ToDOMAnimatedLength(nsSVGElement* aSVGElement);
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
XPIDL_SOURCES += [
|
XPIDL_SOURCES += [
|
||||||
'nsIDOMSVGAnimatedEnum.idl',
|
'nsIDOMSVGAnimatedEnum.idl',
|
||||||
'nsIDOMSVGAnimatedInteger.idl',
|
'nsIDOMSVGAnimatedInteger.idl',
|
||||||
'nsIDOMSVGAnimatedLength.idl',
|
|
||||||
'nsIDOMSVGAnimatedNumber.idl',
|
'nsIDOMSVGAnimatedNumber.idl',
|
||||||
'nsIDOMSVGElement.idl',
|
'nsIDOMSVGElement.idl',
|
||||||
'nsIDOMSVGLength.idl',
|
'nsIDOMSVGLength.idl',
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
|||||||
#include "nsIContentViewer.h"
|
#include "nsIContentViewer.h"
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
#include "nsIDocumentLoaderFactory.h"
|
#include "nsIDocumentLoaderFactory.h"
|
||||||
#include "nsIDOMSVGAnimatedLength.h"
|
|
||||||
#include "nsIDOMSVGLength.h"
|
#include "nsIDOMSVGLength.h"
|
||||||
#include "nsIHttpChannel.h"
|
#include "nsIHttpChannel.h"
|
||||||
#include "nsIObserverService.h"
|
#include "nsIObserverService.h"
|
||||||
@ -86,14 +85,12 @@ SVGDocumentWrapper::GetWidthOrHeight(Dimension aDimension,
|
|||||||
NS_ENSURE_TRUE(domAnimLength, false);
|
NS_ENSURE_TRUE(domAnimLength, false);
|
||||||
|
|
||||||
// Get the animated value from the object
|
// Get the animated value from the object
|
||||||
nsRefPtr<nsIDOMSVGLength> domLength;
|
nsRefPtr<nsIDOMSVGLength> domLength = domAnimLength->AnimVal();
|
||||||
nsresult rv = domAnimLength->GetAnimVal(getter_AddRefs(domLength));
|
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
|
||||||
NS_ENSURE_TRUE(domLength, false);
|
NS_ENSURE_TRUE(domLength, false);
|
||||||
|
|
||||||
// Check if it's a percent value (and fail if so)
|
// Check if it's a percent value (and fail if so)
|
||||||
uint16_t unitType;
|
uint16_t unitType;
|
||||||
rv = domLength->GetUnitType(&unitType);
|
nsresult rv = domLength->GetUnitType(&unitType);
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
NS_ENSURE_SUCCESS(rv, false);
|
||||||
if (unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
|
if (unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user