[JAEGER] Merge from tracemonkey.
authorDavid Mandelin <dmandelin@mozilla.com>
Wed, 11 Aug 2010 11:27:07 -0700
changeset 53383 82c410fffaa85e2469c653a130445ec206d0ee87
parent 53382 25bff33134218bafd3ca0d2fa38778765e2417be (current diff)
parent 49188 fb0c72c4bfb3f60d9f272e89bc0cf3055ef23306 (diff)
child 53384 645e9f78e67a610b03211200604169eb2ac270b9
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b4pre
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
[JAEGER] Merge from tracemonkey.
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -138,17 +138,17 @@
       <menuseparator/>
       <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
                 oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
       <menuitem id="context_undoCloseTab"
                 label="&undoCloseTab.label;"
                 accesskey="&undoCloseTab.accesskey;"
                 observes="History:UndoCloseTab"/>
       <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
-                oncommand="gBrowser.removeTab(TabContextMenu.contextTab);"/>
+                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
     </menupopup>
 
     <menupopup id="backForwardMenu"
                onpopupshowing="return FillHistoryMenu(event.target);"
                oncommand="gotoHistoryIndex(event);"
                onclick="checkForMiddleClick(this, event);"/>
     <tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
 
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2987,16 +2987,25 @@
             let newTab = this.tabbrowser.duplicateTab(draggedTab);
             this.tabbrowser.moveTabTo(newTab, newIndex);
             if (draggedTab.parentNode != this || event.shiftKey)
               this.selectedItem = newTab;
           } else {
             // move the dropped tab
             if (newIndex > draggedTab._tPos)
               newIndex--;
+
+            if (draggedTab.pinned) {
+              if (newIndex >= this.tabbrowser._numPinnedTabs)
+                this.tabbrowser.unpinTab(draggedTab);
+            } else {
+              if (newIndex <= this.tabbrowser._numPinnedTabs - 1)
+                this.tabbrowser.pinTab(draggedTab);
+            }
+
             this.tabbrowser.moveTabTo(draggedTab, newIndex);
           }
         } else if (draggedTab) {
           // swap the dropped tab with a new one we create and then close
           // it in the other window (making it seem to have moved between
           // windows)
           let newIndex = this._getDropIndex(event);
           let newTab = this.tabbrowser.addTab("about:blank");
--- a/browser/base/content/test/browser_bug380960.js
+++ b/browser/base/content/test/browser_bug380960.js
@@ -47,17 +47,17 @@ function nextAsyncText() {
 
   var gotCloseEvent = false;
 
   tab.addEventListener("TabClose", function () {
     info("got TabClose event");
     gotCloseEvent = true;
 
     const DEFAULT_ANIMATION_LENGTH = 250;
-    const MAX_WAIT_TIME = DEFAULT_ANIMATION_LENGTH * 5;
+    const MAX_WAIT_TIME = DEFAULT_ANIMATION_LENGTH * 7;
     var polls = Math.ceil(MAX_WAIT_TIME / DEFAULT_ANIMATION_LENGTH);
     var pollTabRemoved = setInterval(function () {
       --polls;
       if (tab.parentNode && polls > 0)
         return;
       clearInterval(pollTabRemoved);
 
       is(tab.parentNode, null, "tab removed after at most " + MAX_WAIT_TIME + " ms");
--- a/browser/themes/winstripe/browser/browser-aero.css
+++ b/browser/themes/winstripe/browser/browser-aero.css
@@ -4,22 +4,19 @@
 
 %define customToolbarColor rgb(227,237,246)
 
 @media all and (-moz-windows-default-theme) {
   #navigator-toolbox > toolbar:not(:-moz-lwtheme) {
     background-color: @customToolbarColor@;
   }
 
-  #navigator-toolbox[tabsontop="true"] > #TabsToolbar > #tabbrowser-tabs > .tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
-    background-image: -moz-radial-gradient(center top, white, rgba(255,255,255,0) 60%),
-                      -moz-linear-gradient(left, transparent, transparent 1px,
-                                                 @toolbarHighlight@ 1px, @toolbarHighlight@),
-                      -moz-linear-gradient(left, transparent, transparent 1px,
-                                                 @customToolbarColor@ 1px, @customToolbarColor@);
+  .tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
+    background-image: -moz-linear-gradient(rgba(255,255,255,.7), @toolbarHighlight@ 30%),
+                      -moz-linear-gradient(@customToolbarColor@, @customToolbarColor@);
   }
 }
 
 @media all and (-moz-windows-compositor) {
   #main-window:not(:-moz-lwtheme) {
     -moz-appearance: -moz-win-glass;
     background: transparent;
   }
@@ -87,25 +84,23 @@
 
   #urlbar[focused="true"],
   .searchbar-textbox[focused="true"] {
     background-color: white;
   }
 
   .tabbrowser-tab:not(:-moz-lwtheme):not([selected="true"]),
   .tabs-newtab-button:not(:-moz-lwtheme) {
-    background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                                 rgba(255,255,255,.4) 1px, rgba(255,255,255,.4));
+    background-image: -moz-linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,75%,.4) 50%);
     text-shadow: 0 1px 0 rgba(255,255,255,.4);
   }
 
   .tabbrowser-tab:not(:-moz-lwtheme):not([selected="true"]):hover,
   .tabs-newtab-button:not(:-moz-lwtheme):hover {
-    background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                                 rgba(255,255,255,.6) 1px, rgba(255,255,255,.6));
+    background-image: -moz-linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,75%,.6) 50%);
   }
 
   #allTabs-panel,
   #ctrlTab-panel {
     background: transparent;
     -moz-appearance: -moz-win-glass;
     -moz-border-radius: 0;
     border: none;
--- a/browser/themes/winstripe/browser/browser.css
+++ b/browser/themes/winstripe/browser/browser.css
@@ -1119,80 +1119,62 @@ richlistitem[type="action"][actiontype="
 .tabbrowser-tabs:not([overflow="true"]) {
   -moz-margin-start: 3px;
 }
 
 /* Tabs */
 .tabbrowser-tab,
 .tabs-newtab-button {
   -moz-appearance: none;
-  background: -moz-linear-gradient(left, transparent, transparent 1px,
-                                         rgba(50%,50%,50%,.1) 1px, rgba(50%,50%,50%,.1));
-  background-position: -6px -2px;
+  background: -moz-linear-gradient(hsla(0,0%,50%,.1), hsla(0,0%,37%,.1) 50%);
+  background-position: -5px -2px;
   background-repeat: no-repeat;
   background-size: 200%;
   margin: 0;
   padding: 0;
   -moz-border-image: url(tabbrowser/tab.png) 4 5 3 6 / 4px 5px 3px 6px;
   -moz-border-radius: 10px 8px 0 0;
 }
 
 .tabbrowser-tab:hover,
 .tabs-newtab-button:hover {
-  background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                               rgba(255,255,255,.4) 1px, rgba(255,255,255,.4));
+  background-image: -moz-linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,75%,.4) 50%);
+}
+
+.tabbrowser-tab[selected="true"] {
+  background-image: -moz-linear-gradient(rgba(255,255,255,.7), @toolbarHighlight@ 30%),
+                    -moz-linear-gradient(-moz-dialog, -moz-dialog);
 }
 
-.tabbrowser-tab:-moz-lwtheme-brighttext,
+.tabbrowser-tab:-moz-lwtheme {
+  color: inherit;
+}
+
+.tabbrowser-tab[selected="true"]:-moz-lwtheme {
+  background-image: -moz-linear-gradient(rgba(255,255,255,.7), @toolbarHighlight@ 30%);
+}
+
+.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]),
 .tabs-newtab-button:-moz-lwtheme-brighttext {
-  background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                               rgba(40%,40%,40%,.6) 1px, rgba(40%,40%,40%,.6));
+  background-image: -moz-linear-gradient(hsla(0,0%,40%,.6), hsla(0,0%,30%,.6) 50%);
 }
 
 .tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover,
 .tabs-newtab-button:-moz-lwtheme-brighttext:hover {
-  background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                               rgba(60%,60%,60%,.6) 1px, rgba(60%,60%,60%,.6));
+  background-image: -moz-linear-gradient(hsla(0,0%,60%,.6), hsla(0,0%,45%,.6) 50%);
 }
 
-.tabbrowser-tab:-moz-lwtheme-darktext,
+.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]),
 .tabs-newtab-button:-moz-lwtheme-darktext {
-  background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                               rgba(60%,60%,60%,.5) 1px, rgba(60%,60%,60%,.5));
+  background-image: -moz-linear-gradient(hsla(0,0%,60%,.5), hsla(0,0%,45%,.5) 50%);
 }
 
 .tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover,
 .tabs-newtab-button:-moz-lwtheme-darktext:hover {
-  background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                               rgba(80%,80%,80%,.5) 1px, rgba(80%,80%,80%,.5));
-}
-
-.tabbrowser-tab[selected="true"]:-moz-lwtheme {
-  background-image: -moz-linear-gradient(left, transparent, transparent 1px,
-                                               @toolbarHighlight@ 1px, @toolbarHighlight@);
-}
-
-#tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
-  background-image: -moz-linear-gradient(left, transparent, transparent 1px, white 1px, white);
-  color: black;
-}
-
-#tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
-  background-image: -moz-radial-gradient(center top, white, rgba(255,255,255,0) 60%),
-                    -moz-linear-gradient(left, transparent, transparent 1px,
-                                               @toolbarHighlight@ 1px, @toolbarHighlight@),
-                    -moz-linear-gradient(left, transparent, transparent 1px,
-                                               -moz-dialog 1px, -moz-dialog);
-  background-position: center -2px, -6px -2px, -6px -2px;
-  background-size: 100%, 200%, 200%;
-  color: -moz-dialogText;
-}
-
-.tabbrowser-tab:-moz-lwtheme {
-  color: inherit;
+  background-image: -moz-linear-gradient(hsla(0,0%,80%,.5), hsla(0,0%,60%,.5) 50%);
 }
 
 .tabbrowser-tab[busy] > .tab-icon-image {
   list-style-image: url("chrome://browser/skin/tabbrowser/progress.png") !important;
   -moz-image-region: rect(0, 16px, 16px, 0);
 }
 .tabbrowser-tab[busy][stalled] > .tab-icon-image {
   list-style-image: url("chrome://browser/skin/tabbrowser/progress-pulsing.png") !important;