Bug 578614 - tab context menu should not appear when right-clicking new tab button or the space to its right. r=dao
authorFrank Yan <fyan@mozilla.com>
Sat, 17 Jul 2010 10:08:43 +0200
changeset 47855 95c013f6c9629cd1c353cb7373e021f3b8579b52
parent 47854 460e93847f2d862a75b6a03241f441bc7ee69035
child 47856 ca35f59a9ff12639f43d5ee5c9516006dc21109f
push id14449
push userdgottwald@mozilla.com
push dateSat, 17 Jul 2010 08:12:46 +0000
treeherdermozilla-central@b00bb3a115de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs578614
milestone2.0b2pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 578614 - tab context menu should not appear when right-clicking new tab button or the space to its right. r=dao
browser/base/content/browser.xul
browser/base/content/tabbrowser.xml
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -854,17 +854,16 @@
              iconsize="small" defaulticonsize="small" lockiconsize="true"
              aria-label="&tabsToolbar.label;"
              context="toolbar-context-menu"
              defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
              collapsed="true">
 
       <tabs id="tabbrowser-tabs"
             class="tabbrowser-tabs"
-            context="tabContextMenu"
             tabbrowser="content"
             flex="1"
             setfocus="false"
             tooltip="tabbrowser-tab-tooltip">
         <tab class="tabbrowser-tab" selected="true"/>
       </tabs>
 
       <toolbarbutton id="new-tab-button"
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2399,17 +2399,17 @@
         document.getElementById(this.getAttribute("tabbrowser"));
       </field>
 
       <field name="tabbox" readonly="true">
         this.tabbrowser.mTabBox;
       </field>
 
       <field name="contextMenu" readonly="true">
-        document.getElementById(this.getAttribute("context"));
+        document.getElementById("tabContextMenu");
       </field>
 
       <field name="mTabstripWidth">0</field>
 
       <field name="mTabstrip">
         document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox");
       </field>
 
@@ -2558,17 +2558,17 @@
               break;
           }
         ]]></body>
       </method>
 
       <field name="_animateElement">
         this.mTabstrip._scrollButtonDown;
       </field>
-      
+
       <method name="_notifyBackgroundTab">
         <parameter name="aTab"/>
         <body><![CDATA[
           if (aTab.pinned)
             return;
 
           var scrollRect = this.mTabstrip.scrollClientRect;
           var tab = aTab.getBoundingClientRect();
@@ -2781,17 +2781,17 @@
         dt.mozSetDataAt(TAB_DROP_TYPE, tab, 0);
         let uri = this.tabbrowser.getBrowserForTab(tab).currentURI;
         let spec = uri ? uri.spec : "about:blank";
 
         // We must not set text/x-moz-url or text/plain data here,
         // otherwise trying to deatch the tab by dropping it on the desktop
         // may result in an "internet shortcut"
         dt.mozSetDataAt("text/x-moz-text-internal", spec, 0);
-        
+
         // Set the cursor to an arrow during tab drags.
         dt.mozCursor = "default";
 
         let canvas = tabPreviews.capture(tab, false);
         dt.setDragImage(canvas, 0, 0);
         event.stopPropagation();
       ]]></handler>
 
@@ -3086,17 +3086,17 @@
   </binding>
 
   <binding id="tabbrowser-tab" display="xul:hbox"
            extends="chrome://global/content/bindings/tabbox.xml#tab">
     <resources>
       <stylesheet src="chrome://browser/content/tabbrowser.css"/>
     </resources>
 
-    <content closetabtext="&closeTab.label;">
+    <content context="tabContextMenu" closetabtext="&closeTab.label;">
       <xul:image xbl:inherits="validate,src=image"
                  class="tab-icon-image"
                  role="presentation"/>
       <xul:label flex="1"
                  xbl:inherits="value=label,crop,accesskey"
                  class="tab-text"
                  role="presentation"/>
       <xul:toolbarbutton anonid="close-button"