зеркало из https://github.com/mozilla/gecko-dev.git
Bug 833446: Remove nsIDOMSVGScriptElement r=peterv
This commit is contained in:
Родитель
866cb6df5e
Коммит
e1ecd02323
|
@ -10,8 +10,6 @@
|
||||||
#include "mozilla/dom/SVGScriptElement.h"
|
#include "mozilla/dom/SVGScriptElement.h"
|
||||||
#include "mozilla/dom/SVGScriptElementBinding.h"
|
#include "mozilla/dom/SVGScriptElementBinding.h"
|
||||||
|
|
||||||
DOMCI_NODE_DATA(SVGScriptElement, mozilla::dom::SVGScriptElement)
|
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT_CHECK_PARSER(Script)
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT_CHECK_PARSER(Script)
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -31,16 +29,11 @@ nsSVGElement::StringInfo SVGScriptElement::sStringInfo[1] =
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsISupports methods
|
// nsISupports methods
|
||||||
|
|
||||||
NS_IMPL_ADDREF_INHERITED(SVGScriptElement,SVGScriptElementBase)
|
NS_IMPL_ISUPPORTS_INHERITED7(SVGScriptElement, SVGScriptElementBase,
|
||||||
NS_IMPL_RELEASE_INHERITED(SVGScriptElement,SVGScriptElementBase)
|
nsIDOMNode, nsIDOMElement,
|
||||||
|
nsIDOMSVGElement,
|
||||||
NS_INTERFACE_TABLE_HEAD(SVGScriptElement)
|
|
||||||
NS_NODE_INTERFACE_TABLE8(SVGScriptElement, nsIDOMNode, nsIDOMElement,
|
|
||||||
nsIDOMSVGElement, nsIDOMSVGScriptElement,
|
|
||||||
nsIDOMSVGURIReference, nsIScriptLoaderObserver,
|
nsIDOMSVGURIReference, nsIScriptLoaderObserver,
|
||||||
nsIScriptElement, nsIMutationObserver)
|
nsIScriptElement, nsIMutationObserver)
|
||||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGScriptElement)
|
|
||||||
NS_INTERFACE_MAP_END_INHERITING(SVGScriptElementBase)
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Implementation
|
// 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; */
|
void
|
||||||
NS_IMPL_STRING_ATTR(SVGScriptElement, Type, type)
|
SVGScriptElement::SetType(const nsAString & aType, ErrorResult& rv)
|
||||||
/* attribute DOMString crossOrigin */
|
{
|
||||||
NS_IMPL_STRING_ATTR(SVGScriptElement, CrossOrigin, crossorigin)
|
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
|
// nsIDOMSVGURIReference methods
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#define mozilla_dom_SVGScriptElement_h
|
#define mozilla_dom_SVGScriptElement_h
|
||||||
|
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "nsIDOMSVGScriptElement.h"
|
|
||||||
#include "nsIDOMSVGURIReference.h"
|
#include "nsIDOMSVGURIReference.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsSVGString.h"
|
#include "nsSVGString.h"
|
||||||
|
@ -25,7 +24,7 @@ namespace dom {
|
||||||
typedef nsSVGElement SVGScriptElementBase;
|
typedef nsSVGElement SVGScriptElementBase;
|
||||||
|
|
||||||
class SVGScriptElement MOZ_FINAL : public SVGScriptElementBase,
|
class SVGScriptElement MOZ_FINAL : public SVGScriptElementBase,
|
||||||
public nsIDOMSVGScriptElement,
|
public nsIDOMSVGElement,
|
||||||
public nsIDOMSVGURIReference,
|
public nsIDOMSVGURIReference,
|
||||||
public nsScriptElement
|
public nsScriptElement
|
||||||
{
|
{
|
||||||
|
@ -42,7 +41,6 @@ public:
|
||||||
// interfaces:
|
// interfaces:
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_DECL_NSIDOMSVGSCRIPTELEMENT
|
|
||||||
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
|
||||||
|
@ -74,11 +72,13 @@ 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
|
||||||
|
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();
|
already_AddRefed<nsIDOMSVGAnimatedString> Href();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -329,7 +329,6 @@
|
||||||
#include "nsIDOMSVGMaskElement.h"
|
#include "nsIDOMSVGMaskElement.h"
|
||||||
#include "nsIDOMSVGNumber.h"
|
#include "nsIDOMSVGNumber.h"
|
||||||
#include "nsIDOMSVGRect.h"
|
#include "nsIDOMSVGRect.h"
|
||||||
#include "nsIDOMSVGScriptElement.h"
|
|
||||||
#include "nsIDOMSVGStopElement.h"
|
#include "nsIDOMSVGStopElement.h"
|
||||||
#include "nsIDOMSVGStyleElement.h"
|
#include "nsIDOMSVGStyleElement.h"
|
||||||
#include "nsIDOMSVGSVGElement.h"
|
#include "nsIDOMSVGSVGElement.h"
|
||||||
|
@ -1111,8 +1110,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
ELEMENT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGMaskElement, nsElementSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGMaskElement, nsElementSH,
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
ELEMENT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGScriptElement, nsElementSH,
|
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGStopElement, nsElementSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGStopElement, nsElementSH,
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
ELEMENT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGStyleElement, nsElementSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGStyleElement, nsElementSH,
|
||||||
|
@ -3123,12 +3120,6 @@ nsDOMClassInfo::Init()
|
||||||
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
|
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
|
||||||
DOM_CLASSINFO_MAP_END
|
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_BEGIN(SVGStopElement, nsIDOMSVGStopElement)
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStopElement)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStopElement)
|
||||||
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
|
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
|
||||||
|
|
|
@ -222,7 +222,6 @@ DOMCI_CLASS(SVGFilterElement)
|
||||||
DOMCI_CLASS(SVGImageElement)
|
DOMCI_CLASS(SVGImageElement)
|
||||||
DOMCI_CLASS(SVGMarkerElement)
|
DOMCI_CLASS(SVGMarkerElement)
|
||||||
DOMCI_CLASS(SVGMaskElement)
|
DOMCI_CLASS(SVGMaskElement)
|
||||||
DOMCI_CLASS(SVGScriptElement)
|
|
||||||
DOMCI_CLASS(SVGStopElement)
|
DOMCI_CLASS(SVGStopElement)
|
||||||
DOMCI_CLASS(SVGStyleElement)
|
DOMCI_CLASS(SVGStyleElement)
|
||||||
DOMCI_CLASS(SVGSVGElement)
|
DOMCI_CLASS(SVGSVGElement)
|
||||||
|
|
|
@ -36,7 +36,6 @@ XPIDLSRCS = \
|
||||||
nsIDOMSVGMaskElement.idl \
|
nsIDOMSVGMaskElement.idl \
|
||||||
nsIDOMSVGNumber.idl \
|
nsIDOMSVGNumber.idl \
|
||||||
nsIDOMSVGRect.idl \
|
nsIDOMSVGRect.idl \
|
||||||
nsIDOMSVGScriptElement.idl \
|
|
||||||
nsIDOMSVGSVGElement.idl \
|
nsIDOMSVGSVGElement.idl \
|
||||||
nsIDOMSVGStopElement.idl \
|
nsIDOMSVGStopElement.idl \
|
||||||
nsIDOMSVGStringList.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 {
|
interface SVGScriptElement : SVGElement {
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString type;
|
attribute DOMString type;
|
||||||
|
|
||||||
// CORS attribute
|
// CORS attribute
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString crossOrigin;
|
attribute DOMString crossOrigin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче