зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1435666 - Part 1: Remove nsIDOMSVGElement. r=bz
MozReview-Commit-ID: Hlfnu3pXC0n --HG-- extra : rebase_source : b50343bbebe2044442af4491f7c97209ad8d4fc0
This commit is contained in:
Родитель
949517d131
Коммит
a3eee241b4
|
@ -703,7 +703,6 @@
|
|||
|
||||
; svg
|
||||
@RESPATH@/res/svg.css
|
||||
@RESPATH@/components/dom_svg.xpt
|
||||
@RESPATH@/components/dom_smil.xpt
|
||||
|
||||
; [Personal Security Manager]
|
||||
|
|
|
@ -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'
|
||||
|
|
@ -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;
|
||||
};
|
|
@ -29,7 +29,6 @@ interfaces = [
|
|||
'offline',
|
||||
'geolocation',
|
||||
'notification',
|
||||
'svg',
|
||||
'smil',
|
||||
'push',
|
||||
'payments',
|
||||
|
|
|
@ -183,7 +183,7 @@ public:
|
|||
|
||||
nsISupports* GetParentObject() const {
|
||||
auto svgElement = mList ? Element() : mSVGElement.get();
|
||||
return static_cast<nsIDOMSVGElement*> (svgElement);
|
||||
return static_cast<nsIDOMElement*>(svgElement);
|
||||
}
|
||||
|
||||
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
|
||||
// SVGTests
|
||||
virtual bool IsInChromeDoc() const override;
|
||||
|
||||
nsSVGElement* AsSVGElement() final { return this; }
|
||||
|
||||
protected:
|
||||
// nsSVGElement overrides
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -43,7 +43,7 @@ nsSVGElement::StringInfo SVGFEImageElement::sStringInfo[3] =
|
|||
// nsISupports methods
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(SVGFEImageElement, SVGFEImageElementBase,
|
||||
nsIDOMNode, nsIDOMElement, nsIDOMSVGElement,
|
||||
nsIDOMNode, nsIDOMElement,
|
||||
imgINotificationObserver, nsIImageLoadingContent)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -27,6 +27,7 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
bool IsInChromeDoc() const override;
|
||||
nsSVGElement* AsSVGElement() final { return this; }
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -50,7 +50,6 @@ nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] =
|
|||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(SVGImageElement, SVGImageElementBase,
|
||||
nsIDOMNode, nsIDOMElement,
|
||||
nsIDOMSVGElement,
|
||||
imgINotificationObserver,
|
||||
nsIImageLoadingContent)
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGMPathElement,
|
|||
SVGMPathElementBase,
|
||||
nsIDOMNode,
|
||||
nsIDOMElement,
|
||||
nsIDOMSVGElement,
|
||||
nsIMutationObserver)
|
||||
|
||||
// Constructor
|
||||
|
|
|
@ -69,7 +69,7 @@ DOMSVGTranslatePoint::Copy()
|
|||
nsISupports*
|
||||
DOMSVGTranslatePoint::GetParentObject()
|
||||
{
|
||||
return static_cast<nsIDOMSVGElement*>(mElement);
|
||||
return static_cast<nsIDOMElement*>(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()
|
||||
{
|
||||
|
|
|
@ -33,7 +33,6 @@ nsSVGElement::StringInfo SVGScriptElement::sStringInfo[2] =
|
|||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(SVGScriptElement, SVGScriptElementBase,
|
||||
nsIDOMNode, nsIDOMElement,
|
||||
nsIDOMSVGElement,
|
||||
nsIScriptLoaderObserver,
|
||||
nsIScriptElement, nsIMutationObserver)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ SVGSymbolElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(SVGSymbolElement, SVGSymbolElementBase,
|
||||
nsIDOMNode, nsIDOMElement,
|
||||
nsIDOMSVGElement, mozilla::dom::SVGTests)
|
||||
mozilla::dom::SVGTests)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Implementation
|
||||
|
|
|
@ -30,28 +30,22 @@ SVGTests::SVGTests()
|
|||
already_AddRefed<DOMSVGStringList>
|
||||
SVGTests::RequiredFeatures()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
|
||||
nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
|
||||
return DOMSVGStringList::GetDOMWrapper(
|
||||
&mStringListAttributes[FEATURES], element, true, FEATURES);
|
||||
&mStringListAttributes[FEATURES], AsSVGElement(), true, FEATURES);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGStringList>
|
||||
SVGTests::RequiredExtensions()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
|
||||
nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
|
||||
return DOMSVGStringList::GetDOMWrapper(
|
||||
&mStringListAttributes[EXTENSIONS], element, true, EXTENSIONS);
|
||||
&mStringListAttributes[EXTENSIONS], AsSVGElement(), true, EXTENSIONS);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGStringList>
|
||||
SVGTests::SystemLanguage()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
|
||||
nsSVGElement* element = static_cast<nsSVGElement*>(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<nsIDOMSVGElement> elem = do_QueryInterface(this);
|
||||
nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
|
||||
|
||||
nsIContent* parent = element->GetFlattenedTreeParent();
|
||||
nsIContent* parent = AsSVGElement()->GetFlattenedTreeParent();
|
||||
|
||||
if (parent &&
|
||||
parent->NodeInfo()->Equals(nsGkAtoms::svgSwitch, kNameSpaceID_SVG)) {
|
||||
|
|
|
@ -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() {}
|
||||
|
|
|
@ -23,7 +23,6 @@ SVGTitleElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(SVGTitleElement, SVGTitleElementBase,
|
||||
nsIDOMNode, nsIDOMElement,
|
||||
nsIDOMSVGElement,
|
||||
nsIMutationObserver)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -110,15 +110,6 @@ nsSVGElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> 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<SVGTests> tests(do_QueryInterface(static_cast<nsIDOMSVGElement*>(this)));
|
||||
nsCOMPtr<SVGTests> tests(do_QueryInterface(static_cast<nsIDOMElement*>(this)));
|
||||
name = tests->GetAttrName(aAttrEnum);
|
||||
} else {
|
||||
name = *GetStringListInfo().mStringListInfo[aAttrEnum].mName;
|
||||
|
|
|
@ -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<mozilla::dom::NodeInfo>& 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)
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ public:
|
|||
int32_t aNameSpaceID, nsAtom* aAttribute) const override;
|
||||
virtual nsSVGString& GetResultImageName() override { return mStringAttributes[RESULT]; }
|
||||
virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources) override;
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGFELightingElementBase::)
|
||||
NS_FORWARD_NSIDOMELEMENT(nsSVGFELightingElementBase::)
|
||||
|
||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
|
||||
|
||||
|
|
|
@ -480,7 +480,6 @@
|
|||
|
||||
; svg
|
||||
@BINPATH@/res/svg.css
|
||||
@BINPATH@/components/dom_svg.xpt
|
||||
@BINPATH@/components/dom_smil.xpt
|
||||
|
||||
; [Personal Security Manager]
|
||||
|
|
|
@ -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),
|
||||
|
|
Загрузка…
Ссылка в новой задаче