mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 833446: Remove nsIDOMSVGUseElement r=peterv
This commit is contained in:
parent
360ccd40e1
commit
511bca155d
@ -15,8 +15,6 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
DOMCI_NODE_DATA(SVGUseElement, mozilla::dom::SVGUseElement)
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Use)
|
||||
|
||||
namespace mozilla {
|
||||
@ -65,14 +63,10 @@ NS_IMPL_ADDREF_INHERITED(SVGUseElement,SVGUseElementBase)
|
||||
NS_IMPL_RELEASE_INHERITED(SVGUseElement,SVGUseElementBase)
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGUseElement)
|
||||
NS_NODE_INTERFACE_TABLE6(SVGUseElement, nsIDOMNode, nsIDOMElement,
|
||||
NS_NODE_INTERFACE_TABLE5(SVGUseElement, nsIDOMNode, nsIDOMElement,
|
||||
nsIDOMSVGElement,
|
||||
nsIDOMSVGURIReference,
|
||||
nsIDOMSVGUseElement, nsIMutationObserver)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGUseElement)
|
||||
if (aIID.Equals(NS_GET_IID(mozilla::dom::SVGUseElement)))
|
||||
foundInterface = reinterpret_cast<nsISupports*>(this);
|
||||
else
|
||||
nsIMutationObserver)
|
||||
NS_INTERFACE_MAP_END_INHERITING(SVGUseElementBase)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@ -145,14 +139,6 @@ SVGUseElement::Href()
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIDOMSVGUseElement methods
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength x; */
|
||||
NS_IMETHODIMP SVGUseElement::GetX(nsIDOMSVGAnimatedLength * *aX)
|
||||
{
|
||||
*aX = X().get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<SVGAnimatedLength>
|
||||
SVGUseElement::X()
|
||||
@ -160,39 +146,18 @@ SVGUseElement::X()
|
||||
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength y; */
|
||||
NS_IMETHODIMP SVGUseElement::GetY(nsIDOMSVGAnimatedLength * *aY)
|
||||
{
|
||||
*aY = Y().get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<SVGAnimatedLength>
|
||||
SVGUseElement::Y()
|
||||
{
|
||||
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength width; */
|
||||
NS_IMETHODIMP SVGUseElement::GetWidth(nsIDOMSVGAnimatedLength * *aWidth)
|
||||
{
|
||||
*aWidth = Width().get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<SVGAnimatedLength>
|
||||
SVGUseElement::Width()
|
||||
{
|
||||
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength height; */
|
||||
NS_IMETHODIMP SVGUseElement::GetHeight(nsIDOMSVGAnimatedLength * *aHeight)
|
||||
{
|
||||
*aHeight = Height().get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<SVGAnimatedLength>
|
||||
SVGUseElement::Height()
|
||||
{
|
||||
@ -310,15 +275,9 @@ SVGUseElement::CreateAnonymousContent()
|
||||
for (nsCOMPtr<nsIContent> content = GetParent();
|
||||
content;
|
||||
content = content->GetParent()) {
|
||||
nsCOMPtr<nsIDOMSVGUseElement> useElement = do_QueryInterface(content);
|
||||
|
||||
if (useElement) {
|
||||
nsRefPtr<SVGUseElement> useImpl;
|
||||
useElement->QueryInterface(NS_GET_IID(mozilla::dom::SVGUseElement),
|
||||
getter_AddRefs(useImpl));
|
||||
|
||||
if (useImpl && useImpl->mOriginal == mOriginal)
|
||||
return nullptr;
|
||||
if (content->IsSVG(nsGkAtoms::use) &&
|
||||
static_cast<SVGUseElement*>(content.get())->mOriginal == mOriginal) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include "mozilla/dom/FromParser.h"
|
||||
#include "nsIDOMSVGURIReference.h"
|
||||
#include "nsIDOMSVGUseElement.h"
|
||||
#include "nsReferencedElement.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "mozilla/dom/SVGGraphicsElement.h"
|
||||
@ -20,10 +19,6 @@ class nsIContent;
|
||||
class nsINodeInfo;
|
||||
class nsSVGUseFrame;
|
||||
|
||||
#define NS_SVG_USE_ELEMENT_IMPL_CID \
|
||||
{ 0x55fb86fe, 0xd81f, 0x4ae4, \
|
||||
{ 0x80, 0x3f, 0xeb, 0x90, 0xfe, 0xe0, 0x7a, 0xe9 } }
|
||||
|
||||
nsresult
|
||||
NS_NewSVGSVGElement(nsIContent **aResult,
|
||||
already_AddRefed<nsINodeInfo> aNodeInfo,
|
||||
@ -37,7 +32,7 @@ namespace dom {
|
||||
typedef SVGGraphicsElement SVGUseElementBase;
|
||||
|
||||
class SVGUseElement MOZ_FINAL : public SVGUseElementBase,
|
||||
public nsIDOMSVGUseElement,
|
||||
public nsIDOMSVGElement,
|
||||
public nsIDOMSVGURIReference,
|
||||
public nsStubMutationObserver
|
||||
{
|
||||
@ -50,13 +45,10 @@ protected:
|
||||
virtual JSObject* WrapNode(JSContext *cx, JSObject *scope, bool *triedToWrap) MOZ_OVERRIDE;
|
||||
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_SVG_USE_ELEMENT_IMPL_CID)
|
||||
|
||||
// interfaces:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGUseElement, SVGUseElementBase)
|
||||
NS_DECL_NSIDOMSVGUSEELEMENT
|
||||
NS_DECL_NSIDOMSVGURIREFERENCE
|
||||
|
||||
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
|
||||
@ -85,8 +77,6 @@ public:
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
virtual nsXPCClassInfo* GetClassInfo();
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||
|
||||
// WebIDL
|
||||
@ -139,8 +129,6 @@ protected:
|
||||
SourceReference mSource; // observed element
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(SVGUseElement, NS_SVG_USE_ELEMENT_IMPL_CID)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -332,7 +332,6 @@
|
||||
#include "nsIDOMSVGTitleElement.h"
|
||||
#include "nsIDOMSVGUnitTypes.h"
|
||||
#include "nsIDOMSVGURIReference.h"
|
||||
#include "nsIDOMSVGUseElement.h"
|
||||
#include "nsIDOMSVGViewElement.h"
|
||||
#include "nsIDOMSVGZoomEvent.h"
|
||||
|
||||
@ -1091,8 +1090,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||
ELEMENT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA_WITH_NAME(SVGUnknownElement, SVGElement, nsElementSH,
|
||||
ELEMENT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(SVGUseElement, nsElementSH,
|
||||
ELEMENT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(SVGViewElement, nsElementSH,
|
||||
ELEMENT_SCRIPTABLE_FLAGS)
|
||||
|
||||
@ -3065,12 +3062,6 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(SVGUseElement, nsIDOMSVGUseElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGUseElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
|
||||
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(SVGViewElement, nsIDOMSVGViewElement)
|
||||
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
@ -224,7 +224,6 @@ DOMCI_CLASS(SVGMarkerElement)
|
||||
DOMCI_CLASS(SVGMaskElement)
|
||||
DOMCI_CLASS(SVGTitleElement)
|
||||
DOMCI_CLASS(SVGUnknownElement)
|
||||
DOMCI_CLASS(SVGUseElement)
|
||||
DOMCI_CLASS(SVGViewElement)
|
||||
|
||||
// other SVG classes
|
||||
|
@ -40,7 +40,6 @@ XPIDLSRCS = \
|
||||
nsIDOMSVGTitleElement.idl \
|
||||
nsIDOMSVGURIReference.idl \
|
||||
nsIDOMSVGUnitTypes.idl \
|
||||
nsIDOMSVGUseElement.idl \
|
||||
nsIDOMSVGViewElement.idl \
|
||||
nsIDOMSVGZoomEvent.idl \
|
||||
$(NULL)
|
||||
|
@ -1,34 +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"
|
||||
|
||||
interface nsIDOMSVGAnimatedLength;
|
||||
|
||||
[scriptable, uuid(1C2F17CF-3ABF-4E03-94AF-E0A3B93CEEBB)]
|
||||
interface nsIDOMSVGUseElement
|
||||
: 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,
|
||||
nsIDOMSVGTests,
|
||||
nsIDOMSVGLangSpace,
|
||||
nsIDOMSVGExternalResourcesRequired,
|
||||
nsIDOMSVGStylable,
|
||||
nsIDOMSVGTransformable,
|
||||
events::nsIDOMEventTarget
|
||||
*/
|
||||
{
|
||||
readonly attribute nsIDOMSVGAnimatedLength x;
|
||||
readonly attribute nsIDOMSVGAnimatedLength y;
|
||||
readonly attribute nsIDOMSVGAnimatedLength width;
|
||||
readonly attribute nsIDOMSVGAnimatedLength height;
|
||||
};
|
Loading…
Reference in New Issue
Block a user