Skip to content

Commit

Permalink
Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEv…
Browse files Browse the repository at this point in the history
…ent r=smaug

MozReview-Commit-ID: Hm8Owq17KXn
  • Loading branch information
aidin36 committed Feb 12, 2016
1 parent 871b047 commit 75a29ac
Show file tree
Hide file tree
Showing 38 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion dom/base/PostMessageEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ PostMessageEvent::Run()
presContext = shell->GetPresContext();

event->SetTrusted(mTrustedCaller);
WidgetEvent* internalEvent = event->GetInternalNSEvent();
WidgetEvent* internalEvent = event->WidgetEventPtr();

nsEventStatus status = nsEventStatus_eIgnore;
EventDispatcher::Dispatch(window,
Expand Down
6 changes: 3 additions & 3 deletions dom/base/TextInputProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ TextInputProcessor::PrepareKeyboardEventForComposition(

aKeyboardEvent =
aOptionalArgc && aDOMKeyEvent ?
aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent() : nullptr;
aDOMKeyEvent->AsEvent()->WidgetEventPtr()->AsKeyboardEvent() : nullptr;
if (!aKeyboardEvent || aOptionalArgc < 2) {
aKeyFlags = 0;
}
Expand Down Expand Up @@ -769,7 +769,7 @@ TextInputProcessor::Keydown(nsIDOMKeyEvent* aDOMKeyEvent,
return NS_ERROR_INVALID_ARG;
}
WidgetKeyboardEvent* originalKeyEvent =
aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent();
aDOMKeyEvent->AsEvent()->WidgetEventPtr()->AsKeyboardEvent();
if (NS_WARN_IF(!originalKeyEvent)) {
return NS_ERROR_INVALID_ARG;
}
Expand Down Expand Up @@ -875,7 +875,7 @@ TextInputProcessor::Keyup(nsIDOMKeyEvent* aDOMKeyEvent,
return NS_ERROR_INVALID_ARG;
}
WidgetKeyboardEvent* originalKeyEvent =
aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent();
aDOMKeyEvent->AsEvent()->WidgetEventPtr()->AsKeyboardEvent();
if (NS_WARN_IF(!originalKeyEvent)) {
return NS_ERROR_INVALID_ARG;
}
Expand Down
4 changes: 2 additions & 2 deletions dom/base/nsContentUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3783,7 +3783,7 @@ nsContentUtils::DispatchEvent(nsIDocument* aDoc, nsISupports* aTarget,
aCancelable, aTrusted, getter_AddRefs(event),
getter_AddRefs(target));
NS_ENSURE_SUCCESS(rv, rv);
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = aOnlyChromeDispatch;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = aOnlyChromeDispatch;

bool dummy;
return target->DispatchEvent(event, aDefaultAction ? aDefaultAction : &dummy);
Expand Down Expand Up @@ -4947,7 +4947,7 @@ nsContentUtils::GetAccelKeyCandidates(nsIDOMKeyEvent* aDOMKeyEvent,
return;

WidgetKeyboardEvent* nativeKeyEvent =
aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent();
aDOMKeyEvent->AsEvent()->WidgetEventPtr()->AsKeyboardEvent();
if (nativeKeyEvent) {
NS_ASSERTION(nativeKeyEvent->mClass == eKeyboardEventClass,
"wrong type of native event");
Expand Down
4 changes: 2 additions & 2 deletions dom/base/nsDOMWindowUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,7 @@ nsDOMWindowUtils::DispatchDOMEventViaPresShell(nsIDOMNode* aTarget,
{
NS_ENSURE_STATE(aEvent);
aEvent->SetTrusted(aTrusted);
WidgetEvent* internalEvent = aEvent->GetInternalNSEvent();
WidgetEvent* internalEvent = aEvent->WidgetEventPtr();
NS_ENSURE_STATE(internalEvent);
nsCOMPtr<nsIContent> content = do_QueryInterface(aTarget);
NS_ENSURE_STATE(content);
Expand Down Expand Up @@ -3456,7 +3456,7 @@ nsDOMWindowUtils::DispatchEventToChromeOnly(nsIDOMEventTarget* aTarget,
{
*aRetVal = false;
NS_ENSURE_STATE(aTarget && aEvent);
aEvent->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
aEvent->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
aTarget->DispatchEvent(aEvent, aRetVal);
return NS_OK;
}
Expand Down
6 changes: 3 additions & 3 deletions dom/base/nsDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5095,7 +5095,7 @@ nsDocument::DispatchContentLoadedEvents()
// the ancestor document if we used the normal event
// dispatching code.

WidgetEvent* innerEvent = event->GetInternalNSEvent();
WidgetEvent* innerEvent = event->WidgetEventPtr();
if (innerEvent) {
nsEventStatus status = nsEventStatus_eIgnore;

Expand Down Expand Up @@ -8113,7 +8113,7 @@ nsIDocument::CreateEvent(const nsAString& aEventType, ErrorResult& rv) const
rv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
WidgetEvent* e = ev->GetInternalNSEvent();
WidgetEvent* e = ev->WidgetEventPtr();
e->mFlags.mBubbles = false;
e->mFlags.mCancelable = false;
return ev.forget();
Expand Down Expand Up @@ -9200,7 +9200,7 @@ DispatchCustomEventWithFlush(nsINode* aTarget, const nsAString& aEventType,
event->InitEvent(aEventType, aBubbles, false);
event->SetTrusted(true);
if (aOnlyChromeDispatch) {
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
}
if (nsIPresShell* shell = aTarget->OwnerDoc()->GetShell()) {
shell->GetPresContext()->
Expand Down
8 changes: 4 additions & 4 deletions dom/base/nsGlobalWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5701,7 +5701,7 @@ nsGlobalWindow::DispatchResizeEvent(const CSSIntSize& aSize)
}

domEvent->SetTrusted(true);
domEvent->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
domEvent->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;

nsCOMPtr<EventTarget> target = do_QueryInterface(GetOuterWindow());
domEvent->SetTarget(target);
Expand Down Expand Up @@ -8496,7 +8496,7 @@ nsGlobalWindow::LeaveModalState()
RefPtr<Event> event = NS_NewDOMEvent(inner, nullptr, nullptr);
event->InitEvent(NS_LITERAL_STRING("endmodalstate"), true, false);
event->SetTrusted(true);
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
bool dummy;
topWin->DispatchEvent(event, &dummy);
}
Expand Down Expand Up @@ -11110,7 +11110,7 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic,
newEvent->SetTrusted(true);

if (fireMozStorageChanged) {
WidgetEvent* internalEvent = newEvent->GetInternalNSEvent();
WidgetEvent* internalEvent = newEvent->WidgetEventPtr();
internalEvent->mFlags.mOnlyChromeDispatch = true;
}

Expand Down Expand Up @@ -13243,7 +13243,7 @@ nsGlobalWindow::BeginWindowMove(Event& aMouseDownEvent, Element* aPanel,
}

WidgetMouseEvent* mouseEvent =
aMouseDownEvent.GetInternalNSEvent()->AsMouseEvent();
aMouseDownEvent.WidgetEventPtr()->AsMouseEvent();
if (!mouseEvent || mouseEvent->mClass != eMouseEventClass) {
aError.Throw(NS_ERROR_FAILURE);
return;
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsObjectLoadingContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ nsPluginCrashedEvent::Run()
PluginCrashedEvent::Constructor(doc, NS_LITERAL_STRING("PluginCrashed"), init);

event->SetTrusted(true);
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;

EventDispatcher::DispatchDOMEvent(mContent, nullptr, event, nullptr, nullptr);
return NS_OK;
Expand Down
2 changes: 1 addition & 1 deletion dom/events/AsyncEventDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ AsyncEventDispatcher::Run()
}
if (mOnlyChromeDispatch) {
MOZ_ASSERT(event->IsTrusted());
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
}
bool dummy;
mTarget->DispatchEvent(event, &dummy);
Expand Down
2 changes: 1 addition & 1 deletion dom/events/Event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ Event::IsDispatchStopped()
}

NS_IMETHODIMP_(WidgetEvent*)
Event::GetInternalNSEvent()
Event::WidgetEventPtr()
{
return mEvent;
}
Expand Down
2 changes: 1 addition & 1 deletion dom/events/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class MOZ_STACK_CLASS WantsPopupControlCheck
NS_IMETHOD GetIsTrusted(bool* aIsTrusted) override { return _to GetIsTrusted(aIsTrusted); } \
NS_IMETHOD SetTarget(nsIDOMEventTarget* aTarget) override { return _to SetTarget(aTarget); } \
NS_IMETHOD_(bool) IsDispatchStopped(void) override { return _to IsDispatchStopped(); } \
NS_IMETHOD_(WidgetEvent*) GetInternalNSEvent(void) override { return _to GetInternalNSEvent(); } \
NS_IMETHOD_(WidgetEvent*) WidgetEventPtr(void) override { return _to WidgetEventPtr(); } \
NS_IMETHOD_(void) SetTrusted(bool aTrusted) override { _to SetTrusted(aTrusted); } \
NS_IMETHOD_(void) SetOwner(EventTarget* aOwner) override { _to SetOwner(aOwner); } \
NS_IMETHOD_(Event*) InternalDOMEvent() override { return _to InternalDOMEvent(); }
Expand Down
4 changes: 2 additions & 2 deletions dom/events/EventDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ EventDispatcher::Dispatch(nsISupports* aTarget,
}

if (aDOMEvent) {
WidgetEvent* innerEvent = aDOMEvent->GetInternalNSEvent();
WidgetEvent* innerEvent = aDOMEvent->WidgetEventPtr();
NS_ASSERTION(innerEvent == aEvent,
"The inner event of aDOMEvent is not the same as aEvent!");
}
Expand Down Expand Up @@ -698,7 +698,7 @@ EventDispatcher::DispatchDOMEvent(nsISupports* aTarget,
nsEventStatus* aEventStatus)
{
if (aDOMEvent) {
WidgetEvent* innerEvent = aDOMEvent->GetInternalNSEvent();
WidgetEvent* innerEvent = aDOMEvent->WidgetEventPtr();
NS_ENSURE_TRUE(innerEvent, NS_ERROR_ILLEGAL_VALUE);

bool dontResetTrusted = false;
Expand Down
2 changes: 1 addition & 1 deletion dom/events/IMEStateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
}

WidgetMouseEvent* internalEvent =
aMouseEvent->AsEvent()->GetInternalNSEvent()->AsMouseEvent();
aMouseEvent->AsEvent()->WidgetEventPtr()->AsMouseEvent();
if (NS_WARN_IF(!internalEvent)) {
MOZ_LOG(sISMLog, LogLevel::Debug,
("ISM: IMEStateManager::OnMouseButtonEventInEditor(), "
Expand Down
2 changes: 1 addition & 1 deletion dom/html/nsTextEditorState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ nsTextInputListener::HandleEvent(nsIDOMEvent* aEvent)
}

WidgetKeyboardEvent* keyEvent =
aEvent->GetInternalNSEvent()->AsKeyboardEvent();
aEvent->WidgetEventPtr()->AsKeyboardEvent();
if (!keyEvent) {
return NS_ERROR_UNEXPECTED;
}
Expand Down
4 changes: 2 additions & 2 deletions dom/indexedDB/ActorsChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ DispatchErrorEvent(IDBRequest* aRequest,
MOZ_ASSERT(!transaction || transaction->IsOpen() || transaction->IsAborted());

if (transaction && transaction->IsOpen()) {
WidgetEvent* internalEvent = aEvent->GetInternalNSEvent();
WidgetEvent* internalEvent = aEvent->WidgetEventPtr();
MOZ_ASSERT(internalEvent);

if (internalEvent->mFlags.mExceptionHasBeenRisen) {
Expand Down Expand Up @@ -816,7 +816,7 @@ DispatchSuccessEvent(ResultHelper* aResultHelper,
MOZ_ASSERT_IF(transaction,
transaction->IsOpen() || transaction->IsAborted());

WidgetEvent* internalEvent = aEvent->GetInternalNSEvent();
WidgetEvent* internalEvent = aEvent->WidgetEventPtr();
MOZ_ASSERT(internalEvent);

if (transaction &&
Expand Down
4 changes: 2 additions & 2 deletions dom/interfaces/events/nsIDOMEvent.idl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

interface nsIDOMEventTarget;

[ptr] native WidgetEventPtr(mozilla::WidgetEvent);
[ptr] native WidgetEvent(mozilla::WidgetEvent);
[ptr] native DOMEventPtr(mozilla::dom::Event);
[ptr] native IPCMessagePtr(IPC::Message);
[ptr] native ConstIPCMessagePtr(const IPC::Message);
Expand Down Expand Up @@ -207,7 +207,7 @@ interface nsIDOMEvent : nsISupports
[noscript] void duplicatePrivateData();
[noscript] void setTarget(in nsIDOMEventTarget aTarget);
[notxpcom] boolean IsDispatchStopped();
[notxpcom] WidgetEventPtr GetInternalNSEvent();
[notxpcom] WidgetEvent WidgetEventPtr();
[noscript,notxpcom] void SetTrusted(in boolean aTrusted);
[notxpcom] void Serialize(in IPCMessagePtr aMsg,
in boolean aSerializeInterfaceType);
Expand Down
4 changes: 2 additions & 2 deletions dom/ipc/TabParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3101,7 +3101,7 @@ TabParent::LayerTreeUpdate(bool aActive)
event->InitEvent(NS_LITERAL_STRING("MozLayerTreeCleared"), true, false);
}
event->SetTrusted(true);
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
bool dummy;
mFrameElement->DispatchEvent(event, &dummy);
return true;
Expand Down Expand Up @@ -3136,7 +3136,7 @@ TabParent::RecvRemotePaintIsReady()
RefPtr<Event> event = NS_NewDOMEvent(mFrameElement, nullptr, nullptr);
event->InitEvent(NS_LITERAL_STRING("MozAfterRemotePaint"), false, false);
event->SetTrusted(true);
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
bool dummy;
mFrameElement->DispatchEvent(event, &dummy);
return true;
Expand Down
2 changes: 1 addition & 1 deletion dom/media/gmp/GMPService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ GeckoMediaPluginService::GMPCrashCallback::Run(const nsACString& aPluginName)
RefPtr<dom::PluginCrashedEvent> event =
dom::PluginCrashedEvent::Constructor(document, NS_LITERAL_STRING("PluginCrashed"), init);
event->SetTrusted(true);
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;

EventDispatcher::DispatchDOMEvent(parentWindow, nullptr, event, nullptr, nullptr);
}
Expand Down
12 changes: 6 additions & 6 deletions dom/plugins/base/nsPluginInstanceOwner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent)
}
#endif

WidgetEvent* theEvent = aFocusEvent->GetInternalNSEvent();
WidgetEvent* theEvent = aFocusEvent->WidgetEventPtr();
if (theEvent) {
WidgetGUIEvent focusEvent(theEvent->mFlags.mIsTrusted, theEvent->mMessage,
nullptr);
Expand Down Expand Up @@ -1707,7 +1707,7 @@ nsresult nsPluginInstanceOwner::DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent)

if (mInstance) {
WidgetKeyboardEvent* keyEvent =
aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent();
aKeyEvent->WidgetEventPtr()->AsKeyboardEvent();
if (keyEvent && keyEvent->mClass == eKeyboardEventClass) {
nsEventStatus rv = ProcessEvent(*keyEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
Expand Down Expand Up @@ -1742,7 +1742,7 @@ nsPluginInstanceOwner::ProcessMouseDown(nsIDOMEvent* aMouseEvent)
}

WidgetMouseEvent* mouseEvent =
aMouseEvent->GetInternalNSEvent()->AsMouseEvent();
aMouseEvent->WidgetEventPtr()->AsMouseEvent();
if (mouseEvent && mouseEvent->mClass == eMouseEventClass) {
mLastMouseDownButtonType = mouseEvent->button;
nsEventStatus rv = ProcessEvent(*mouseEvent);
Expand All @@ -1767,7 +1767,7 @@ nsresult nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent,
return NS_OK;

WidgetMouseEvent* mouseEvent =
aMouseEvent->GetInternalNSEvent()->AsMouseEvent();
aMouseEvent->WidgetEventPtr()->AsMouseEvent();
if (mouseEvent && mouseEvent->mClass == eMouseEventClass) {
nsEventStatus rv = ProcessEvent(*mouseEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
Expand Down Expand Up @@ -1882,7 +1882,7 @@ nsPluginInstanceOwner::DispatchCompositionToPlugin(nsIDOMEvent* aEvent)
return NS_OK;
}
WidgetCompositionEvent* compositionEvent =
aEvent->GetInternalNSEvent()->AsCompositionEvent();
aEvent->WidgetEventPtr()->AsCompositionEvent();
if (NS_WARN_IF(!compositionEvent)) {
return NS_ERROR_INVALID_ARG;
}
Expand Down Expand Up @@ -2025,7 +2025,7 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent)

nsCOMPtr<nsIDOMDragEvent> dragEvent(do_QueryInterface(aEvent));
if (dragEvent && mInstance) {
WidgetEvent* ievent = aEvent->GetInternalNSEvent();
WidgetEvent* ievent = aEvent->WidgetEventPtr();
if (ievent && ievent->mFlags.mIsTrusted &&
ievent->mMessage != eDragEnter && ievent->mMessage != eDragOver) {
aEvent->PreventDefault();
Expand Down
4 changes: 2 additions & 2 deletions dom/workers/ServiceWorkerPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class ExtendableEventWorkerRunnable : public WorkerRunnable
MOZ_ASSERT(aWorkerScope);
MOZ_ASSERT(aEvent);
nsCOMPtr<nsIGlobalObject> sgo = aWorkerScope;
WidgetEvent* internalEvent = aEvent->GetInternalNSEvent();
WidgetEvent* internalEvent = aEvent->WidgetEventPtr();

ErrorResult result;
result = aWorkerScope->DispatchDOMEvent(nullptr, aEvent, nullptr, nullptr);
Expand Down Expand Up @@ -1223,7 +1223,7 @@ class FetchEventRunnable : public ExtendableFunctionalEventWorkerRunnable
nsCOMPtr<nsIRunnable> runnable;
if (event->DefaultPrevented(aCx)) {
event->ReportCanceled();
} else if (event->GetInternalNSEvent()->mFlags.mExceptionHasBeenRisen) {
} else if (event->WidgetEventPtr()->mFlags.mExceptionHasBeenRisen) {
// Exception logged via the WorkerPrivate ErrorReporter
} else {
runnable = new ResumeRequest(mInterceptedChannel);
Expand Down
2 changes: 1 addition & 1 deletion dom/xbl/nsXBLEventHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ nsXBLKeyEventHandler::ExecuteMatchedHandlers(
uint32_t aCharCode,
const IgnoreModifierState& aIgnoreModifierState)
{
WidgetEvent* event = aKeyEvent->AsEvent()->GetInternalNSEvent();
WidgetEvent* event = aKeyEvent->AsEvent()->WidgetEventPtr();
nsCOMPtr<EventTarget> target = aKeyEvent->AsEvent()->InternalDOMEvent()->GetCurrentTarget();

bool executed = false;
Expand Down
2 changes: 1 addition & 1 deletion dom/xbl/nsXBLPrototypeHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ nsXBLPrototypeHandler::ModifiersMatchMask(
nsIDOMUIEvent* aEvent,
const IgnoreModifierState& aIgnoreModifierState)
{
WidgetInputEvent* inputEvent = aEvent->AsEvent()->GetInternalNSEvent()->AsInputEvent();
WidgetInputEvent* inputEvent = aEvent->AsEvent()->WidgetEventPtr()->AsInputEvent();
NS_ENSURE_TRUE(inputEvent, false);

if (mKeyMask & cMetaMask) {
Expand Down
6 changes: 3 additions & 3 deletions dom/xbl/nsXBLWindowKeyHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ void
nsXBLWindowKeyHandler::HandleEventOnCapture(nsIDOMKeyEvent* aEvent)
{
WidgetKeyboardEvent* widgetEvent =
aEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent();
aEvent->AsEvent()->WidgetEventPtr()->AsKeyboardEvent();

if (widgetEvent->mFlags.mNoCrossProcessBoundaryForwarding) {
return;
}

nsCOMPtr<mozilla::dom::Element> originalTarget =
do_QueryInterface(aEvent->AsEvent()->GetInternalNSEvent()->originalTarget);
do_QueryInterface(aEvent->AsEvent()->WidgetEventPtr()->originalTarget);
if (!EventStateManager::IsRemoteTarget(originalTarget)) {
return;
}
Expand Down Expand Up @@ -565,7 +565,7 @@ nsXBLWindowKeyHandler::WalkHandlersAndExecute(
// retry to look for a shortcut key without the Windows-Logo key press.
if (!aIgnoreModifierState.mOS) {
WidgetKeyboardEvent* keyEvent =
aKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent();
aKeyEvent->AsEvent()->WidgetEventPtr()->AsKeyboardEvent();
if (keyEvent && keyEvent->IsOS()) {
IgnoreModifierState ignoreModifierState(aIgnoreModifierState);
ignoreModifierState.mOS = true;
Expand Down
Loading

0 comments on commit 75a29ac

Please sign in to comment.