mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Bug 1446527 part 6. Remove nsIDOMUIEvent. r=qdot
MozReview-Commit-ID: 7GbifGJQUtQ
This commit is contained in:
parent
00bd4c9912
commit
5b0b5358d6
@ -14,7 +14,6 @@
|
||||
|
||||
// Interfaces needed to be included
|
||||
#include "nsCopySupport.h"
|
||||
#include "nsIDOMUIEvent.h"
|
||||
#include "nsISelection.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIDOMNode.h"
|
||||
|
@ -27,7 +27,6 @@ public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CompositionEvent, UIEvent)
|
||||
NS_FORWARD_TO_UIEVENT
|
||||
|
||||
static already_AddRefed<CompositionEvent> Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
|
@ -39,6 +39,7 @@ class ExtendableEvent;
|
||||
class KeyboardEvent;
|
||||
class MouseEvent;
|
||||
class TimeEvent;
|
||||
class UIEvent;
|
||||
class WantsPopupControlCheck;
|
||||
class XULCommandEvent;
|
||||
#define GENERATED_EVENT(EventClass_) class EventClass_;
|
||||
@ -147,6 +148,12 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// UIEvent has a non-autogeneratable initUIEvent.
|
||||
virtual UIEvent* AsUIEvent()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// nsIDOMEvent Interface
|
||||
NS_DECL_NSIDOMEVENT
|
||||
|
||||
|
@ -23,10 +23,6 @@ public:
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(InputEvent, UIEvent)
|
||||
|
||||
// Forward to base class
|
||||
NS_FORWARD_TO_UIEVENT
|
||||
|
||||
|
||||
static already_AddRefed<InputEvent> Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const InputEventInit& aParam,
|
||||
|
@ -25,7 +25,6 @@ public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ScrollAreaEvent, UIEvent)
|
||||
NS_FORWARD_NSIDOMUIEVENT(UIEvent::)
|
||||
|
||||
NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION
|
||||
NS_IMETHOD DuplicatePrivateData() override
|
||||
|
@ -101,7 +101,6 @@ NS_IMPL_ADDREF_INHERITED(UIEvent, Event)
|
||||
NS_IMPL_RELEASE_INHERITED(UIEvent, Event)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UIEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMUIEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(Event)
|
||||
|
||||
static nsIntPoint
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "mozilla/dom/UIEventBinding.h"
|
||||
#include "nsDeviceContext.h"
|
||||
#include "nsIDOMUIEvent.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsPresContext.h"
|
||||
|
||||
@ -20,8 +19,7 @@ class nsINode;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class UIEvent : public Event,
|
||||
public nsIDOMUIEvent
|
||||
class UIEvent : public Event
|
||||
{
|
||||
public:
|
||||
UIEvent(EventTarget* aOwner,
|
||||
@ -31,12 +29,6 @@ public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(UIEvent, Event)
|
||||
|
||||
// nsIDOMUIEvent Interface
|
||||
NS_DECL_NSIDOMUIEVENT
|
||||
|
||||
// Forward to Event
|
||||
NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION
|
||||
using Event::GetCurrentTarget; // Because the forwarding thing shadows it.
|
||||
NS_IMETHOD DuplicatePrivateData() override;
|
||||
NS_IMETHOD_(void) Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
|
||||
NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
|
||||
@ -54,6 +46,11 @@ public:
|
||||
return UIEventBinding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
UIEvent* AsUIEvent() override
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
void InitUIEvent(const nsAString& typeArg,
|
||||
bool canBubbleArg,
|
||||
bool cancelableArg,
|
||||
@ -121,28 +118,6 @@ protected:
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#define NS_FORWARD_TO_UIEVENT \
|
||||
NS_FORWARD_NSIDOMUIEVENT(UIEvent::) \
|
||||
NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION \
|
||||
using Event::GetCurrentTarget; /* Forwarding shadows */ \
|
||||
using UIEvent::GetRangeParent; \
|
||||
using UIEvent::RangeOffset; \
|
||||
NS_IMETHOD DuplicatePrivateData() override \
|
||||
{ \
|
||||
return UIEvent::DuplicatePrivateData(); \
|
||||
} \
|
||||
NS_IMETHOD_(void) Serialize(IPC::Message* aMsg, \
|
||||
bool aSerializeInterfaceType) \
|
||||
override \
|
||||
{ \
|
||||
UIEvent::Serialize(aMsg, aSerializeInterfaceType); \
|
||||
} \
|
||||
NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg, \
|
||||
PickleIterator* aIter) override \
|
||||
{ \
|
||||
return UIEvent::Deserialize(aMsg, aIter); \
|
||||
}
|
||||
|
||||
already_AddRefed<mozilla::dom::UIEvent>
|
||||
NS_NewDOMUIEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
|
@ -14,7 +14,6 @@ XPIDL_SOURCES += [
|
||||
'nsIDOMEventTarget.idl',
|
||||
'nsIDOMNotifyPaintEvent.idl',
|
||||
'nsIDOMNSEvent.idl',
|
||||
'nsIDOMUIEvent.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'dom_events'
|
||||
|
@ -1,33 +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 "nsISupports.idl"
|
||||
#include "nsIDOMWindow.idl"
|
||||
|
||||
interface mozIDOMWindow;
|
||||
interface mozIDOMWindowProxy;
|
||||
|
||||
/**
|
||||
* The nsIDOMUIEvent interface is the datatype for all UI events in the
|
||||
* Document Object Model.
|
||||
*
|
||||
* For more information on this interface please see
|
||||
* http://www.w3.org/TR/DOM-Level-2-Events/
|
||||
*/
|
||||
|
||||
%{C++
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class Event;
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
[ptr] native EventPtr(mozilla::dom::Event);
|
||||
|
||||
[builtinclass, uuid(85ae52eb-37fa-4fd9-a2e6-c7d0f2a521b3)]
|
||||
interface nsIDOMUIEvent : nsISupports
|
||||
{
|
||||
};
|
@ -23,7 +23,6 @@
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMUIEvent.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDragService.h"
|
||||
#include "nsIDragSession.h"
|
||||
|
@ -635,9 +635,8 @@ nsXULPopupManager::InitTriggerEvent(nsIDOMEvent* aEvent, nsIContent* aPopup,
|
||||
|
||||
mCachedModifiers = 0;
|
||||
|
||||
nsCOMPtr<nsIDOMUIEvent> domUiEvent = do_QueryInterface(aEvent);
|
||||
if (domUiEvent) {
|
||||
auto uiEvent = static_cast<UIEvent*>(domUiEvent.get());
|
||||
UIEvent* uiEvent = aEvent ? aEvent->InternalDOMEvent()->AsUIEvent() : nullptr;
|
||||
if (uiEvent) {
|
||||
mRangeParent = uiEvent->GetRangeParent();
|
||||
mRangeOffset = uiEvent->RangeOffset();
|
||||
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIDOMScreen.h"
|
||||
#include "nsIDOMSerializer.h"
|
||||
#include "nsIDOMUIEvent.h"
|
||||
#include "nsIDOMXMLDocument.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIListBoxObject.h"
|
||||
@ -83,7 +82,6 @@
|
||||
#include "mozilla/dom/SVGElementBinding.h"
|
||||
#include "mozilla/dom/TimeEventBinding.h"
|
||||
#include "mozilla/dom/TreeBoxObjectBinding.h"
|
||||
#include "mozilla/dom/UIEventBinding.h"
|
||||
#include "mozilla/dom/XMLDocumentBinding.h"
|
||||
#include "mozilla/dom/XMLSerializerBinding.h"
|
||||
#include "mozilla/dom/XULDocumentBinding.h"
|
||||
@ -171,7 +169,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM(Screen),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
|
||||
DEFINE_SHIM(UIEvent),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIWebBrowserPersistable, FrameLoader),
|
||||
DEFINE_SHIM(XMLDocument),
|
||||
DEFINE_SHIM(XULElement),
|
||||
|
Loading…
x
Reference in New Issue
Block a user