Bug 833446: Remove nsIDOMSVGAltGlyphElement r=peterv

This commit is contained in:
David Zbarsky 2013-02-02 15:22:36 -05:00
Родитель d35ff07f00
Коммит 353c1d24c5
7 изменённых файлов: 24 добавлений и 69 удалений

Просмотреть файл

@ -7,8 +7,6 @@
#include "mozilla/dom/SVGAltGlyphElementBinding.h" #include "mozilla/dom/SVGAltGlyphElementBinding.h"
#include "nsContentUtils.h" #include "nsContentUtils.h"
DOMCI_NODE_DATA(SVGAltGlyphElement, mozilla::dom::SVGAltGlyphElement)
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(AltGlyph) NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(AltGlyph)
namespace mozilla { namespace mozilla {
@ -29,16 +27,12 @@ nsSVGElement::StringInfo SVGAltGlyphElement::sStringInfo[1] =
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsISupports methods // nsISupports methods
NS_IMPL_ADDREF_INHERITED(SVGAltGlyphElement,SVGAltGlyphElementBase) NS_IMPL_ISUPPORTS_INHERITED6(SVGAltGlyphElement, SVGAltGlyphElementBase,
NS_IMPL_RELEASE_INHERITED(SVGAltGlyphElement,SVGAltGlyphElementBase) nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
NS_INTERFACE_TABLE_HEAD(SVGAltGlyphElement) nsIDOMSVGTextPositioningElement,
NS_NODE_INTERFACE_TABLE7(SVGAltGlyphElement, nsIDOMNode, nsIDOMElement, nsIDOMSVGTextContentElement,
nsIDOMSVGElement, nsIDOMSVGAltGlyphElement, nsIDOMSVGURIReference)
nsIDOMSVGTextPositioningElement, nsIDOMSVGTextContentElement,
nsIDOMSVGURIReference)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAltGlyphElement)
NS_INTERFACE_MAP_END_INHERITING(SVGAltGlyphElementBase)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Implementation // Implementation
@ -49,7 +43,6 @@ SVGAltGlyphElement::SVGAltGlyphElement(already_AddRefed<nsINodeInfo> aNodeInfo)
SetIsDOMBinding(); SetIsDOMBinding();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIDOMNode methods // nsIDOMNode methods
@ -73,33 +66,28 @@ SVGAltGlyphElement::Href()
return href.forget(); return href.forget();
} }
//---------------------------------------------------------------------- void
// nsIDOMSVGAltGlyphElement methods SVGAltGlyphElement::GetGlyphRef(nsAString & aGlyphRef)
/* attribute DOMString glyphRef; */
NS_IMETHODIMP SVGAltGlyphElement::GetGlyphRef(nsAString & aGlyphRef)
{ {
GetAttr(kNameSpaceID_None, nsGkAtoms::glyphRef, aGlyphRef); GetAttr(kNameSpaceID_None, nsGkAtoms::glyphRef, aGlyphRef);
return NS_OK;
} }
NS_IMETHODIMP SVGAltGlyphElement::SetGlyphRef(const nsAString & aGlyphRef) void
SVGAltGlyphElement::SetGlyphRef(const nsAString & aGlyphRef, ErrorResult& rv)
{ {
return SetAttr(kNameSpaceID_None, nsGkAtoms::glyphRef, aGlyphRef, true); rv = SetAttr(kNameSpaceID_None, nsGkAtoms::glyphRef, aGlyphRef, true);
} }
/* attribute DOMString format; */ void
NS_IMETHODIMP SVGAltGlyphElement::GetFormat(nsAString & aFormat) SVGAltGlyphElement::GetFormat(nsAString & aFormat)
{ {
GetAttr(kNameSpaceID_None, nsGkAtoms::format, aFormat); GetAttr(kNameSpaceID_None, nsGkAtoms::format, aFormat);
return NS_OK;
} }
NS_IMETHODIMP SVGAltGlyphElement::SetFormat(const nsAString & aFormat) void
SVGAltGlyphElement::SetFormat(const nsAString & aFormat, ErrorResult& rv)
{ {
return SetAttr(kNameSpaceID_None, nsGkAtoms::format, aFormat, true); rv = SetAttr(kNameSpaceID_None, nsGkAtoms::format, aFormat, true);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

Просмотреть файл

@ -6,10 +6,10 @@
#ifndef mozilla_dom_SVGAltGlyphElement_h #ifndef mozilla_dom_SVGAltGlyphElement_h
#define mozilla_dom_SVGAltGlyphElement_h #define mozilla_dom_SVGAltGlyphElement_h
#include "nsIDOMSVGAltGlyphElement.h"
#include "nsIDOMSVGURIReference.h" #include "nsIDOMSVGURIReference.h"
#include "mozilla/dom/SVGTextPositioningElement.h" #include "mozilla/dom/SVGTextPositioningElement.h"
#include "nsSVGString.h" #include "nsSVGString.h"
#include "nsIDOMSVGTextPositionElem.h"
nsresult NS_NewSVGAltGlyphElement(nsIContent **aResult, nsresult NS_NewSVGAltGlyphElement(nsIContent **aResult,
already_AddRefed<nsINodeInfo> aNodeInfo); already_AddRefed<nsINodeInfo> aNodeInfo);
@ -20,7 +20,7 @@ namespace dom {
typedef SVGTextPositioningElement SVGAltGlyphElementBase; typedef SVGTextPositioningElement SVGAltGlyphElementBase;
class SVGAltGlyphElement MOZ_FINAL : public SVGAltGlyphElementBase, // = nsIDOMSVGTextPositioningElement class SVGAltGlyphElement MOZ_FINAL : public SVGAltGlyphElementBase, // = nsIDOMSVGTextPositioningElement
public nsIDOMSVGAltGlyphElement, public nsIDOMSVGTextPositioningElement,
public nsIDOMSVGURIReference public nsIDOMSVGURIReference
{ {
protected: protected:
@ -33,7 +33,6 @@ public:
// interfaces: // interfaces:
NS_DECL_ISUPPORTS_INHERITED NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGALTGLYPHELEMENT
NS_DECL_NSIDOMSVGURIREFERENCE NS_DECL_NSIDOMSVGURIREFERENCE
// xxx If xpcom allowed virtual inheritance we wouldn't need to // xxx If xpcom allowed virtual inheritance we wouldn't need to
@ -49,12 +48,14 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; } virtual nsIDOMNode* AsDOMNode() { return this; }
// WebIDL // WebIDL
already_AddRefed<nsIDOMSVGAnimatedString> Href(); already_AddRefed<nsIDOMSVGAnimatedString> Href();
void GetGlyphRef(nsAString & aGlyphRef);
void SetGlyphRef(const nsAString & aGlyphRef, ErrorResult& rv);
void GetFormat(nsAString & aFormat);
void SetFormat(const nsAString & aFormat, ErrorResult& rv);
protected: protected:

Просмотреть файл

@ -310,7 +310,6 @@
#include "nsIDOMGetSVGDocument.h" #include "nsIDOMGetSVGDocument.h"
#include "nsIDOMSVGAElement.h" #include "nsIDOMSVGAElement.h"
#include "nsIDOMSVGAltGlyphElement.h"
#include "nsIDOMSVGAnimatedEnum.h" #include "nsIDOMSVGAnimatedEnum.h"
#include "nsIDOMSVGAnimatedInteger.h" #include "nsIDOMSVGAnimatedInteger.h"
#include "nsIDOMSVGAnimatedLength.h" #include "nsIDOMSVGAnimatedLength.h"
@ -1073,8 +1072,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
// SVG element classes // SVG element classes
NS_DEFINE_CLASSINFO_DATA(SVGAElement, nsElementSH, NS_DEFINE_CLASSINFO_DATA(SVGAElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS) ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAltGlyphElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimateElement, nsElementSH, NS_DEFINE_CLASSINFO_DATA(SVGAnimateElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS) ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGAnimateTransformElement, nsElementSH, NS_DEFINE_CLASSINFO_DATA(SVGAnimateTransformElement, nsElementSH,
@ -3015,12 +3012,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAltGlyphElement, nsIDOMSVGAltGlyphElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextPositioningElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
DOM_CLASSINFO_SVG_TEXT_CONTENT_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAnimateElement, nsIDOMSVGAnimateElement) DOM_CLASSINFO_MAP_BEGIN(SVGAnimateElement, nsIDOMSVGAnimateElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimationElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimationElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimateElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimateElement)

Просмотреть файл

@ -192,7 +192,6 @@ DOMCI_CLASS(SVGDocument)
// SVG element classes // SVG element classes
DOMCI_CLASS(SVGAElement) DOMCI_CLASS(SVGAElement)
DOMCI_CLASS(SVGAltGlyphElement)
DOMCI_CLASS(SVGAnimateElement) DOMCI_CLASS(SVGAnimateElement)
DOMCI_CLASS(SVGAnimateTransformElement) DOMCI_CLASS(SVGAnimateTransformElement)
DOMCI_CLASS(SVGAnimateMotionElement) DOMCI_CLASS(SVGAnimateMotionElement)

Просмотреть файл

@ -18,7 +18,6 @@ XPIDL_MODULE = dom_svg
XPIDLSRCS = \ XPIDLSRCS = \
nsIDOMGetSVGDocument.idl \ nsIDOMGetSVGDocument.idl \
nsIDOMSVGAElement.idl \ nsIDOMSVGAElement.idl \
nsIDOMSVGAltGlyphElement.idl \
nsIDOMSVGAnimatedEnum.idl \ nsIDOMSVGAnimatedEnum.idl \
nsIDOMSVGAnimatedInteger.idl \ nsIDOMSVGAnimatedInteger.idl \
nsIDOMSVGAnimatedLength.idl \ nsIDOMSVGAnimatedLength.idl \

Просмотреть файл

@ -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 "nsIDOMSVGTextPositionElem.idl"
[scriptable, uuid(D7274F91-0FC7-42F1-AD56-3C58AF2B0113)]
interface nsIDOMSVGAltGlyphElement : nsIDOMSVGTextPositioningElement
/*
The SVG DOM makes use of multiple interface inheritance.
Since XPCOM only supports single interface inheritance,
the best thing that we can do is to promise that whenever
an object implements _this_ interface it will also
implement the following interfaces. (We then have to QI to
hop between them.)
nsIDOMSVGURIReference
*/
{
attribute DOMString glyphRef;
// raises DOMException on setting
attribute DOMString format;
// raises DOMException on setting
};

Просмотреть файл

@ -11,7 +11,9 @@
*/ */
interface SVGAltGlyphElement : SVGTextPositioningElement { interface SVGAltGlyphElement : SVGTextPositioningElement {
[SetterThrows]
attribute DOMString glyphRef; attribute DOMString glyphRef;
[SetterThrows]
attribute DOMString format; attribute DOMString format;
}; };