зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1256589 part.3 Move the implementation of StopCrossProcessForwarding() from dom::Event to WidgetEvent r=smaug
MozReview-Commit-ID: KXeVxCJ05Mo --HG-- extra : rebase_source : 2f8d49412e32eec4a0a8f599984d057637f491a1 extra : source : a68c4bb4878612d61425d87a47b4eca78f271240
This commit is contained in:
Родитель
823c6c0373
Коммит
2748ab1e88
|
@ -480,7 +480,7 @@ Event::StopImmediatePropagation()
|
|||
NS_IMETHODIMP
|
||||
Event::StopCrossProcessForwarding()
|
||||
{
|
||||
mEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
|
||||
mEvent->StopCrossProcessForwarding();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -642,7 +642,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
// from ESM::DispatchMouseOrPointerEvent (sending is permanent)).
|
||||
// Flag mNoCrossProcessBoundaryForwarding helps to
|
||||
// suppress sending accidental event from widget code.
|
||||
aEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
|
||||
aEvent->StopCrossProcessForwarding();
|
||||
break;
|
||||
case eMouseExitFromWidget:
|
||||
// If this is a remote frame, we receive eMouseExitFromWidget from the
|
||||
|
@ -659,7 +659,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
|
||||
// Flag helps to suppress double event sending into process of content.
|
||||
// For more information see comment above, at eMouseEnterIntoWidget case.
|
||||
aEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
|
||||
aEvent->StopCrossProcessForwarding();
|
||||
|
||||
// If the event is not a top-level window exit, then it's not
|
||||
// really an exit --- we may have traversed widget boundaries but
|
||||
|
|
|
@ -2108,9 +2108,8 @@ TabParent::RecvReplyKeyEvent(const WidgetKeyboardEvent& event)
|
|||
NS_ENSURE_TRUE(mFrameElement, true);
|
||||
|
||||
WidgetKeyboardEvent localEvent(event);
|
||||
// Set mNoCrossProcessBoundaryForwarding to avoid this event from
|
||||
// being infinitely redispatched and forwarded to the child again.
|
||||
localEvent.mFlags.mNoCrossProcessBoundaryForwarding = true;
|
||||
// Mark the event as not to be dispatched to remote process again.
|
||||
localEvent.StopCrossProcessForwarding();
|
||||
|
||||
// Here we convert the WidgetEvent that we received to an nsIDOMEvent
|
||||
// to be able to dispatch it to the <browser> element as the target element.
|
||||
|
|
|
@ -417,7 +417,7 @@ nsXBLWindowKeyHandler::HandleEventOnCaptureInDefaultEventGroup(
|
|||
// For reserved commands (such as Open New Tab), we don't to wait for
|
||||
// the content to answer (so mWantReplyFromContentProcess remains false),
|
||||
// neither to give a chance for content to override its behavior.
|
||||
widgetKeyboardEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
|
||||
widgetKeyboardEvent->StopCrossProcessForwarding();
|
||||
// If the key combination is reserved by chrome, we shouldn't expose the
|
||||
// keyboard event to web contents because such keyboard events shouldn't be
|
||||
// cancelable. So, it's not good behavior to fire keyboard events but
|
||||
|
|
|
@ -7077,7 +7077,7 @@ PresShell::HandleKeyboardEvent(nsINode* aTarget,
|
|||
*aStatus = nsEventStatus_eConsumeNoDefault;
|
||||
DispatchAfterKeyboardEventInternal(chain, aEvent, false, chainIndex);
|
||||
// No need to forward the event to child process.
|
||||
aEvent.mFlags.mNoCrossProcessBoundaryForwarding = true;
|
||||
aEvent.StopCrossProcessForwarding();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,6 +142,10 @@ public:
|
|||
StopPropagation();
|
||||
mImmediatePropagationStopped = true;
|
||||
}
|
||||
inline void StopCrossProcessForwarding()
|
||||
{
|
||||
mNoCrossProcessBoundaryForwarding = true;
|
||||
}
|
||||
|
||||
inline void Clear()
|
||||
{
|
||||
|
@ -326,6 +330,7 @@ public:
|
|||
*/
|
||||
void StopPropagation() { mFlags.StopPropagation(); }
|
||||
void StopImmediatePropagation() { mFlags.StopImmediatePropagation(); }
|
||||
void StopCrossProcessForwarding() { mFlags.StopCrossProcessForwarding(); }
|
||||
|
||||
void PreventDefault()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче