Bug 835195: Remove nsIDOMSVGFitToViewBox r=bz

This commit is contained in:
David Zbarsky 2013-01-29 17:11:45 -05:00
parent 9480d80714
commit 57fe33546c
13 changed files with 15 additions and 142 deletions

View File

@ -76,8 +76,8 @@ NS_IMPL_ADDREF_INHERITED(SVGMarkerElement,SVGMarkerElementBase)
NS_IMPL_RELEASE_INHERITED(SVGMarkerElement,SVGMarkerElementBase)
NS_INTERFACE_TABLE_HEAD(SVGMarkerElement)
NS_NODE_INTERFACE_TABLE5(SVGMarkerElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement, nsIDOMSVGFitToViewBox,
NS_NODE_INTERFACE_TABLE4(SVGMarkerElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIDOMSVGMarkerElement)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGMarkerElement)
NS_INTERFACE_MAP_END_INHERITING(SVGMarkerElementBase)
@ -122,14 +122,6 @@ SVGMarkerElement::SVGMarkerElement(already_AddRefed<nsINodeInfo> aNodeInfo)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMarkerElement)
//----------------------------------------------------------------------
// nsIDOMSVGFitToViewBox methods
/* readonly attribute nsIDOMSVGAnimatedRect viewBox; */
NS_IMETHODIMP SVGMarkerElement::GetViewBox(nsIDOMSVGAnimatedRect * *aViewBox)
{
*aViewBox = ViewBox().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedRect>
SVGMarkerElement::ViewBox()
@ -139,15 +131,6 @@ SVGMarkerElement::ViewBox()
return rect.forget();
}
/* readonly attribute SVGPreserveAspectRatio preserveAspectRatio; */
NS_IMETHODIMP
SVGMarkerElement::GetPreserveAspectRatio(nsISupports
**aPreserveAspectRatio)
{
*aPreserveAspectRatio = PreserveAspectRatio().get();
return NS_OK;
}
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
SVGMarkerElement::PreserveAspectRatio()
{

View File

@ -7,7 +7,6 @@
#define mozilla_dom_SVGMarkerElement_h
#include "gfxMatrix.h"
#include "nsIDOMSVGFitToViewBox.h"
#include "nsIDOMSVGMarkerElement.h"
#include "nsSVGAngle.h"
#include "nsSVGEnum.h"
@ -79,8 +78,7 @@ private:
typedef nsSVGElement SVGMarkerElementBase;
class SVGMarkerElement : public SVGMarkerElementBase,
public nsIDOMSVGMarkerElement,
public nsIDOMSVGFitToViewBox
public nsIDOMSVGMarkerElement
{
friend class ::nsSVGMarkerFrame;
@ -95,7 +93,6 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGMARKERELEMENT
NS_DECL_NSIDOMSVGFITTOVIEWBOX
// xxx I wish we could use virtual inheritance
NS_FORWARD_NSIDOMNODE_TO_NSINODE

View File

@ -60,9 +60,9 @@ NS_IMPL_ADDREF_INHERITED(SVGPatternElement,SVGPatternElementBase)
NS_IMPL_RELEASE_INHERITED(SVGPatternElement,SVGPatternElementBase)
NS_INTERFACE_TABLE_HEAD(SVGPatternElement)
NS_NODE_INTERFACE_TABLE7(SVGPatternElement, nsIDOMNode, nsIDOMElement,
NS_NODE_INTERFACE_TABLE6(SVGPatternElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIDOMSVGFitToViewBox, nsIDOMSVGURIReference,
nsIDOMSVGURIReference,
nsIDOMSVGPatternElement, nsIDOMSVGUnitTypes)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGPatternElement)
NS_INTERFACE_MAP_END_INHERITING(SVGPatternElementBase)
@ -82,14 +82,6 @@ SVGPatternElement::SVGPatternElement(already_AddRefed<nsINodeInfo> aNodeInfo)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPatternElement)
//----------------------------------------------------------------------
// nsIDOMSVGFitToViewBox methods
/* readonly attribute nsIDOMSVGAnimatedRect viewBox; */
NS_IMETHODIMP SVGPatternElement::GetViewBox(nsIDOMSVGAnimatedRect * *aViewBox)
{
*aViewBox = ViewBox().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedRect>
SVGPatternElement::ViewBox()
@ -99,14 +91,6 @@ SVGPatternElement::ViewBox()
return rect.forget();
}
/* readonly attribute SVGPreserveAspectRatio preserveAspectRatio; */
NS_IMETHODIMP
SVGPatternElement::GetPreserveAspectRatio(nsISupports **aPreserveAspectRatio)
{
*aPreserveAspectRatio = PreserveAspectRatio().get();
return NS_OK;
}
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
SVGPatternElement::PreserveAspectRatio()
{

View File

@ -6,7 +6,6 @@
#ifndef mozilla_dom_SVGPatternElement_h
#define mozilla_dom_SVGPatternElement_h
#include "nsIDOMSVGFitToViewBox.h"
#include "nsIDOMSVGPatternElement.h"
#include "nsIDOMSVGUnitTypes.h"
#include "nsIDOMSVGURIReference.h"
@ -33,7 +32,6 @@ typedef nsSVGElement SVGPatternElementBase;
class SVGPatternElement MOZ_FINAL : public SVGPatternElementBase,
public nsIDOMSVGPatternElement,
public nsIDOMSVGURIReference,
public nsIDOMSVGFitToViewBox,
public nsIDOMSVGUnitTypes
{
friend class ::nsSVGPatternFrame;
@ -56,9 +54,6 @@ public:
// URI Reference
NS_DECL_NSIDOMSVGURIREFERENCE
// FitToViewbox
NS_DECL_NSIDOMSVGFITTOVIEWBOX
NS_FORWARD_NSIDOMNODE_TO_NSINODE
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
@ -117,7 +112,7 @@ protected:
nsSVGString mStringAttributes[1];
static StringInfo sStringInfo[1];
// nsIDOMSVGFitToViewbox properties
// SVGFitToViewbox properties
nsSVGViewBox mViewBox;
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
};

View File

@ -146,10 +146,9 @@ NS_IMPL_ADDREF_INHERITED(SVGSVGElement,SVGSVGElementBase)
NS_IMPL_RELEASE_INHERITED(SVGSVGElement,SVGSVGElementBase)
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGSVGElement)
NS_NODE_INTERFACE_TABLE5(SVGSVGElement, nsIDOMNode, nsIDOMElement,
NS_NODE_INTERFACE_TABLE4(SVGSVGElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIDOMSVGSVGElement,
nsIDOMSVGFitToViewBox)
nsIDOMSVGSVGElement)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGSVGElement)
NS_INTERFACE_MAP_END_INHERITING(SVGSVGElementBase)
@ -675,15 +674,6 @@ SVGSVGElement::GetElementById(const nsAString& elementId, ErrorResult& rv)
}
//----------------------------------------------------------------------
// nsIDOMSVGFitToViewBox methods
/* readonly attribute nsIDOMSVGAnimatedRect viewBox; */
NS_IMETHODIMP
SVGSVGElement::GetViewBox(nsIDOMSVGAnimatedRect * *aViewBox)
{
*aViewBox = ViewBox().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedRect>
SVGSVGElement::ViewBox()
@ -693,15 +683,6 @@ SVGSVGElement::ViewBox()
return rect.forget();
}
/* readonly attribute SVGPreserveAspectRatio preserveAspectRatio; */
NS_IMETHODIMP
SVGSVGElement::GetPreserveAspectRatio(nsISupports
**aPreserveAspectRatio)
{
*aPreserveAspectRatio = PreserveAspectRatio().get();
return NS_OK;
}
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
SVGSVGElement::PreserveAspectRatio()
{

View File

@ -7,7 +7,6 @@
#define mozilla_dom_SVGSVGElement_h
#include "mozilla/dom/FromParser.h"
#include "nsIDOMSVGFitToViewBox.h"
#include "nsISVGPoint.h"
#include "nsIDOMSVGSVGElement.h"
#include "nsSVGEnum.h"
@ -80,8 +79,7 @@ public:
typedef SVGGraphicsElement SVGSVGElementBase;
class SVGSVGElement MOZ_FINAL : public SVGSVGElementBase,
public nsIDOMSVGSVGElement,
public nsIDOMSVGFitToViewBox
public nsIDOMSVGSVGElement
{
friend class ::nsSVGOuterSVGFrame;
friend class ::nsSVGInnerSVGFrame;
@ -101,7 +99,6 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGSVGElement, SVGSVGElementBase)
NS_DECL_NSIDOMSVGSVGELEMENT
NS_DECL_NSIDOMSVGFITTOVIEWBOX
// xxx I wish we could use virtual inheritance
NS_FORWARD_NSIDOMNODE_TO_NSINODE

View File

@ -26,8 +26,8 @@ NS_IMPL_ADDREF_INHERITED(SVGSymbolElement,SVGSymbolElementBase)
NS_IMPL_RELEASE_INHERITED(SVGSymbolElement,SVGSymbolElementBase)
NS_INTERFACE_TABLE_HEAD(SVGSymbolElement)
NS_NODE_INTERFACE_TABLE6(SVGSymbolElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement, nsIDOMSVGFitToViewBox,
NS_NODE_INTERFACE_TABLE5(SVGSymbolElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIDOMSVGSymbolElement, DOMSVGTests)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGSymbolElement)
NS_INTERFACE_MAP_END_INHERITING(SVGSymbolElementBase)
@ -48,14 +48,6 @@ SVGSymbolElement::SVGSymbolElement(already_AddRefed<nsINodeInfo> aNodeInfo)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGSymbolElement)
//----------------------------------------------------------------------
// nsIDOMSVGFitToViewBox methods
/* readonly attribute nsIDOMSVGAnimatedRect viewBox; */
NS_IMETHODIMP SVGSymbolElement::GetViewBox(nsIDOMSVGAnimatedRect * *aViewBox)
{
*aViewBox = ViewBox().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedRect>
SVGSymbolElement::ViewBox()
@ -65,15 +57,6 @@ SVGSymbolElement::ViewBox()
return rect.forget();
}
/* readonly attribute SVGPreserveAspectRatio preserveAspectRatio; */
NS_IMETHODIMP
SVGSymbolElement::GetPreserveAspectRatio(nsISupports
**aPreserveAspectRatio)
{
*aPreserveAspectRatio = PreserveAspectRatio().get();
return NS_OK;
}
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
SVGSymbolElement::PreserveAspectRatio()
{

View File

@ -11,7 +11,6 @@
#include "nsSVGElement.h"
#include "nsSVGViewBox.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "nsIDOMSVGFitToViewBox.h"
#include "nsGkAtoms.h"
nsresult NS_NewSVGSymbolElement(nsIContent **aResult,
@ -24,8 +23,7 @@ typedef nsSVGElement SVGSymbolElementBase;
class SVGSymbolElement MOZ_FINAL : public SVGSymbolElementBase,
public nsIDOMSVGSymbolElement,
public DOMSVGTests,
public nsIDOMSVGFitToViewBox
public DOMSVGTests
{
protected:
friend nsresult (::NS_NewSVGSymbolElement(nsIContent **aResult,
@ -38,7 +36,6 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGSYMBOLELEMENT
NS_DECL_NSIDOMSVGFITTOVIEWBOX
// xxx I wish we could use virtual inheritance
NS_FORWARD_NSIDOMNODE_TO_NSINODE

View File

@ -46,9 +46,8 @@ NS_IMPL_ADDREF_INHERITED(SVGViewElement,SVGViewElementBase)
NS_IMPL_RELEASE_INHERITED(SVGViewElement,SVGViewElementBase)
NS_INTERFACE_TABLE_HEAD(SVGViewElement)
NS_NODE_INTERFACE_TABLE5(SVGViewElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement, nsIDOMSVGViewElement,
nsIDOMSVGFitToViewBox)
NS_NODE_INTERFACE_TABLE4(SVGViewElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement, nsIDOMSVGViewElement)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGViewElement)
NS_INTERFACE_MAP_END_INHERITING(SVGViewElementBase)
@ -78,15 +77,6 @@ SVGViewElement::SetZoomAndPan(uint16_t aZoomAndPan, ErrorResult& rv)
}
//----------------------------------------------------------------------
// nsIDOMSVGFitToViewBox methods
/* readonly attribute nsIDOMSVGAnimatedRect viewBox; */
NS_IMETHODIMP
SVGViewElement::GetViewBox(nsIDOMSVGAnimatedRect * *aViewBox)
{
*aViewBox = ViewBox().get();
return NS_OK;
}
already_AddRefed<nsIDOMSVGAnimatedRect>
SVGViewElement::ViewBox()
@ -96,15 +86,6 @@ SVGViewElement::ViewBox()
return box.forget();
}
/* readonly attribute SVGPreserveAspectRatio preserveAspectRatio; */
NS_IMETHODIMP
SVGViewElement::GetPreserveAspectRatio(nsISupports
**aPreserveAspectRatio)
{
*aPreserveAspectRatio = PreserveAspectRatio().get();
return NS_OK;
}
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
SVGViewElement::PreserveAspectRatio()
{

View File

@ -7,7 +7,6 @@
#define mozilla_dom_SVGViewElement_h
#include "nsIDOMSVGViewElement.h"
#include "nsIDOMSVGFitToViewBox.h"
#include "nsSVGElement.h"
#include "nsSVGEnum.h"
#include "nsSVGViewBox.h"
@ -32,8 +31,7 @@ namespace dom {
class SVGSVGElement;
class SVGViewElement : public SVGViewElementBase,
public nsIDOMSVGViewElement,
public nsIDOMSVGFitToViewBox
public nsIDOMSVGViewElement
{
protected:
friend class mozilla::SVGFragmentIdentifier;
@ -49,7 +47,6 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGVIEWELEMENT
NS_DECL_NSIDOMSVGFITTOVIEWBOX
// xxx If xpcom allowed virtual inheritance we wouldn't need to
// forward here :-(

View File

@ -335,7 +335,6 @@
#include "nsIDOMSVGEvent.h"
#include "nsIDOMSVGFilterElement.h"
#include "nsIDOMSVGFilters.h"
#include "nsIDOMSVGFitToViewBox.h"
#include "nsIDOMSVGForeignObjectElem.h"
#include "nsIDOMSVGGElement.h"
#include "nsIDOMSVGGradientElement.h"
@ -3265,7 +3264,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGMarkerElement, nsIDOMSVGMarkerElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGMarkerElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
@ -3287,7 +3285,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGPatternElement, nsIDOMSVGPatternElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPatternElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGUnitTypes)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
@ -3335,7 +3332,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGSVGElement, nsIDOMSVGSVGElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSVGElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
@ -3347,7 +3343,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGSymbolElement, nsIDOMSVGSymbolElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSymbolElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
@ -3383,7 +3378,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGViewElement, nsIDOMSVGViewElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END

View File

@ -39,7 +39,6 @@ XPIDLSRCS = \
nsIDOMSVGEvent.idl \
nsIDOMSVGFilterElement.idl \
nsIDOMSVGFilters.idl \
nsIDOMSVGFitToViewBox.idl \
nsIDOMSVGForeignObjectElem.idl \
nsIDOMSVGGElement.idl \
nsIDOMSVGGradientElement.idl \

View File

@ -1,15 +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 nsIDOMSVGAnimatedRect;
[scriptable, uuid(089410F3-9777-44f1-A882-AB4225696434)]
interface nsIDOMSVGFitToViewBox : nsISupports
{
readonly attribute nsIDOMSVGAnimatedRect viewBox;
readonly attribute nsISupports preserveAspectRatio;
};