mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 847600 - Remove SVGEvent, r=jwatt
--HG-- extra : rebase_source : 5b9452c1757b2cec02d469337ae3876a554f0081
This commit is contained in:
parent
48819d88f1
commit
5f03227c63
@ -671,27 +671,27 @@ NON_IDL_EVENT(underflow,
|
||||
NON_IDL_EVENT(SVGLoad,
|
||||
NS_SVG_LOAD,
|
||||
EventNameType_None,
|
||||
NS_SVG_EVENT)
|
||||
NS_EVENT)
|
||||
NON_IDL_EVENT(SVGUnload,
|
||||
NS_SVG_UNLOAD,
|
||||
EventNameType_None,
|
||||
NS_SVG_EVENT)
|
||||
NS_EVENT)
|
||||
NON_IDL_EVENT(SVGAbort,
|
||||
NS_SVG_ABORT,
|
||||
EventNameType_None,
|
||||
NS_SVG_EVENT)
|
||||
NS_EVENT)
|
||||
NON_IDL_EVENT(SVGError,
|
||||
NS_SVG_ERROR,
|
||||
EventNameType_None,
|
||||
NS_SVG_EVENT)
|
||||
NS_EVENT)
|
||||
NON_IDL_EVENT(SVGResize,
|
||||
NS_SVG_RESIZE,
|
||||
EventNameType_None,
|
||||
NS_SVG_EVENT)
|
||||
NS_EVENT)
|
||||
NON_IDL_EVENT(SVGScroll,
|
||||
NS_SVG_SCROLL,
|
||||
EventNameType_None,
|
||||
NS_SVG_EVENT)
|
||||
NS_EVENT)
|
||||
|
||||
NON_IDL_EVENT(SVGZoom,
|
||||
NS_SVG_ZOOM,
|
||||
|
@ -760,13 +760,6 @@ nsDOMEvent::DuplicatePrivateData()
|
||||
static_cast<nsUIEvent*>(mEvent)->detail);
|
||||
break;
|
||||
}
|
||||
case NS_SVG_EVENT:
|
||||
{
|
||||
newEvent = new nsEvent(false, msg);
|
||||
NS_ENSURE_TRUE(newEvent, NS_ERROR_OUT_OF_MEMORY);
|
||||
newEvent->eventStructType = NS_SVG_EVENT;
|
||||
break;
|
||||
}
|
||||
case NS_SVGZOOM_EVENT:
|
||||
{
|
||||
newEvent = new nsGUIEvent(false, msg, nullptr);
|
||||
|
@ -744,9 +744,6 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
|
||||
case NS_CLIPBOARD_EVENT:
|
||||
return NS_NewDOMClipboardEvent(aDOMEvent, aOwner, aPresContext,
|
||||
static_cast<nsClipboardEvent*>(aEvent));
|
||||
case NS_SVG_EVENT:
|
||||
return NS_NewDOMSVGEvent(aDOMEvent, aOwner, aPresContext,
|
||||
aEvent);
|
||||
case NS_SVGZOOM_EVENT:
|
||||
return NS_NewDOMSVGZoomEvent(aDOMEvent, aOwner, aPresContext,
|
||||
static_cast<nsGUIEvent*>(aEvent));
|
||||
@ -807,11 +804,10 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
|
||||
return NS_NewDOMUIEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("event") ||
|
||||
aEventType.LowerCaseEqualsLiteral("events") ||
|
||||
aEventType.LowerCaseEqualsLiteral("htmlevents"))
|
||||
return NS_NewDOMEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("svgevent") ||
|
||||
aEventType.LowerCaseEqualsLiteral("htmlevents") ||
|
||||
aEventType.LowerCaseEqualsLiteral("svgevent") ||
|
||||
aEventType.LowerCaseEqualsLiteral("svgevents"))
|
||||
return NS_NewDOMSVGEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
return NS_NewDOMEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("svgzoomevent") ||
|
||||
aEventType.LowerCaseEqualsLiteral("svgzoomevents"))
|
||||
return NS_NewDOMSVGZoomEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
|
@ -33,7 +33,6 @@ CPPSRCS = \
|
||||
DOMSVGTransform.cpp \
|
||||
DOMSVGTransformList.cpp \
|
||||
nsDOMSVGZoomEvent.cpp \
|
||||
nsDOMSVGEvent.cpp \
|
||||
nsISVGPoint.cpp \
|
||||
nsSVGAngle.cpp \
|
||||
nsSVGBoolean.cpp \
|
||||
|
@ -526,7 +526,7 @@ SVGSVGElement::SetCurrentScaleTranslate(float s, float x, float y)
|
||||
bool scaling = (mPreviousScale != mCurrentScale);
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsGUIEvent event(true, scaling ? NS_SVG_ZOOM : NS_SVG_SCROLL, 0);
|
||||
event.eventStructType = scaling ? NS_SVGZOOM_EVENT : NS_SVG_EVENT;
|
||||
event.eventStructType = scaling ? NS_SVGZOOM_EVENT : NS_EVENT;
|
||||
presShell->HandleDOMEventWithTarget(this, &event, &status);
|
||||
InvalidateTransformNotifyFrame();
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
/* -*- Mode: C++; 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 "nsDOMClassInfoID.h"
|
||||
#include "nsDOMSVGEvent.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Implementation
|
||||
|
||||
nsDOMSVGEvent::nsDOMSVGEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
nsEvent* aEvent)
|
||||
: nsDOMEvent(aOwner, aPresContext,
|
||||
aEvent ? aEvent : new nsEvent(false, 0))
|
||||
{
|
||||
if (aEvent) {
|
||||
mEventIsInternal = false;
|
||||
}
|
||||
else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->eventStructType = NS_SVG_EVENT;
|
||||
mEvent->time = PR_Now();
|
||||
}
|
||||
|
||||
mEvent->mFlags.mCancelable = false;
|
||||
mEvent->mFlags.mBubbles =
|
||||
(mEvent->message != NS_SVG_LOAD && mEvent->message != NS_SVG_UNLOAD);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsISupports methods:
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsDOMSVGEvent, nsDOMEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(nsDOMSVGEvent, nsDOMEvent)
|
||||
|
||||
DOMCI_DATA(SVGEvent, nsDOMSVGEvent)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMSVGEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGEvent)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Exported creation functions:
|
||||
|
||||
nsresult
|
||||
NS_NewDOMSVGEvent(nsIDOMEvent** aInstancePtrResult,
|
||||
mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
nsEvent *aEvent)
|
||||
{
|
||||
nsDOMSVGEvent* it = new nsDOMSVGEvent(aOwner, aPresContext, aEvent);
|
||||
return CallQueryInterface(it, aInstancePtrResult);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C++; 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/. */
|
||||
|
||||
#ifndef __NS_SVGEVENT_H__
|
||||
#define __NS_SVGEVENT_H__
|
||||
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsIDOMSVGEvent.h"
|
||||
|
||||
class nsEvent;
|
||||
class nsPresContext;
|
||||
|
||||
class nsDOMSVGEvent : public nsDOMEvent,
|
||||
public nsIDOMSVGEvent
|
||||
{
|
||||
public:
|
||||
nsDOMSVGEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext* aPresContext, nsEvent* aEvent);
|
||||
|
||||
// nsISupports interface:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIDOMSVGEvent interface:
|
||||
NS_DECL_NSIDOMSVGEVENT
|
||||
|
||||
// Forward to base class
|
||||
NS_FORWARD_TO_NSDOMEVENT
|
||||
};
|
||||
|
||||
#endif // __NS_SVGEVENT_H__
|
@ -253,7 +253,6 @@
|
||||
#include "nsIDOMTimeEvent.h"
|
||||
#include "nsIDOMSVGDocument.h"
|
||||
#include "nsIDOMSVGElement.h"
|
||||
#include "nsIDOMSVGEvent.h"
|
||||
#include "nsIDOMSVGFilters.h"
|
||||
#include "nsIDOMSVGLength.h"
|
||||
#include "nsIDOMSVGNumber.h"
|
||||
@ -861,8 +860,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(SVGAnimatedString, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(SVGEvent, nsEventSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(SVGLength, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(SVGNumber, nsDOMGenericSH,
|
||||
@ -2373,11 +2370,6 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedString)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(SVGEvent, nsIDOMSVGEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGEvent)
|
||||
DOM_CLASSINFO_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(SVGLength, nsIDOMSVGLength)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLength)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
@ -144,7 +144,6 @@ DOMCI_CLASS(SVGAnimatedInteger)
|
||||
DOMCI_CLASS(SVGAnimatedNumber)
|
||||
DOMCI_CLASS(SVGAnimatedRect)
|
||||
DOMCI_CLASS(SVGAnimatedString)
|
||||
DOMCI_CLASS(SVGEvent)
|
||||
DOMCI_CLASS(SVGLength)
|
||||
DOMCI_CLASS(SVGNumber)
|
||||
DOMCI_CLASS(SVGRect)
|
||||
|
@ -25,7 +25,6 @@ XPIDLSRCS = \
|
||||
nsIDOMSVGAnimatedString.idl \
|
||||
nsIDOMSVGDocument.idl \
|
||||
nsIDOMSVGElement.idl \
|
||||
nsIDOMSVGEvent.idl \
|
||||
nsIDOMSVGFilters.idl \
|
||||
nsIDOMSVGLength.idl \
|
||||
nsIDOMSVGNumber.idl \
|
||||
|
@ -1,16 +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 "nsIDOMEvent.idl"
|
||||
|
||||
/**
|
||||
* For more information on this interface please see
|
||||
* http://www.w3.org/TR/SVG11/script.html#InterfaceSVGEvent
|
||||
*/
|
||||
|
||||
[scriptable, builtinclass, uuid(d6a2c07c-8a67-4a6e-adde-f668edb4a852)]
|
||||
interface nsIDOMSVGEvent : nsIDOMEvent
|
||||
{
|
||||
};
|
@ -19,7 +19,6 @@ NS_IMETHODIMP
|
||||
nsHtml5SVGLoadDispatcher::Run()
|
||||
{
|
||||
nsEvent event(true, NS_SVG_LOAD);
|
||||
event.eventStructType = NS_SVG_EVENT;
|
||||
event.mFlags.mBubbles = false;
|
||||
// Do we care about forcing presshell creation if it hasn't happened yet?
|
||||
// That is, should this code flush or something? Does it really matter?
|
||||
|
@ -90,7 +90,6 @@ enum nsEventStructType {
|
||||
NS_CLIPBOARD_EVENT, // nsClipboardEvent
|
||||
|
||||
// SVG events
|
||||
NS_SVG_EVENT, // nsEvent or nsGUIEvent
|
||||
NS_SVGZOOM_EVENT, // nsGUIEvent
|
||||
NS_SMIL_TIME_EVENT, // nsUIEvent
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user