Bug 1115023 - After Bug 1066383 the navigator context menu is huge r=Neil
authorPhilip Chee <philip.chee@gmail.com>
Sat, 03 Jan 2015 04:26:03 +0800
changeset 17287 228eff402a016b33140da40f221c9a23d35e1ca9
parent 17286 088bd2f608563eea70ef68b2f12c408c5af3c7c8
child 17288 2a69432c0202f22f76ffd07c3e8fd2ed59e2f725
push id10673
push userphilip.chee@gmail.com
push dateFri, 02 Jan 2015 20:30:08 +0000
treeherdercomm-central@964092fa6430 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs1115023, 1066383
Bug 1115023 - After Bug 1066383 the navigator context menu is huge r=Neil
suite/common/nsContextMenu.js
suite/installer/package-manifest.in
--- a/suite/common/nsContextMenu.js
+++ b/suite/common/nsContextMenu.js
@@ -10,20 +10,20 @@
 |   For usage, see references to this class in navigator.xul.                  |
 |                                                                              |
 |   Currently, this code is relatively useless for any other purpose.  In the  |
 |   longer term, this code will be restructured to make it more reusable.      |
 ------------------------------------------------------------------------------*/
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "PageMenu", function() {
+XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
   let tmp = {};
   Components.utils.import("resource://gre/modules/PageMenu.jsm", tmp);
-  return new tmp.PageMenu();
+  return new tmp.PageMenuParent();
 });
 
 function nsContextMenu(aXulMenu, aBrowser, aIsShift) {
   this.shouldDisplay = true;
   this.initMenu(aBrowser, aXulMenu, aIsShift);
 }
 
 // Prototype for nsContextMenu "class."
@@ -34,18 +34,17 @@ nsContextMenu.prototype = {
                    document.popupRangeOffset);
 
     if (!this.shouldDisplay)
       return;
 
     this.hasPageMenu = false;
     if (!aIsShift && this.browser.docShell.allowJavascript &&
         Services.prefs.getBoolPref("javascript.enabled"))
-      this.hasPageMenu = PageMenu.maybeBuildAndAttachMenu(this.target,
-                                                          aXulMenu);
+      this.hasPageMenu = PageMenuParent.buildAndAddToPopup(this.target, aXulMenu);
 
     this.isTextSelected = this.isTextSelection();
     this.isContentSelected = this.isContentSelection();
 
     this.initPopupPrincipal();
 
     // Initialize (disable/remove) menu items.
     this.initItems();
--- a/suite/installer/package-manifest.in
+++ b/suite/installer/package-manifest.in
@@ -384,16 +384,18 @@
 @RESPATH@/components/FeedConverter.js
 @RESPATH@/components/FeedProcessor.js
 @RESPATH@/components/FeedProcessor.manifest
 @RESPATH@/components/FeedWriter.js
 @RESPATH@/components/folderLookupService.js
 @RESPATH@/components/formautofill.manifest
 @RESPATH@/components/FormAutofillContentService.js
 @RESPATH@/components/Identity.manifest
+@RESPATH@/components/htmlMenuBuilder.js
+@RESPATH@/components/htmlMenuBuilder.manifest
 @RESPATH@/components/jsconsole-clhandler.js
 @RESPATH@/components/jsconsole-clhandler.manifest
 @RESPATH@/components/messageWakeupService.js
 @RESPATH@/components/messageWakeupService.manifest
 @RESPATH@/components/NetworkGeolocationProvider.js
 @RESPATH@/components/NetworkGeolocationProvider.manifest
 @RESPATH@/components/nsAbout.js
 @RESPATH@/components/nsBlocklistService.js