Backed out 3 changesets (bug 1364896) for causing bug 1376466.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 27 Jun 2017 14:32:07 -0400
changeset 600694 8f80d594c08d5c7a112e5d4b9eb44ffca717eb7b
parent 600616 f4e52135d9bdc6ce98bb37b450021445aed894ce
child 600695 f0c33a8c0fae41bbf339313278976f2e8d3fe3dd
child 600703 79187de357e57dffb02ec3039a68b58ab240a7dd
child 600711 304149598e5142b75e308166de1245083eb70ac3
child 600712 66f9376d025d2ca74c0b2dbd6e36244c4687d30b
child 600739 aa7e74e408918df91a073c94471a01cbbd61185c
child 600784 3c12bb6f146bfcf7cb548c9658fa3880ca6aa549
child 600792 aa207e6f547b07ff2d52cae13294003b83002f42
child 600793 4f2cacf2e8b603bc206595a1f5e5c15b7ea04bd0
child 600797 0b335026da83f7b84783daf72f37d2c8684641a3
child 600858 dd52d8b55b6ad1ab27c9c88e1c4be2b2ec61b873
child 600862 eb49e899a0ca3d465527988c25143e93b6e59d15
child 600888 fef7d2018e77a4a4a7594bf32de750c8fa39e2ea
child 600917 097bc2234eb4c5b071ce3ceeb2b756f20bce63e5
child 600921 2900b387f909c4db78b009c40e63cd1f781ac9c9
child 600946 192cd1619692d791d43888133fd825c617c83959
child 600951 d32d95c4b885e7bcb556ec3b69443729a9ab073d
child 600956 343d17d35906004eb6438e28d7a0b7d8415f5b8d
child 600964 720eb89a10afdadafbb914b4682732eeb9bc4183
child 600969 cc13531785ecf7f55a893f744c7c143ee6255f74
child 600988 0a7433f6050ad21bdcfd8a3deec7c331aba2e357
child 600990 b5d6a99e803c1422a1716eb42c341ebd9a62fb1c
child 600999 8b73a886b0b8ecd65c90d201fb7a67b045a91b86
child 601000 856f06320c78ed88c4578fce985b2a526566e825
child 601001 34b3839c28e91e392006ccc7cb870664b2465139
child 601015 5560760b86354e55ecedef589ce9a0cb2e8a625e
child 601071 62f76ccf9d13cb041a2ff72321aa62a762c26527
child 601088 47b119ac05208b2d5b463b1ae82d5b07bf886acf
child 601089 8a0d9c666167d5722026a25ce47cd1c58b750720
child 601092 ee1f4ab9f45d8c2ecaedffa67678ac11d410b5a1
child 601098 36b40e7e87ebc87090e4a93bc314c27a6a542160
child 601108 855f54708a8508eb806c09c3c947db0bc44e3392
child 601132 785ea7a2a07ba5556f4c3323b1ded71c8b00c5ce
child 601138 51222f3b56934461b04d28222dc90b51ab349d8c
child 601140 99f0e58e4e6025061c9152d6fb2b0cdd6da21f34
child 601156 c578ed51c99dd5c74687b3d7189c699fb9134430
child 601161 226cef11665566e8f3dd1f4938d8be283a0e6948
child 601166 f5b7c757825c8cfe970e01d9efd9e66c796ebbc7
child 601171 439d261e11c1ab7f7fdb742525eed747445d8a7b
child 601178 15b517684a6a2c0281983e614c29c8f0cb667213
child 601213 f87e31ac8e9a3588e09a62bbb092806d75b324df
child 601242 fc714e5415de1a65b07efa483d6f34a6448644c5
child 601297 25cd38663b7be13a2a3d5612bc883b87ad479035
child 601370 b1e9c5d8636717949f3c290e4d4227b259f6fbfa
child 601385 a17f69c77ad68ddd28ad75d03f127c8cb5abfc17
child 601388 e241e2c85ef90c262db08d3f6a607d4754d8024d
child 601451 50152b6704652225ecf48803f052565a883ec8bb
child 601458 96cb42e8a1a1e4a085a15191cc8b6634c3045f80
child 601481 63b966b4d323bf2011e5f0353a33bfd33437e707
child 601486 679b876182632e2658bc2a122f072bdb03a5bcce
child 601528 798069ebad9aa342cc3cdeb2348f6261d0b2a681
child 601541 39e08ec4c5578038ca44204a75373a2965cc7759
child 601544 5caa52834d22e2fb0a2aeae9feb1bcb80b17e1f1
child 601590 b4bc18fa4da36a265f977c4813afb47a4d92a0f5
child 601598 1be6952155bbc4768404e97787786030665670d0
child 601647 dea9d69ee0760f53a0e036191b2c06378467ada5
child 601665 51991854ed81bdabaeac61c17d5952bd3c3e7e5b
child 601666 d5afe4c904f731084e3f672a56412f2d6afb042d
child 601698 cdf8dc049269fc2b1380225a3f3e99271921cbb5
child 602082 a6335a86d320de42efa1f925d8a8d186699ead59
child 602083 d090736e01ac0f499326331bda1b9fc8812a2080
child 602144 53f0aeb78bab98d043809a797bc7d7b14b3edf08
child 602151 d9ee049383182fdb80caacb089206556aaebf1f6
child 602152 0ec60820bff06ac353e4e5f1126e24309534515c
child 602176 5daca9c467ef501e6ca760247a9cd1330b6f7f84
child 602201 ff6abb68eafe938eff14de9a63241614ce85df0a
child 602205 4fce6f03e28425e6cec7685b86399d57b746bf46
child 602207 0203b3b1d34d6dd43479bb9e352758bbb1116971
child 602306 4dbd69d868879bcc6e5be27ae5d713c5ec51dce1
child 602426 50b95337f82c2e1b39aaca6591a2a7253bc6c980
child 602541 8debf4b7c668deece49c39deadfdc9f09f3e5831
child 602546 d67f623461bce5149e4acf9d546b6ea201bcbbb3
child 602700 762c2b23307c4026bc5b5b5a4926b00d05a9bba5
child 602711 3cf07d1fe3199cda49d9642e064e90f1e182cc73
child 602735 3fa81b0da9ef116499bbd60cff247c708a2220ca
child 611572 04344c0ec45da4491306c2b17154544161d752f7
push id65844
push userbmo:kit@mozilla.com
push dateTue, 27 Jun 2017 18:57:45 +0000
bugs1364896, 1376466
milestone56.0a1
backs out5c870a786e945197a770a308aeeececdff8bac18
134d9ee1e545d7da27888a4c0a3b8eae689bbbba
8f52f28a9eaa342c8f55441551d8ee109845f54b
Backed out 3 changesets (bug 1364896) for causing bug 1376466. Backed out changeset 5c870a786e94 (bug 1364896) Backed out changeset 134d9ee1e545 (bug 1364896) Backed out changeset 8f52f28a9eaa (bug 1364896)
browser/base/content/browser.js
browser/base/content/nsContextMenu.js
browser/base/content/test/contextMenu/browser.ini
browser/base/content/test/contextMenu/browser_contextmenu_touch.js
browser/themes/windows/browser.css
layout/xul/nsXULPopupManager.cpp
layout/xul/nsXULPopupManager.h
testing/mochitest/tests/SimpleTest/EventUtils.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1629,20 +1629,16 @@ var gBrowserInit = {
     LightWeightThemeWebInstaller.init();
 
     if (Win7Features)
       Win7Features.onOpenWindow();
 
     FullScreen.init();
     PointerLock.init();
 
-    if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
-      ContextMenuTouchModeObserver.init();
-    }
-
     // initialize the sync UI
     gSync.init();
 
     if (AppConstants.MOZ_DATA_REPORTING)
       gDataNotificationInfoBar.init();
 
     gBrowserThumbnails.init();
 
@@ -1842,19 +1838,16 @@ var gBrowserInit = {
       } catch (ex) {
         Cu.reportError(ex);
       }
 
       if (this.gmpInstallManager) {
         this.gmpInstallManager.uninit();
       }
 
-      if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
-        ContextMenuTouchModeObserver.uninit();
-      }
       BrowserOffline.uninit();
       IndexedDBPromptHelper.uninit();
       PanelUI.uninit();
       AutoShowBookmarksToolbar.uninit();
     }
 
     // Final window teardown, do this last.
     window.XULBrowserWindow = null;
@@ -8221,87 +8214,16 @@ var RestoreLastSessionObserver = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference])
 };
 
 function restoreLastSession() {
   SessionStore.restoreLastSession();
 }
 
-/* Observes context menus and adjusts their size for better
- * usability when opened via a touch screen. */
-var ContextMenuTouchModeObserver = {
-  get _searchBarContextMenu() {
-    let searchbar = document.getElementById("searchbar");
-    let textBox = document.getAnonymousElementByAttribute(searchbar,
-                                        "anonid", "searchbar-textbox");
-    let inputBox = document.getAnonymousElementByAttribute(textBox,
-                                        "anonid", "textbox-input-box");
-    let menu = document.getAnonymousElementByAttribute(inputBox,
-                                        "anonid", "input-box-contextmenu");
-    return menu;
-  },
-
-  get _urlBarContextMenu() {
-    let urlbar = document.getElementById("urlbar");
-    let textBox = document.getAnonymousElementByAttribute(urlbar,
-                                        "anonid", "textbox-input-box");
-    let menu = document.getAnonymousElementByAttribute(textBox,
-                                        "anonid", "input-box-contextmenu");
-    return menu;
-  },
-
-  _addListener(el) {
-    el.addEventListener("popupshowing", this);
-  },
-
-  _removeListener(el) {
-    el.removeEventListener("popupshowing", this);
-  },
-
-  init() {
-    // Start observing different context menus for popupshowing.
-
-    // The main popup set, which contains several context menus,
-    // e.g. the page content area context menu.
-    this._addListener(document.getElementById("mainPopupSet"));
-
-    // The navigation context menu of the back and forward button.
-    this._addListener(document.getElementById("back-button"));
-    this._addListener(document.getElementById("forward-button"));
-
-    // The search bar context menu.
-    this._addListener(this._searchBarContextMenu);
-
-    // The url bar context menu.
-    this._addListener(this._urlBarContextMenu);
-  },
-
-  handleEvent(event) {
-    let target = event.target;
-    if (target.localName != "menupopup") {
-      return;
-    }
-
-    if (event.mozInputSource == MouseEvent.MOZ_SOURCE_TOUCH) {
-      target.setAttribute("touchmode", "true");
-    } else {
-      target.removeAttribute("touchmode");
-    }
-  },
-
-  uninit() {
-    this._removeListener(document.getElementById("mainPopupSet"));
-    this._removeListener(document.getElementById("back-button"));
-    this._removeListener(document.getElementById("forward-button"));
-    this._removeListener(this._searchBarContextMenu);
-    this._removeListener(this._urlBarContextMenu);
-  },
-};
-
 var TabContextMenu = {
   contextTab: null,
   _updateToggleMuteMenuItem(aTab, aConditionFn) {
     ["muted", "soundplaying"].forEach(attr => {
       if (!aConditionFn || aConditionFn(attr)) {
         if (aTab.hasAttribute(attr)) {
           aTab.toggleMuteMenuItem.setAttribute(attr, "true");
         } else {
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -57,24 +57,24 @@ function openContextMenu(aMessage) {
                               disableSetDesktopBackground: data.disableSetDesktopBg,
                               loginFillInfo: data.loginFillInfo,
                               parentAllowsMixedContent: data.parentAllowsMixedContent,
                               userContextId: data.userContextId,
                             };
   let popup = browser.ownerDocument.getElementById("contentAreaContextMenu");
   let event = gContextMenuContentData.event;
 
-  // The event is a CPOW that can't be passed into the native openPopupAtScreen
-  // function. Therefore we synthesize a new MouseEvent to propagate the
-  // inputSource to the subsequently triggered popupshowing event.
-  var newEvent = document.createEvent("MouseEvent");
-  newEvent.initNSMouseEvent("contextmenu", true, true, null, 0, event.screenX, event.screenY,
-                            0, 0, false, false, false, false, 0, null, 0, event.mozInputSource);
+  // Set touch mode to get larger menu items.
+  if (event.mozInputSource == MouseEvent.MOZ_SOURCE_TOUCH) {
+    popup.setAttribute("touchmode", "true");
+  } else {
+    popup.removeAttribute("touchmode");
+  }
 
-  popup.openPopupAtScreen(newEvent.screenX, newEvent.screenY, true, newEvent);
+  popup.openPopupAtScreen(event.screenX, event.screenY, true);
 }
 
 function nsContextMenu(aXulMenu, aIsShift) {
   this.shouldDisplay = true;
   this.initMenu(aXulMenu, aIsShift);
 }
 
 // Prototype for nsContextMenu "class."
--- a/browser/base/content/test/contextMenu/browser.ini
+++ b/browser/base/content/test/contextMenu/browser.ini
@@ -1,8 +1,6 @@
 [DEFAULT]
 support-files =
   !/browser/base/content/test/general/contextmenu_common.js
   subtst_contextmenu_webext.html
 
 [browser_contextmenu_mozextension.js]
-[browser_contextmenu_touch.js]
-skip-if = !(os == 'win' && os_version == '10.0')
deleted file mode 100644
--- a/browser/base/content/test/contextMenu/browser_contextmenu_touch.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 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/. */
-
-/* This test checks that context menus are in touchmode
- * when opened through a touch event (long tap). */
-
-async function openAndCheckContextMenu(contextMenu, target) {
-  is(contextMenu.state, "closed", "Context menu is initally closed.");
-
-  let popupshown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
-  EventUtils.synthesizeNativeTapAtCenter(target, true);
-  await popupshown;
-
-  is(contextMenu.state, "open", "Context menu is open.");
-  is(contextMenu.getAttribute("touchmode"), "true", "Context menu is in touchmode.");
-
-  contextMenu.hidePopup();
-
-  popupshown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
-  EventUtils.synthesizeMouseAtCenter(target, {type: "contextmenu"});
-  await popupshown;
-
-  is(contextMenu.state, "open", "Context menu is open.");
-  ok(!contextMenu.hasAttribute("touchmode"), "Context menu is not in touchmode.");
-
-  contextMenu.hidePopup();
-}
-
-// Test the content area context menu.
-add_task(async function test_contentarea_contextmenu_touch() {
-  await BrowserTestUtils.withNewTab("about:blank", async function(browser) {
-    let contextMenu = document.getElementById("contentAreaContextMenu");
-    await openAndCheckContextMenu(contextMenu, browser);
-  });
-});
-
-// Test the back and forward buttons.
-add_task(async function test_back_forward_button_contextmenu_touch() {
-  await BrowserTestUtils.withNewTab("http://example.com", async function(browser) {
-    let contextMenu = document.getElementById("backForwardMenu");
-
-    let backbutton = document.getElementById("back-button");
-    let notDisabled = BrowserTestUtils.waitForCondition(() => !backbutton.hasAttribute("disabled"));
-    BrowserTestUtils.loadURI(browser, "http://example.org");
-    await notDisabled;
-    await openAndCheckContextMenu(contextMenu, backbutton);
-
-
-    let forwardbutton = document.getElementById("forward-button");
-    notDisabled = BrowserTestUtils.waitForCondition(() => !forwardbutton.hasAttribute("disabled"));
-    backbutton.click();
-    await notDisabled;
-    await openAndCheckContextMenu(contextMenu, forwardbutton);
-  });
-});
-
-// Test the toolbar context menu.
-add_task(async function test_toolbar_contextmenu_touch() {
-  let toolbarContextMenu = document.getElementById("toolbar-context-menu");
-  let target = document.getElementById("PanelUI-menu-button");
-  await openAndCheckContextMenu(toolbarContextMenu, target);
-});
-
-// Test the urlbar input context menu.
-add_task(async function test_urlbar_contextmenu_touch() {
-  let urlbar = document.getElementById("urlbar");
-  let textBox = document.getAnonymousElementByAttribute(urlbar,
-                                      "anonid", "textbox-input-box");
-  let menu = document.getAnonymousElementByAttribute(textBox,
-                                      "anonid", "input-box-contextmenu");
-  await openAndCheckContextMenu(menu, textBox);
-});
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -1965,18 +1965,18 @@ notification.pluginVulnerable > .notific
   margin-left: -10px;
   margin-right: -10px;
   margin-bottom: -10px;
 }
 
 %include ../shared/contextmenu.inc.css
 
 /* Make context menu items larger when opened through touch. */
-menupopup[touchmode] menu,
-menupopup[touchmode] menuitem {
+#contentAreaContextMenu[touchmode] menu,
+#contentAreaContextMenu[touchmode] menuitem {
   padding-top: 12px;
   padding-bottom: 12px;
 }
 
 #contentAreaContextMenu[touchmode] > #context-navigation > menuitem {
   padding-top: 7px;
   padding-bottom: 7px;
 }
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -766,17 +766,17 @@ nsXULPopupManager::ShowMenu(nsIContent *
       new nsXULPopupShowingEvent(popupFrame->GetContent(),
                                  parentIsContextMenu, aSelectFirstItem);
     aMenu->OwnerDoc()->Dispatch("nsXULPopupShowingEvent",
                                 TaskCategory::Other,
                                 event.forget());
   }
   else {
     nsCOMPtr<nsIContent> popupContent = popupFrame->GetContent();
-    FirePopupShowingEvent(popupContent, parentIsContextMenu, aSelectFirstItem, nullptr);
+    FirePopupShowingEvent(popupContent, parentIsContextMenu, aSelectFirstItem);
   }
 }
 
 void
 nsXULPopupManager::ShowPopup(nsIContent* aPopup,
                              nsIContent* aAnchorContent,
                              const nsAString& aPosition,
                              int32_t aXPos, int32_t aYPos,
@@ -790,34 +790,34 @@ nsXULPopupManager::ShowPopup(nsIContent*
     return;
 
   nsCOMPtr<nsIContent> triggerContent;
   InitTriggerEvent(aTriggerEvent, aPopup, getter_AddRefs(triggerContent));
 
   popupFrame->InitializePopup(aAnchorContent, triggerContent, aPosition,
                               aXPos, aYPos, MenuPopupAnchorType_Node, aAttributesOverride);
 
-  FirePopupShowingEvent(aPopup, aIsContextMenu, aSelectFirstItem, aTriggerEvent);
+  FirePopupShowingEvent(aPopup, aIsContextMenu, aSelectFirstItem);
 }
 
 void
 nsXULPopupManager::ShowPopupAtScreen(nsIContent* aPopup,
                                      int32_t aXPos, int32_t aYPos,
                                      bool aIsContextMenu,
                                      nsIDOMEvent* aTriggerEvent)
 {
   nsMenuPopupFrame* popupFrame = GetPopupFrameForContent(aPopup, true);
   if (!popupFrame || !MayShowPopup(popupFrame))
     return;
 
   nsCOMPtr<nsIContent> triggerContent;
   InitTriggerEvent(aTriggerEvent, aPopup, getter_AddRefs(triggerContent));
 
   popupFrame->InitializePopupAtScreen(triggerContent, aXPos, aYPos, aIsContextMenu);
-  FirePopupShowingEvent(aPopup, aIsContextMenu, false, aTriggerEvent);
+  FirePopupShowingEvent(aPopup, aIsContextMenu, false);
 }
 
 void
 nsXULPopupManager::ShowPopupAtScreenRect(nsIContent* aPopup,
                                          const nsAString& aPosition,
                                          const nsIntRect& aRect,
                                          bool aIsContextMenu,
                                          bool aAttributesOverride,
@@ -828,17 +828,17 @@ nsXULPopupManager::ShowPopupAtScreenRect
     return;
 
   nsCOMPtr<nsIContent> triggerContent;
   InitTriggerEvent(aTriggerEvent, aPopup, getter_AddRefs(triggerContent));
 
   popupFrame->InitializePopupAtRect(triggerContent, aPosition,
                                     aRect, aAttributesOverride);
 
-  FirePopupShowingEvent(aPopup, aIsContextMenu, false, aTriggerEvent);
+  FirePopupShowingEvent(aPopup, aIsContextMenu, false);
 }
 
 void
 nsXULPopupManager::ShowTooltipAtScreen(nsIContent* aPopup,
                                        nsIContent* aTriggerContent,
                                        int32_t aXPos, int32_t aYPos)
 {
   nsMenuPopupFrame* popupFrame = GetPopupFrameForContent(aPopup, true);
@@ -857,17 +857,17 @@ nsXULPopupManager::ShowTooltipAtScreen(n
     nsIWidget *rootWidget = rootPresContext->GetRootWidget();
     if (rootWidget) {
       mCachedMousePoint -= rootWidget->WidgetToScreenOffset();
     }
   }
 
   popupFrame->InitializePopupAtScreen(aTriggerContent, aXPos, aYPos, false);
 
-  FirePopupShowingEvent(aPopup, false, false, nullptr);
+  FirePopupShowingEvent(aPopup, false, false);
 }
 
 void
 nsXULPopupManager::ShowPopupWithAnchorAlign(nsIContent* aPopup,
                                             nsIContent* aAnchorContent,
                                             nsAString& aAnchor,
                                             nsAString& aAlign,
                                             int32_t aXPos, int32_t aYPos,
@@ -876,17 +876,17 @@ nsXULPopupManager::ShowPopupWithAnchorAl
   nsMenuPopupFrame* popupFrame = GetPopupFrameForContent(aPopup, true);
   if (!popupFrame || !MayShowPopup(popupFrame))
     return;
 
   InitTriggerEvent(nullptr, nullptr, nullptr);
 
   popupFrame->InitializePopupWithAnchorAlign(aAnchorContent, aAnchor,
                                              aAlign, aXPos, aYPos);
-  FirePopupShowingEvent(aPopup, aIsContextMenu, false, nullptr);
+  FirePopupShowingEvent(aPopup, aIsContextMenu, false);
 }
 
 static void
 CheckCaretDrawingState()
 {
   // There is 1 caret per document, we need to find the focused
   // document and erase its caret.
   nsIFocusManager* fm = nsFocusManager::GetFocusManager();
@@ -1424,18 +1424,17 @@ nsXULPopupManager::ExecuteMenu(nsIConten
   aMenu->OwnerDoc()->Dispatch("nsXULMenuCommandEvent",
                               TaskCategory::Other,
                               event.forget());
 }
 
 void
 nsXULPopupManager::FirePopupShowingEvent(nsIContent* aPopup,
                                          bool aIsContextMenu,
-                                         bool aSelectFirstItem,
-                                         nsIDOMEvent* aTriggerEvent)
+                                         bool aSelectFirstItem)
 {
   nsCOMPtr<nsIContent> popup = aPopup; // keep a strong reference to the popup
 
   nsMenuPopupFrame* popupFrame = do_QueryFrame(aPopup->GetPrimaryFrame());
   if (!popupFrame)
     return;
 
   nsPresContext *presContext = popupFrame->PresContext();
@@ -1471,24 +1470,16 @@ nsXULPopupManager::FirePopupShowingEvent
   if (rootPresContext) {
     rootPresContext->PresShell()->GetViewManager()->
       GetRootWidget(getter_AddRefs(event.mWidget));
   }
   else {
     event.mWidget = nullptr;
   }
 
-  if (aTriggerEvent) {
-    WidgetMouseEventBase* mouseEvent =
-      aTriggerEvent->WidgetEventPtr()->AsMouseEventBase();
-    if (mouseEvent) {
-      event.inputSource = mouseEvent->inputSource;
-    }
-  }
-
   event.mRefPoint = mCachedMousePoint;
   event.mModifiers = mCachedModifiers;
   EventDispatcher::Dispatch(popup, presContext, &event, nullptr, &status);
 
   mCachedMousePoint = LayoutDeviceIntPoint(0, 0);
   mOpeningPopup = nullptr;
 
   mCachedModifiers = 0;
@@ -2744,17 +2735,17 @@ nsXULPopupManager::KeyPress(nsIDOMKeyEve
   return NS_OK; // I am consuming event
 }
 
 NS_IMETHODIMP
 nsXULPopupShowingEvent::Run()
 {
   nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
   if (pm) {
-    pm->FirePopupShowingEvent(mPopup, mIsContextMenu, mSelectFirstItem, nullptr);
+    pm->FirePopupShowingEvent(mPopup, mIsContextMenu, mSelectFirstItem);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXULPopupHidingEvent::Run()
 {
--- a/layout/xul/nsXULPopupManager.h
+++ b/layout/xul/nsXULPopupManager.h
@@ -726,24 +726,20 @@ protected:
                          bool aDeselectMenu);
 
   /**
    * Fire a popupshowing event on the popup and then open the popup.
    *
    * aPopup - the popup to open
    * aIsContextMenu - true for context menus
    * aSelectFirstItem - true to select the first item in the menu
-   * aTriggerEvent - the event that triggered the showing event.
-   *                 This is currently used to propagate the
-   *                 inputSource attribute. May be null.
    */
   void FirePopupShowingEvent(nsIContent* aPopup,
                              bool aIsContextMenu,
-                             bool aSelectFirstItem,
-                             nsIDOMEvent* aTriggerEvent);
+                             bool aSelectFirstItem);
 
   /**
    * Fire a popuphiding event and then hide the popup. This will be called
    * recursively if aNextPopup and aLastPopup are set in order to hide a chain
    * of open menus. If these are not set, only one popup is closed. However,
    * if the popup type indicates a menu, yet the next popup is not a menu,
    * then this ends the closing of popups. This allows a menulist inside a
    * non-menu to close up the menu but not close up the panel it is contained
--- a/testing/mochitest/tests/SimpleTest/EventUtils.js
+++ b/testing/mochitest/tests/SimpleTest/EventUtils.js
@@ -628,41 +628,16 @@ function sendWheelAndPaint(aTarget, aOff
   };
 
   // Listen for the system wheel event, because it happens after all of
   // the other wheel events, including legacy events.
   SpecialPowers.addSystemEventListener(aWindow, "wheel", onwheel);
   synthesizeWheel(aTarget, aOffsetX, aOffsetY, aEvent, aWindow);
 }
 
-function synthesizeNativeTapAtCenter(aTarget, aLongTap = false, aCallback = null, aWindow = window) {
-  let rect = aTarget.getBoundingClientRect();
-  return synthesizeNativeTap(aTarget, rect.width / 2, rect.height / 2, aLongTap, aCallback, aWindow);
-}
-
-function synthesizeNativeTap(aTarget, aOffsetX, aOffsetY, aLongTap = false, aCallback = null, aWindow = window) {
-  let utils = _getDOMWindowUtils(aWindow);
-  if (!utils)
-    return;
-
-  let scale = utils.screenPixelsPerCSSPixel;
-  let rect = aTarget.getBoundingClientRect();
-  let x = (aWindow.mozInnerScreenX + rect.left + aOffsetX) * scale;
-  let y = (aWindow.mozInnerScreenY + rect.top + aOffsetY) * scale;
-
-  let observer = {
-    observe: (subject, topic, data) => {
-      if (aCallback && topic == "mouseevent") {
-        aCallback(data);
-      }
-    }
-  };
-  utils.sendNativeTouchTap(x, y, aLongTap, observer);
-}
-
 function synthesizeNativeMouseMove(aTarget, aOffsetX, aOffsetY, aCallback, aWindow = window) {
   var utils = _getDOMWindowUtils(aWindow);
   if (!utils)
     return;
 
   var rect = aTarget.getBoundingClientRect();
   var x = aOffsetX + window.mozInnerScreenX + rect.left;
   var y = aOffsetY + window.mozInnerScreenY + rect.top;