Bug 1275932, use AutoHandlingUserInputStatePusher to indicate that a real input is happening when refiring key event in the parent process, r=masayuki
authorNeil Deakin <neil@mozilla.com>
Mon, 25 Jul 2016 09:08:49 -0400
changeset 331615 81fa78eb62f6ff8eb0b392105e43b7122f04df90
parent 331614 6acbad99a3ff13f56a1157830cc0ac93379c0d24
child 331616 9b361e455e6ab4c37c9368d5b9c914b22997efb7
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1275932
milestone50.0a1
Bug 1275932, use AutoHandlingUserInputStatePusher to indicate that a real input is happening when refiring key event in the parent process, r=masayuki
dom/ipc/TabParent.cpp
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -2113,16 +2113,19 @@ TabParent::RecvReplyKeyEvent(const Widge
   // 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.
   nsIDocument* doc = mFrameElement->OwnerDoc();
   nsIPresShell* presShell = doc->GetShell();
   NS_ENSURE_TRUE(presShell, true);
   nsPresContext* presContext = presShell->GetPresContext();
   NS_ENSURE_TRUE(presContext, true);
 
+  AutoHandlingUserInputStatePusher userInpStatePusher(localEvent.IsTrusted(),
+                                                      &localEvent, doc);
+
   EventDispatcher::Dispatch(mFrameElement, presContext, &localEvent);
   return true;
 }
 
 bool
 TabParent::RecvDispatchAfterKeyboardEvent(const WidgetKeyboardEvent& aEvent)
 {
   NS_ENSURE_TRUE(mFrameElement, true);