зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1455052 part 10. Remove various unused nsIDOMEvent bits. r=masayuki
MozReview-Commit-ID: Fzckal7RGUv
This commit is contained in:
Родитель
a3ea17eac1
Коммит
a81bb92f43
|
@ -4439,8 +4439,7 @@ nsresult GetEventAndTarget(nsIDocument* aDoc, nsISupports* aTarget,
|
|||
event->InitEvent(aEventName, aCanBubble, aCancelable);
|
||||
event->SetTrusted(aTrusted);
|
||||
|
||||
nsresult rv = event->SetTarget(target);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
event->SetTarget(target);
|
||||
|
||||
event.forget(aEvent);
|
||||
target.forget(aTargetOut);
|
||||
|
|
|
@ -223,16 +223,14 @@ Event::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
return EventBinding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
// nsIDOMEventInterface
|
||||
NS_IMETHODIMP
|
||||
Event::GetType(nsAString& aType)
|
||||
void
|
||||
Event::GetType(nsAString& aType) const
|
||||
{
|
||||
if (!mIsMainThreadEvent) {
|
||||
aType = mEvent->mSpecifiedEventTypeString;
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
GetWidgetEventType(mEvent, aType);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
EventTarget*
|
||||
|
@ -311,7 +309,7 @@ Event::GetComposedTarget() const
|
|||
static_cast<EventTarget*>(content->GetComposedDoc());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
void
|
||||
Event::SetTrusted(bool aTrusted)
|
||||
{
|
||||
mEvent->mFlags.mIsTrusted = aTrusted;
|
||||
|
@ -382,69 +380,30 @@ Event::EventPhase() const
|
|||
return EventBinding::NONE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::GetEventPhase(uint16_t* aEventPhase)
|
||||
{
|
||||
*aEventPhase = EventPhase();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::GetBubbles(bool* aBubbles)
|
||||
{
|
||||
*aBubbles = Bubbles();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::GetCancelable(bool* aCancelable)
|
||||
{
|
||||
*aCancelable = Cancelable();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::GetTimeStamp(uint64_t* aTimeStamp)
|
||||
{
|
||||
*aTimeStamp = mEvent->mTime;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
Event::StopPropagation()
|
||||
{
|
||||
mEvent->StopPropagation();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
Event::StopImmediatePropagation()
|
||||
{
|
||||
mEvent->StopImmediatePropagation();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
Event::StopCrossProcessForwarding()
|
||||
{
|
||||
mEvent->StopCrossProcessForwarding();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::GetIsTrusted(bool* aIsTrusted)
|
||||
{
|
||||
*aIsTrusted = IsTrusted();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
Event::PreventDefault()
|
||||
{
|
||||
// This method is called only from C++ code which must handle default action
|
||||
// of this event. So, pass true always.
|
||||
PreventDefaultInternal(true);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -576,36 +535,33 @@ Event::InitEvent(const nsAString& aEventTypeArg,
|
|||
mEvent->mOriginalTarget = nullptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
Event::DuplicatePrivateData()
|
||||
{
|
||||
NS_ASSERTION(mEvent, "No WidgetEvent for Event duplication!");
|
||||
if (mEventIsInternal) {
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
mEvent = mEvent->Duplicate();
|
||||
mPresContext = nullptr;
|
||||
mEventIsInternal = true;
|
||||
mPrivateDataDuplicated = true;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
Event::SetTarget(EventTarget* aTarget)
|
||||
{
|
||||
mEvent->mTarget = aTarget;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
bool
|
||||
Event::IsDispatchStopped()
|
||||
{
|
||||
return mEvent->PropagationStopped();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(WidgetEvent*)
|
||||
WidgetEvent*
|
||||
Event::WidgetEventPtr()
|
||||
{
|
||||
return mEvent;
|
||||
|
@ -1119,18 +1075,7 @@ Event::TimeStamp()
|
|||
workerPrivate->GetRandomTimelineSeed());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::GetDefaultPrevented(bool* aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
// This method must be called by only event handlers implemented by C++.
|
||||
// Then, the handlers must handle default action. So, this method don't need
|
||||
// to check if preventDefault() has been called by content or chrome.
|
||||
*aReturn = DefaultPrevented();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
void
|
||||
Event::Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType)
|
||||
{
|
||||
if (aSerializeInterfaceType) {
|
||||
|
@ -1149,7 +1094,7 @@ Event::Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType)
|
|||
// No timestamp serialization for now!
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
bool
|
||||
Event::Deserialize(const IPC::Message* aMsg, PickleIterator* aIter)
|
||||
{
|
||||
nsString type;
|
||||
|
@ -1174,7 +1119,7 @@ Event::Deserialize(const IPC::Message* aMsg, PickleIterator* aIter)
|
|||
return true;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
void
|
||||
Event::SetOwner(EventTarget* aOwner)
|
||||
{
|
||||
mOwner = nullptr;
|
||||
|
@ -1231,23 +1176,6 @@ Event::GetWidgetEventType(WidgetEvent* aEvent, nsAString& aType)
|
|||
aType.Truncate();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::GetCancelBubble(bool* aCancelBubble)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCancelBubble);
|
||||
*aCancelBubble = CancelBubble();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Event::SetCancelBubble(bool aCancelBubble)
|
||||
{
|
||||
if (aCancelBubble) {
|
||||
mEvent->StopPropagation();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
|
||||
class nsIContent;
|
||||
class nsPresContext;
|
||||
class PickleIterator;
|
||||
|
||||
namespace IPC {
|
||||
class Message;
|
||||
} // namespace IPC
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -146,6 +151,19 @@ public:
|
|||
// nsIDOMEvent Interface
|
||||
NS_DECL_NSIDOMEVENT
|
||||
|
||||
void InitEvent(const nsAString& aEventTypeArg,
|
||||
bool aCanBubbleArg,
|
||||
bool aCancelableArg);
|
||||
void SetTarget(EventTarget* aTarget);
|
||||
virtual void DuplicatePrivateData();
|
||||
bool IsDispatchStopped();
|
||||
WidgetEvent* WidgetEventPtr();
|
||||
virtual void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType);
|
||||
virtual bool Deserialize(const IPC::Message* aMsg, PickleIterator* aIter);
|
||||
void SetOwner(EventTarget* aOwner);
|
||||
void StopCrossProcessForwarding();
|
||||
void SetTrusted(bool aTrusted);
|
||||
|
||||
void InitPresContextData(nsPresContext* aPresContext);
|
||||
|
||||
// Returns true if the event should be trusted.
|
||||
|
@ -184,8 +202,7 @@ public:
|
|||
const EventInit& aParam,
|
||||
ErrorResult& aRv);
|
||||
|
||||
// Implemented as xpidl method
|
||||
// void GetType(nsString& aRetval) {}
|
||||
void GetType(nsAString& aType) const;
|
||||
|
||||
EventTarget* GetTarget() const;
|
||||
static bool IsSrcElementEnabled(JSContext* /* unused */, JSObject* /* unused */);
|
||||
|
@ -195,11 +212,9 @@ public:
|
|||
|
||||
uint16_t EventPhase() const;
|
||||
|
||||
// xpidl implementation
|
||||
// void StopPropagation();
|
||||
void StopPropagation();
|
||||
|
||||
// xpidl implementation
|
||||
// void StopImmediatePropagation();
|
||||
void StopImmediatePropagation();
|
||||
|
||||
bool Bubbles() const
|
||||
{
|
||||
|
@ -220,9 +235,15 @@ public:
|
|||
{
|
||||
return mEvent->PropagationStopped();
|
||||
}
|
||||
void SetCancelBubble(bool aCancelBubble)
|
||||
{
|
||||
if (aCancelBubble) {
|
||||
mEvent->StopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
// xpidl implementation
|
||||
// void PreventDefault();
|
||||
// For C++ consumers only!
|
||||
void PreventDefault();
|
||||
|
||||
// You MUST NOT call PreventDefault(JSContext*, CallerType) from C++ code. A
|
||||
// call of this method always sets Event.defaultPrevented true for web
|
||||
|
|
|
@ -89,7 +89,7 @@ NotifyPaintEvent::PaintRequests(SystemCallerGuarantee)
|
|||
return requests.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
void
|
||||
NotifyPaintEvent::Serialize(IPC::Message* aMsg,
|
||||
bool aSerializeInterfaceType)
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ NotifyPaintEvent::Serialize(IPC::Message* aMsg,
|
|||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
bool
|
||||
NotifyPaintEvent::Deserialize(const IPC::Message* aMsg, PickleIterator* aIter)
|
||||
{
|
||||
NS_ENSURE_TRUE(Event::Deserialize(aMsg, aIter), false);
|
||||
|
|
|
@ -34,8 +34,8 @@ public:
|
|||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(NotifyPaintEvent, Event)
|
||||
|
||||
NS_IMETHOD_(void) Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
|
||||
NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
|
||||
void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
|
||||
bool Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
|
||||
|
||||
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ ScrollAreaEvent::InitScrollAreaEvent(const nsAString& aEventType,
|
|||
mClientArea->SetRect(aX, aY, aWidth, aHeight);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
void
|
||||
ScrollAreaEvent::Serialize(IPC::Message* aMsg,
|
||||
bool aSerializeInterfaceType)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ ScrollAreaEvent::Serialize(IPC::Message* aMsg,
|
|||
IPC::WriteParam(aMsg, Height());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
bool
|
||||
ScrollAreaEvent::Deserialize(const IPC::Message* aMsg, PickleIterator* aIter)
|
||||
{
|
||||
NS_ENSURE_TRUE(Event::Deserialize(aMsg, aIter), false);
|
||||
|
|
|
@ -26,8 +26,8 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ScrollAreaEvent, UIEvent)
|
||||
|
||||
NS_IMETHOD_(void) Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
|
||||
NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
|
||||
void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
|
||||
bool Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
|
||||
|
||||
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
|
||||
{
|
||||
|
|
|
@ -264,7 +264,7 @@ UIEvent::GetLayerPoint() const
|
|||
nsPresContext::AppUnitsToIntCSSPixels(pt.y));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
UIEvent::DuplicatePrivateData()
|
||||
{
|
||||
mClientPoint =
|
||||
|
@ -277,16 +277,15 @@ UIEvent::DuplicatePrivateData()
|
|||
// GetScreenPoint converts mEvent->mRefPoint to right coordinates.
|
||||
CSSIntPoint screenPoint =
|
||||
Event::GetScreenCoords(mPresContext, mEvent, mEvent->mRefPoint);
|
||||
nsresult rv = Event::DuplicatePrivateData();
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
CSSToLayoutDeviceScale scale = mPresContext ? mPresContext->CSSToDevPixelScale()
|
||||
: CSSToLayoutDeviceScale(1);
|
||||
mEvent->mRefPoint = RoundedToInt(screenPoint * scale);
|
||||
}
|
||||
return rv;
|
||||
|
||||
Event::DuplicatePrivateData();
|
||||
|
||||
CSSToLayoutDeviceScale scale = mPresContext ? mPresContext->CSSToDevPixelScale()
|
||||
: CSSToLayoutDeviceScale(1);
|
||||
mEvent->mRefPoint = RoundedToInt(screenPoint * scale);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
void
|
||||
UIEvent::Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType)
|
||||
{
|
||||
if (aSerializeInterfaceType) {
|
||||
|
@ -298,7 +297,7 @@ UIEvent::Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType)
|
|||
IPC::WriteParam(aMsg, Detail());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
bool
|
||||
UIEvent::Deserialize(const IPC::Message* aMsg, PickleIterator* aIter)
|
||||
{
|
||||
NS_ENSURE_TRUE(Event::Deserialize(aMsg, aIter), false);
|
||||
|
|
|
@ -29,10 +29,9 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(UIEvent, Event)
|
||||
|
||||
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;
|
||||
|
||||
void DuplicatePrivateData() override;
|
||||
void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
|
||||
bool Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
|
||||
|
||||
static already_AddRefed<UIEvent> Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
|
|
|
@ -521,8 +521,8 @@ IndexedDatabaseManager::CommonPostHandleEvent(EventChainPostVisitor& aVisitor,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsString type;
|
||||
MOZ_ALWAYS_SUCCEEDS(aVisitor.mDOMEvent->GetType(type));
|
||||
nsAutoString type;
|
||||
aVisitor.mDOMEvent->GetType(type);
|
||||
|
||||
MOZ_ASSERT(nsDependentString(kErrorEventType).EqualsLiteral("error"));
|
||||
if (!type.EqualsLiteral("error")) {
|
||||
|
|
|
@ -265,10 +265,10 @@ public:
|
|||
{
|
||||
MOZ_ASSERT(aDefault);
|
||||
|
||||
nsString eventType;
|
||||
nsAutoString eventType;
|
||||
|
||||
if (aEvent) {
|
||||
MOZ_ALWAYS_SUCCEEDS(aEvent->GetType(eventType));
|
||||
aEvent->GetType(eventType);
|
||||
} else {
|
||||
eventType = nsDependentString(aDefault);
|
||||
}
|
||||
|
|
|
@ -19,10 +19,6 @@
|
|||
#include "mozilla/EventForwards.h"
|
||||
class nsPresContext;
|
||||
class nsInvalidateRequestList;
|
||||
namespace IPC {
|
||||
class Message;
|
||||
}
|
||||
class PickleIterator;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class Event;
|
||||
|
@ -65,124 +61,10 @@ interface nsIDOMEvent : nsISupports
|
|||
*/
|
||||
const unsigned short BUBBLING_PHASE = 3;
|
||||
|
||||
/**
|
||||
* The name of the event (case-insensitive). The name must be an XML
|
||||
* name.
|
||||
*/
|
||||
readonly attribute DOMString type;
|
||||
|
||||
/**
|
||||
* Used to indicate which phase of event flow is currently being
|
||||
* evaluated.
|
||||
*/
|
||||
readonly attribute unsigned short eventPhase;
|
||||
|
||||
/**
|
||||
* Used to indicate whether or not an event is a bubbling event. If the
|
||||
* event can bubble the value is true, else the value is false.
|
||||
*/
|
||||
readonly attribute boolean bubbles;
|
||||
|
||||
/**
|
||||
* Used to indicate whether or not an event can have its default action
|
||||
* prevented. If the default action can be prevented the value is true,
|
||||
* else the value is false.
|
||||
*/
|
||||
readonly attribute boolean cancelable;
|
||||
|
||||
/**
|
||||
* Used to specify the time (in milliseconds relative to the epoch) at
|
||||
* which the event was created. Due to the fact that some systems may
|
||||
* not provide this information the value of timeStamp may be not
|
||||
* available for all events. When not available, a value of 0 will be
|
||||
* returned. Examples of epoch time are the time of the system start or
|
||||
* 0:0:0 UTC 1st January 1970.
|
||||
*/
|
||||
readonly attribute DOMTimeStamp timeStamp;
|
||||
|
||||
/**
|
||||
* The stopPropagation method is used prevent further propagation of an
|
||||
* event during event flow. If this method is called by any
|
||||
* EventListener the event will cease propagating through the tree. The
|
||||
* event will complete dispatch to all listeners on the current
|
||||
* EventTarget before event flow stops. This method may be used during
|
||||
* any stage of event flow.
|
||||
*/
|
||||
void stopPropagation();
|
||||
|
||||
/**
|
||||
* If an event is cancelable, the preventDefault method is used to
|
||||
* signify that the event is to be canceled, meaning any default action
|
||||
* normally taken by the implementation as a result of the event will
|
||||
* not occur. If, during any stage of event flow, the preventDefault
|
||||
* method is called the event is canceled. Any default action associated
|
||||
* with the event will not occur. Calling this method for a
|
||||
* non-cancelable event has no effect. Once preventDefault has been
|
||||
* called it will remain in effect throughout the remainder of the
|
||||
* event's propagation. This method may be used during any stage of
|
||||
* event flow.
|
||||
*/
|
||||
void preventDefault();
|
||||
|
||||
/**
|
||||
* The initEvent method is used to initialize the value of an Event
|
||||
* created through the DocumentEvent interface. This method may only be
|
||||
* called before the Event has been dispatched via the dispatchEvent
|
||||
* method, though it may be called multiple times during that phase if
|
||||
* necessary. If called multiple times the final invocation takes
|
||||
* precedence. If called from a subclass of Event interface only the
|
||||
* values specified in the initEvent method are modified, all other
|
||||
* attributes are left unchanged.
|
||||
*
|
||||
* @param eventTypeArg Specifies the event type. This type may be
|
||||
* any event type currently defined in this
|
||||
* specification or a new event type.. The string
|
||||
* must be an XML name.
|
||||
* Any new event type must not begin with any
|
||||
* upper, lower, or mixed case version of the
|
||||
* string "DOM". This prefix is reserved for
|
||||
* future DOM event sets. It is also strongly
|
||||
* recommended that third parties adding their
|
||||
* own events use their own prefix to avoid
|
||||
* confusion and lessen the probability of
|
||||
* conflicts with other new events.
|
||||
* @param canBubbleArg Specifies whether or not the event can bubble.
|
||||
* @param cancelableArg Specifies whether or not the event's default
|
||||
* action can be prevented.
|
||||
*/
|
||||
[notxpcom,nostdcall]
|
||||
void initEvent(in DOMString eventTypeArg,
|
||||
in boolean canBubbleArg,
|
||||
in boolean cancelableArg);
|
||||
|
||||
/**
|
||||
* Used to indicate whether preventDefault() has been called for this event.
|
||||
*/
|
||||
readonly attribute boolean defaultPrevented;
|
||||
|
||||
/**
|
||||
* Prevents other event listeners from being triggered and,
|
||||
* unlike Event.stopPropagation() its effect is immediate.
|
||||
*/
|
||||
void stopImmediatePropagation();
|
||||
|
||||
const long ALT_MASK = 0x00000001;
|
||||
const long CONTROL_MASK = 0x00000002;
|
||||
const long SHIFT_MASK = 0x00000004;
|
||||
const long META_MASK = 0x00000008;
|
||||
|
||||
readonly attribute boolean isTrusted;
|
||||
attribute boolean cancelBubble;
|
||||
|
||||
[noscript] void duplicatePrivateData();
|
||||
[noscript] void setTarget(in EventTarget aTarget);
|
||||
[notxpcom] boolean IsDispatchStopped();
|
||||
[notxpcom] WidgetEvent WidgetEventPtr();
|
||||
[noscript,notxpcom] void SetTrusted(in boolean aTrusted);
|
||||
[notxpcom] void Serialize(in IPCMessagePtr aMsg,
|
||||
in boolean aSerializeInterfaceType);
|
||||
[notxpcom] boolean Deserialize(in ConstIPCMessagePtr aMsg, in PickleIterator aIter);
|
||||
[noscript,notxpcom] void SetOwner(in EventTargetPtr aOwner);
|
||||
[notxpcom] DOMEventPtr InternalDOMEvent();
|
||||
[noscript] void stopCrossProcessForwarding();
|
||||
};
|
||||
|
|
|
@ -987,11 +987,8 @@ Proxy::HandleEvent(Event* aEvent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsString type;
|
||||
if (NS_FAILED(aEvent->GetType(type))) {
|
||||
NS_WARNING("Failed to get event type!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsAutoString type;
|
||||
aEvent->GetType(type);
|
||||
|
||||
bool isUploadTarget = mXHR != aEvent->GetTarget();
|
||||
ProgressEvent* progressEvent = aEvent->AsProgressEvent();
|
||||
|
@ -1087,13 +1084,9 @@ LoadStartDetectionRunnable::HandleEvent(Event* aEvent)
|
|||
|
||||
#ifdef DEBUG
|
||||
{
|
||||
nsString type;
|
||||
if (NS_SUCCEEDED(aEvent->GetType(type))) {
|
||||
MOZ_ASSERT(type == mEventType);
|
||||
}
|
||||
else {
|
||||
NS_WARNING("Failed to get event type!");
|
||||
}
|
||||
nsAutoString type;
|
||||
aEvent->GetType(type);
|
||||
MOZ_ASSERT(type == mEventType);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -911,7 +911,7 @@ EditorEventListener::Drop(DragEvent* aDragEvent)
|
|||
// since someone else handling it might be unintentional and the
|
||||
// user could probably re-drag to be not over the disabled/readonly
|
||||
// editfields if that is what is desired.
|
||||
return aDragEvent->StopPropagation();
|
||||
aDragEvent->StopPropagation();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче