diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index e66d99e0f6dd..1b5a82e27cbe 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -703,7 +703,6 @@ ; svg @RESPATH@/res/svg.css -@RESPATH@/components/dom_svg.xpt @RESPATH@/components/dom_smil.xpt ; [Personal Security Manager] diff --git a/dom/interfaces/svg/moz.build b/dom/interfaces/svg/moz.build deleted file mode 100644 index 417dd6e60bb4..000000000000 --- a/dom/interfaces/svg/moz.build +++ /dev/null @@ -1,15 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -with Files("**"): - BUG_COMPONENT = ("Core", "SVG") - -XPIDL_SOURCES += [ - 'nsIDOMSVGElement.idl', -] - -XPIDL_MODULE = 'dom_svg' - diff --git a/dom/interfaces/svg/nsIDOMSVGElement.idl b/dom/interfaces/svg/nsIDOMSVGElement.idl deleted file mode 100644 index c11ff5d83e84..000000000000 --- a/dom/interfaces/svg/nsIDOMSVGElement.idl +++ /dev/null @@ -1,17 +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 "nsIDOMElement.idl" - -[uuid(c63517c5-8bab-4cd1-8694-bccafc32a195)] -interface nsIDOMSVGElement : nsIDOMElement -{ - // raises DOMException on setting - readonly attribute nsIDOMSVGElement ownerSVGElement; - readonly attribute nsIDOMSVGElement viewportElement; - - [binaryname(SVGClassName)] - readonly attribute nsISupports className; -}; diff --git a/dom/moz.build b/dom/moz.build index c13a973b0eee..092b1789521e 100644 --- a/dom/moz.build +++ b/dom/moz.build @@ -29,7 +29,6 @@ interfaces = [ 'offline', 'geolocation', 'notification', - 'svg', 'smil', 'push', 'payments', diff --git a/dom/svg/DOMSVGLength.h b/dom/svg/DOMSVGLength.h index 0816f8e0287a..d7cbf9eaf163 100644 --- a/dom/svg/DOMSVGLength.h +++ b/dom/svg/DOMSVGLength.h @@ -183,7 +183,7 @@ public: nsISupports* GetParentObject() const { auto svgElement = mList ? Element() : mSVGElement.get(); - return static_cast (svgElement); + return static_cast(svgElement); } JSObject* WrapObject(JSContext* aCx, JS::Handle aGivenProto) override; diff --git a/dom/svg/SVGAElement.cpp b/dom/svg/SVGAElement.cpp index c5e469aad629..d8b4d28a68fc 100644 --- a/dom/svg/SVGAElement.cpp +++ b/dom/svg/SVGAElement.cpp @@ -41,7 +41,6 @@ nsSVGElement::StringInfo SVGAElement::sStringInfo[3] = NS_INTERFACE_MAP_BEGIN(SVGAElement) NS_INTERFACE_MAP_ENTRY(nsIDOMNode) NS_INTERFACE_MAP_ENTRY(nsIDOMElement) - NS_INTERFACE_MAP_ENTRY(nsIDOMSVGElement) NS_INTERFACE_MAP_ENTRY(Link) NS_INTERFACE_MAP_END_INHERITING(SVGAElementBase) diff --git a/dom/svg/SVGAnimationElement.h b/dom/svg/SVGAnimationElement.h index e90ca783d143..81dd7255a7ec 100644 --- a/dom/svg/SVGAnimationElement.h +++ b/dom/svg/SVGAnimationElement.h @@ -89,7 +89,7 @@ public: // SVGTests virtual bool IsInChromeDoc() const override; - + nsSVGElement* AsSVGElement() final { return this; } protected: // nsSVGElement overrides diff --git a/dom/svg/SVGDocument.cpp b/dom/svg/SVGDocument.cpp index 8b44f8305c71..6b16cc078d85 100644 --- a/dom/svg/SVGDocument.cpp +++ b/dom/svg/SVGDocument.cpp @@ -16,7 +16,6 @@ #include "nsServiceManagerUtils.h" #include "nsString.h" #include "nsLiteralString.h" -#include "nsIDOMSVGElement.h" #include "mozilla/dom/Element.h" #include "nsSVGElement.h" #include "mozilla/StyleSheet.h" diff --git a/dom/svg/SVGFEImageElement.cpp b/dom/svg/SVGFEImageElement.cpp index 36a305ab1045..7a70f0dc6eaf 100644 --- a/dom/svg/SVGFEImageElement.cpp +++ b/dom/svg/SVGFEImageElement.cpp @@ -43,7 +43,7 @@ nsSVGElement::StringInfo SVGFEImageElement::sStringInfo[3] = // nsISupports methods NS_IMPL_ISUPPORTS_INHERITED(SVGFEImageElement, SVGFEImageElementBase, - nsIDOMNode, nsIDOMElement, nsIDOMSVGElement, + nsIDOMNode, nsIDOMElement, imgINotificationObserver, nsIImageLoadingContent) //---------------------------------------------------------------------- diff --git a/dom/svg/SVGGraphicsElement.h b/dom/svg/SVGGraphicsElement.h index a6437dba9ed6..8f3b48f8ba7d 100644 --- a/dom/svg/SVGGraphicsElement.h +++ b/dom/svg/SVGGraphicsElement.h @@ -27,6 +27,7 @@ public: NS_DECL_ISUPPORTS_INHERITED bool IsInChromeDoc() const override; + nsSVGElement* AsSVGElement() final { return this; } }; } // namespace dom diff --git a/dom/svg/SVGImageElement.cpp b/dom/svg/SVGImageElement.cpp index 8e2530965043..3b87afd58777 100644 --- a/dom/svg/SVGImageElement.cpp +++ b/dom/svg/SVGImageElement.cpp @@ -50,7 +50,6 @@ nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] = NS_IMPL_ISUPPORTS_INHERITED(SVGImageElement, SVGImageElementBase, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, imgINotificationObserver, nsIImageLoadingContent) diff --git a/dom/svg/SVGMPathElement.cpp b/dom/svg/SVGMPathElement.cpp index 9ce89052a9b2..882265dd5f83 100644 --- a/dom/svg/SVGMPathElement.cpp +++ b/dom/svg/SVGMPathElement.cpp @@ -51,7 +51,6 @@ NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGMPathElement, SVGMPathElementBase, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, nsIMutationObserver) // Constructor diff --git a/dom/svg/SVGSVGElement.cpp b/dom/svg/SVGSVGElement.cpp index 4d7a714c349f..bb6f0e08739e 100644 --- a/dom/svg/SVGSVGElement.cpp +++ b/dom/svg/SVGSVGElement.cpp @@ -69,7 +69,7 @@ DOMSVGTranslatePoint::Copy() nsISupports* DOMSVGTranslatePoint::GetParentObject() { - return static_cast(mElement); + return static_cast(mElement); } void @@ -123,8 +123,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGSVGElement, SVGSVGElementBase, nsIDOMNode, - nsIDOMElement, - nsIDOMSVGElement) + nsIDOMElement) SVGView::SVGView() { diff --git a/dom/svg/SVGScriptElement.cpp b/dom/svg/SVGScriptElement.cpp index 3f9ebbb26f86..6ba5ec179f04 100644 --- a/dom/svg/SVGScriptElement.cpp +++ b/dom/svg/SVGScriptElement.cpp @@ -33,7 +33,6 @@ nsSVGElement::StringInfo SVGScriptElement::sStringInfo[2] = NS_IMPL_ISUPPORTS_INHERITED(SVGScriptElement, SVGScriptElementBase, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, nsIScriptLoaderObserver, nsIScriptElement, nsIMutationObserver) diff --git a/dom/svg/SVGSymbolElement.cpp b/dom/svg/SVGSymbolElement.cpp index 71ba2199e008..13e22527e273 100644 --- a/dom/svg/SVGSymbolElement.cpp +++ b/dom/svg/SVGSymbolElement.cpp @@ -23,7 +23,7 @@ SVGSymbolElement::WrapNode(JSContext *aCx, JS::Handle aGivenProto) NS_IMPL_ISUPPORTS_INHERITED(SVGSymbolElement, SVGSymbolElementBase, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, mozilla::dom::SVGTests) + mozilla::dom::SVGTests) //---------------------------------------------------------------------- // Implementation diff --git a/dom/svg/SVGTests.cpp b/dom/svg/SVGTests.cpp index f4ff9dd5c422..0a59ddb2cb20 100644 --- a/dom/svg/SVGTests.cpp +++ b/dom/svg/SVGTests.cpp @@ -30,28 +30,22 @@ SVGTests::SVGTests() already_AddRefed SVGTests::RequiredFeatures() { - nsCOMPtr elem = do_QueryInterface(this); - nsSVGElement* element = static_cast(elem.get()); return DOMSVGStringList::GetDOMWrapper( - &mStringListAttributes[FEATURES], element, true, FEATURES); + &mStringListAttributes[FEATURES], AsSVGElement(), true, FEATURES); } already_AddRefed SVGTests::RequiredExtensions() { - nsCOMPtr elem = do_QueryInterface(this); - nsSVGElement* element = static_cast(elem.get()); return DOMSVGStringList::GetDOMWrapper( - &mStringListAttributes[EXTENSIONS], element, true, EXTENSIONS); + &mStringListAttributes[EXTENSIONS], AsSVGElement(), true, EXTENSIONS); } already_AddRefed SVGTests::SystemLanguage() { - nsCOMPtr elem = do_QueryInterface(this); - nsSVGElement* element = static_cast(elem.get()); return DOMSVGStringList::GetDOMWrapper( - &mStringListAttributes[LANGUAGE], element, true, LANGUAGE); + &mStringListAttributes[LANGUAGE], AsSVGElement(), true, LANGUAGE); } bool @@ -224,10 +218,7 @@ SVGTests::GetAttrValue(uint8_t aAttrEnum, nsAttrValue& aValue) const void SVGTests::MaybeInvalidate() { - nsCOMPtr elem = do_QueryInterface(this); - nsSVGElement* element = static_cast(elem.get()); - - nsIContent* parent = element->GetFlattenedTreeParent(); + nsIContent* parent = AsSVGElement()->GetFlattenedTreeParent(); if (parent && parent->NodeInfo()->Equals(nsGkAtoms::svgSwitch, kNameSpaceID_SVG)) { diff --git a/dom/svg/SVGTests.h b/dom/svg/SVGTests.h index 864370de2954..2a9340c90660 100644 --- a/dom/svg/SVGTests.h +++ b/dom/svg/SVGTests.h @@ -14,6 +14,7 @@ class nsAttrValue; class nsAtom; class nsStaticAtom; +class nsSVGElement; namespace mozilla { class DOMSVGStringList; @@ -96,6 +97,7 @@ public: bool HasExtension(const nsAString& aExtension); virtual bool IsInChromeDoc() const = 0; + virtual nsSVGElement* AsSVGElement() = 0; protected: virtual ~SVGTests() {} diff --git a/dom/svg/SVGTitleElement.cpp b/dom/svg/SVGTitleElement.cpp index 1b32c0c09577..603d3a942297 100644 --- a/dom/svg/SVGTitleElement.cpp +++ b/dom/svg/SVGTitleElement.cpp @@ -23,7 +23,6 @@ SVGTitleElement::WrapNode(JSContext *aCx, JS::Handle aGivenProto) NS_IMPL_ISUPPORTS_INHERITED(SVGTitleElement, SVGTitleElementBase, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, nsIMutationObserver) //---------------------------------------------------------------------- diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index db83a4ce307e..194931cac692 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -110,15 +110,6 @@ nsSVGElement::WrapNode(JSContext *aCx, JS::Handle aGivenProto) return SVGElementBinding::Wrap(aCx, this, aGivenProto); } -//---------------------------------------------------------------------- - -NS_IMETHODIMP -nsSVGElement::GetSVGClassName(nsISupports** aClassName) -{ - *aClassName = ClassName().take(); - return NS_OK; -} - //---------------------------------------------------------------------- // nsSVGElement methods @@ -247,8 +238,7 @@ nsSVGElement::Init() // nsISupports methods NS_IMPL_ISUPPORTS_INHERITED(nsSVGElement, nsSVGElementBase, - nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement) + nsIDOMNode, nsIDOMElement) //---------------------------------------------------------------------- // Implementation @@ -1099,14 +1089,6 @@ nsSVGElement::sMaskMap[] = { //---------------------------------------------------------------------- -// nsIDOMSVGElement methods - -NS_IMETHODIMP -nsSVGElement::GetOwnerSVGElement(nsIDOMSVGElement * *aOwnerSVGElement) -{ - NS_IF_ADDREF(*aOwnerSVGElement = GetOwnerSVGElement()); - return NS_OK; -} SVGSVGElement* nsSVGElement::GetOwnerSVGElement() @@ -1127,14 +1109,6 @@ nsSVGElement::GetOwnerSVGElement() return nullptr; } -NS_IMETHODIMP -nsSVGElement::GetViewportElement(nsIDOMSVGElement * *aViewportElement) -{ - nsSVGElement* elem = GetViewportElement(); - NS_ADDREF(*aViewportElement = elem); - return NS_OK; -} - nsSVGElement* nsSVGElement::GetViewportElement() { @@ -2479,7 +2453,7 @@ nsSVGElement::WillChangeStringList(bool aIsConditionalProcessingAttribute, { nsAtom* name; if (aIsConditionalProcessingAttribute) { - nsCOMPtr tests(do_QueryInterface(static_cast(this))); + nsCOMPtr tests(do_QueryInterface(static_cast(this))); name = tests->GetAttrName(aAttrEnum); } else { name = *GetStringListInfo().mStringListInfo[aAttrEnum].mName; diff --git a/dom/svg/nsSVGElement.h b/dom/svg/nsSVGElement.h index 34e0e99fc05a..bf1a7ba825a3 100644 --- a/dom/svg/nsSVGElement.h +++ b/dom/svg/nsSVGElement.h @@ -24,7 +24,7 @@ #include "nsISupportsImpl.h" #include "nsStyledElement.h" #include "nsSVGClass.h" -#include "nsIDOMSVGElement.h" +#include "nsIDOMElement.h" #include "SVGContentUtils.h" #include "gfxMatrix.h" @@ -70,7 +70,7 @@ struct nsSVGEnumMapping; typedef nsStyledElement nsSVGElementBase; class nsSVGElement : public nsSVGElementBase // nsIContent - , public nsIDOMSVGElement + , public nsIDOMElement { protected: explicit nsSVGElement(already_AddRefed& aNodeInfo); @@ -136,7 +136,7 @@ public: static const MappedAttributeEntry sLightingEffectsMap[]; static const MappedAttributeEntry sMaskMap[]; - NS_DECL_NSIDOMSVGELEMENT + NS_DECL_NSIDOMELEMENT NS_IMPL_FROMCONTENT(nsSVGElement, kNameSpaceID_SVG) diff --git a/dom/svg/nsSVGFilters.h b/dom/svg/nsSVGFilters.h index 326208fe5b0c..8c5b3b4cf293 100644 --- a/dom/svg/nsSVGFilters.h +++ b/dom/svg/nsSVGFilters.h @@ -189,7 +189,7 @@ public: int32_t aNameSpaceID, nsAtom* aAttribute) const override; virtual nsSVGString& GetResultImageName() override { return mStringAttributes[RESULT]; } virtual void GetSourceImageNames(nsTArray& aSources) override; - NS_FORWARD_NSIDOMSVGELEMENT(nsSVGFELightingElementBase::) + NS_FORWARD_NSIDOMELEMENT(nsSVGFELightingElementBase::) NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override; diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index 626d6351f1dc..57bd2f321799 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -480,7 +480,6 @@ ; svg @BINPATH@/res/svg.css -@BINPATH@/components/dom_svg.xpt @BINPATH@/components/dom_smil.xpt ; [Personal Security Manager] diff --git a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp index ed4393bc531a..bb4c16ec58d8 100644 --- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp +++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp @@ -58,7 +58,6 @@ #include "nsIDOMScrollAreaEvent.h" #include "nsIDOMSerializer.h" #include "nsIDOMSimpleGestureEvent.h" -#include "nsIDOMSVGElement.h" #include "nsIDOMText.h" #include "nsIDOMTimeEvent.h" #include "nsIDOMTimeRanges.h" @@ -280,7 +279,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] = DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject), DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer), DEFINE_SHIM(SimpleGestureEvent), - DEFINE_SHIM(SVGElement), DEFINE_SHIM(Text), DEFINE_SHIM(TimeEvent), DEFINE_SHIM(TimeRanges),