Bug 833446: Remove nsIDOMSVGScriptElement r=peterv

This commit is contained in:
David Zbarsky 2013-02-02 15:23:18 -05:00
Родитель 866cb6df5e
Коммит e1ecd02323
7 изменённых файлов: 35 добавлений и 60 удалений

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

@ -10,8 +10,6 @@
#include "mozilla/dom/SVGScriptElement.h"
#include "mozilla/dom/SVGScriptElementBinding.h"
DOMCI_NODE_DATA(SVGScriptElement, mozilla::dom::SVGScriptElement)
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT_CHECK_PARSER(Script)
namespace mozilla {
@ -31,16 +29,11 @@ nsSVGElement::StringInfo SVGScriptElement::sStringInfo[1] =
//----------------------------------------------------------------------
// nsISupports methods
NS_IMPL_ADDREF_INHERITED(SVGScriptElement,SVGScriptElementBase)
NS_IMPL_RELEASE_INHERITED(SVGScriptElement,SVGScriptElementBase)
NS_INTERFACE_TABLE_HEAD(SVGScriptElement)
NS_NODE_INTERFACE_TABLE8(SVGScriptElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement, nsIDOMSVGScriptElement,
NS_IMPL_ISUPPORTS_INHERITED7(SVGScriptElement, SVGScriptElementBase,
nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIDOMSVGURIReference, nsIScriptLoaderObserver,
nsIScriptElement, nsIMutationObserver)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGScriptElement)
NS_INTERFACE_MAP_END_INHERITING(SVGScriptElementBase)
//----------------------------------------------------------------------
// Implementation
@ -82,12 +75,29 @@ SVGScriptElement::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
}
//----------------------------------------------------------------------
// nsIDOMSVGScriptElement methods
void
SVGScriptElement::GetType(nsAString & aType)
{
GetAttr(kNameSpaceID_None, nsGkAtoms::type, aType);
}
/* attribute DOMString type; */
NS_IMPL_STRING_ATTR(SVGScriptElement, Type, type)
/* attribute DOMString crossOrigin */
NS_IMPL_STRING_ATTR(SVGScriptElement, CrossOrigin, crossorigin)
void
SVGScriptElement::SetType(const nsAString & aType, ErrorResult& rv)
{
rv = SetAttr(kNameSpaceID_None, nsGkAtoms::type, aType, true);
}
void
SVGScriptElement::GetCrossOrigin(nsAString & aOrigin)
{
GetAttr(kNameSpaceID_None, nsGkAtoms::crossorigin, aOrigin);
}
void
SVGScriptElement::SetCrossOrigin(const nsAString & aOrigin, ErrorResult& rv)
{
rv = SetAttr(kNameSpaceID_None, nsGkAtoms::crossorigin, aOrigin, true);
}
//----------------------------------------------------------------------
// nsIDOMSVGURIReference methods

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

@ -8,7 +8,6 @@
#define mozilla_dom_SVGScriptElement_h
#include "nsSVGElement.h"
#include "nsIDOMSVGScriptElement.h"
#include "nsIDOMSVGURIReference.h"
#include "nsCOMPtr.h"
#include "nsSVGString.h"
@ -25,7 +24,7 @@ namespace dom {
typedef nsSVGElement SVGScriptElementBase;
class SVGScriptElement MOZ_FINAL : public SVGScriptElementBase,
public nsIDOMSVGScriptElement,
public nsIDOMSVGElement,
public nsIDOMSVGURIReference,
public nsScriptElement
{
@ -42,7 +41,6 @@ public:
// interfaces:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGSCRIPTELEMENT
NS_DECL_NSIDOMSVGURIREFERENCE
// xxx If xpcom allowed virtual inheritance we wouldn't need to
@ -74,11 +72,13 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; }
// WebIDL
void GetType(nsAString & aType);
void SetType(const nsAString & aType, ErrorResult& rv);
void GetCrossOrigin(nsAString & aOrigin);
void SetCrossOrigin(const nsAString & aOrigin, ErrorResult& rv);
already_AddRefed<nsIDOMSVGAnimatedString> Href();
protected:

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

@ -329,7 +329,6 @@
#include "nsIDOMSVGMaskElement.h"
#include "nsIDOMSVGNumber.h"
#include "nsIDOMSVGRect.h"
#include "nsIDOMSVGScriptElement.h"
#include "nsIDOMSVGStopElement.h"
#include "nsIDOMSVGStyleElement.h"
#include "nsIDOMSVGSVGElement.h"
@ -1111,8 +1110,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGMaskElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGScriptElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGStopElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGStyleElement, nsElementSH,
@ -3123,12 +3120,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGScriptElement, nsIDOMSVGScriptElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGScriptElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGStopElement, nsIDOMSVGStopElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStopElement)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES

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

@ -222,7 +222,6 @@ DOMCI_CLASS(SVGFilterElement)
DOMCI_CLASS(SVGImageElement)
DOMCI_CLASS(SVGMarkerElement)
DOMCI_CLASS(SVGMaskElement)
DOMCI_CLASS(SVGScriptElement)
DOMCI_CLASS(SVGStopElement)
DOMCI_CLASS(SVGStyleElement)
DOMCI_CLASS(SVGSVGElement)

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

@ -36,7 +36,6 @@ XPIDLSRCS = \
nsIDOMSVGMaskElement.idl \
nsIDOMSVGNumber.idl \
nsIDOMSVGRect.idl \
nsIDOMSVGScriptElement.idl \
nsIDOMSVGSVGElement.idl \
nsIDOMSVGStopElement.idl \
nsIDOMSVGStringList.idl \

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

@ -1,26 +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 "nsIDOMSVGElement.idl"
[scriptable, uuid(B3314A7D-9909-4367-BBDB-9FAFB069CDFD)]
interface nsIDOMSVGScriptElement
: nsIDOMSVGElement
/*
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,
nsIDOMSVGExternalResourcesRequired
*/
{
attribute DOMString type;
// raises DOMException on setting
attribute DOMString crossOrigin;
};

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

@ -11,9 +11,11 @@
*/
interface SVGScriptElement : SVGElement {
[SetterThrows]
attribute DOMString type;
// CORS attribute
[SetterThrows]
attribute DOMString crossOrigin;
};