diff --git a/mozilla/toolkit/content/widgets/tabbrowser.xml b/mozilla/toolkit/content/widgets/tabbrowser.xml index 3096863b0b0..d6f1389b8f2 100644 --- a/mozilla/toolkit/content/widgets/tabbrowser.xml +++ b/mozilla/toolkit/content/widgets/tabbrowser.xml @@ -22,6 +22,7 @@ - - Contributor(s): - David Hyatt (Original Author of ) + - Mike Connor - - Alternatively, the contents of this file may be used under the terms of - either the GNU General Public License Version 2 or later (the "GPL"), or @@ -56,7 +57,14 @@ - + + + + - this.mTabBox.firstChild + this.mTabBox.childNodes[1] this.mStrip.childNodes[2] - this.mTabBox.childNodes[1] + this.mTabBox.childNodes[2] + + + this.mTabContainer.childNodes document.getAnonymousNodes(this)[0] @@ -165,12 +176,19 @@ false - + +#ifdef XP_MACOSX + true +#else + false +#endif + + @@ -545,7 +563,7 @@ index) @@ -1198,11 +1224,16 @@ oldBrowser.destroy(); this.mTabContainer.removeChild(oldTab); - this.mPanelContainer.removeChild(this.mPanelContainer.childNodes[index]); + this.mPanelContainer.removeChild(oldBrowser.parentNode); this.selectedTab = this.mTabContainer.childNodes[newIndex]; - this.mPanelContainer.selectedIndex = newIndex; - + var i; + for (i = oldTab._tPos; i < this.mTabContainer.childNodes.length; i++) { + this.mTabContainer.childNodes[i]._tPos = i; + } + this.mTabBox.selectedPanel = this.getBrowserForTab(this.mCurrentTab).parentNode; + this.mCurrentTab.selected = true; + this.updateCurrentBrowser(); // see comment above destroy above @@ -1317,16 +1348,7 @@ @@ -1355,26 +1377,73 @@ readonly="true"/> - + + + + + - + + ' + aEvent.target.label + ''); + } + } + ]]> + + - + @@ -1384,30 +1453,49 @@ aXferData.data) + newIndex--; + if (newIndex != aXferData.data) + this.moveTabTo(this.mTabs[aXferData.data], newIndex); + } else { + var url = transferUtils.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType); - // valid urls don't contain spaces ' '; if we have a space it isn't a valid url. - // Also disallow dropping javascript: or data: urls--bail out - if (!url || !url.length || url.indexOf(" ", 0) != -1 || - /^\s*(javascript|data):/.test(url)) - return; + // valid urls don't contain spaces ' '; if we have a space it isn't a valid url. + // Also disallow dropping javascript: or data: urls--bail out + if (!url || !url.length || url.indexOf(" ", 0) != -1 || + /^\s*(javascript|data):/.test(url)) + return; - this.dragDropSecurityCheck(aEvent, aDragSession, url); + this.dragDropSecurityCheck(aEvent, aDragSession, url); - var bgLoad = this.mPrefs.getBoolPref("browser.tabs.loadInBackground"); + var bgLoad = this.mPrefs.getBoolPref("browser.tabs.loadInBackground"); - var tab = null; - if (aEvent.originalTarget.localName != "tab") { - // We're adding a new tab. - tab = this.addTab(getShortcutOrURI(url)); + var tab = null; + if (aEvent.originalTarget.localName != "tab") { + // We're adding a new tab. + tab = this.addTab(getShortcutOrURI(url)); + } + else { + // Load in an existing tab. + tab = aEvent.originalTarget; + this.getBrowserForTab(tab).loadURI(getShortcutOrURI(url)); + } + if (this.mCurrentTab != tab && !bgLoad) + this.selectedTab = tab; } - else { - // Load in an existing tab. - tab = aEvent.originalTarget; - this.getBrowserForTab(tab).loadURI(getShortcutOrURI(url)); - } - if (this.mCurrentTab != tab && !bgLoad) - this.selectedTab = tab; + ]]> + + + + + + + + @@ -1416,6 +1504,7 @@ - + + + + + + + + + + + + + this.mTabs[i].boxObject.x + this.mTabs[i].boxObject.width / 2) + return i; + } + + return this.mTabs.length; + ]]> + + + + + + + + + + + + + 0) { + this.moveTabTo(this.mCurrentTab, tabPos - 1); + this.mCurrentTab.focus(); + } + else if (this.arrowKeysShouldWrap) + this.moveTabToEnd(); + ]]> + + + + + + 0) { + this.moveTabTo(this.mCurrentTab, 0); + this.mCurrentTab.focus(); + } + ]]> + + + + + + + + + + + + + + + + @@ -1719,10 +1946,16 @@ diff --git a/mozilla/toolkit/themes/pinstripe/global/browser.css b/mozilla/toolkit/themes/pinstripe/global/browser.css index c88b620dbaf..30275274893 100644 --- a/mozilla/toolkit/themes/pinstripe/global/browser.css +++ b/mozilla/toolkit/themes/pinstripe/global/browser.css @@ -162,4 +162,24 @@ background: url("chrome://global/skin/10pct_transparent_pixel.png") repeat; tabbrowser > tabbox > tabpanels { -moz-appearance: none !important; -} \ No newline at end of file +} + +#tab-drop-indicator-bar { + display:none; + height: 9px; + margin-top: -9px; + position: relative; +} + +#tab-drop-indicator { + height: 9px; + width: 9px; + margin-bottom: -5px; + position: relative; + background: url('chrome://global/skin/tabDragDrop/tabDragIndicator.png') 50% 50% no-repeat; +} + +#tab-drop-indicator-bar[dragging="true"] { + display: -moz-box; +} + diff --git a/mozilla/toolkit/themes/pinstripe/global/jar.mn b/mozilla/toolkit/themes/pinstripe/global/jar.mn index 08e4618c871..43518bc3a43 100644 --- a/mozilla/toolkit/themes/pinstripe/global/jar.mn +++ b/mozilla/toolkit/themes/pinstripe/global/jar.mn @@ -121,6 +121,7 @@ classic.jar: + skin/classic/global/menulist/menulist-arrow-dis.gif (menulist/menulist-arrow-dis.gif) + skin/classic/global/menulist/menulist-arrow.gif (menulist/menulist-arrow.gif) + skin/classic/global/splitter/dimple.png (splitter/dimple.png) ++ skin/classic/global/tabDragDrop/tabDragIndicator.png (tabDragDrop/tabDragIndicator.png) + skin/classic/global/toolbar/Lighten.png (toolbar/Lighten.png) + skin/classic/global/toolbar/spring.gif (toolbar/spring.gif) + skin/classic/global/toolbar/toolbar-pinstripe-overlay.png (toolbar/toolbar-pinstripe-overlay.png) diff --git a/mozilla/toolkit/themes/pinstripe/global/tabDragDrop/tabDragIndicator.png b/mozilla/toolkit/themes/pinstripe/global/tabDragDrop/tabDragIndicator.png new file mode 100755 index 00000000000..6a18e78e5e3 Binary files /dev/null and b/mozilla/toolkit/themes/pinstripe/global/tabDragDrop/tabDragIndicator.png differ diff --git a/mozilla/toolkit/themes/winstripe/global/browser.css b/mozilla/toolkit/themes/winstripe/global/browser.css index fb7e68243dc..786ce299ce1 100644 --- a/mozilla/toolkit/themes/winstripe/global/browser.css +++ b/mozilla/toolkit/themes/winstripe/global/browser.css @@ -46,6 +46,25 @@ tab { margin-bottom: 1px; } +#tab-drop-indicator-bar { + display:none; + height: 9px; + margin-top: -9px; + position: relative; +} + +#tab-drop-indicator { + height: 9px; + width: 9px; + margin-bottom: -5px; + position: relative; + background: url('chrome://global/skin/tabDragDrop/tabDragIndicator.png') 50% 50% no-repeat; +} + +#tab-drop-indicator-bar[dragging="true"] { + display: -moz-box; +} + browsermessage { background-color: InfoBackground; color: InfoText; diff --git a/mozilla/toolkit/themes/winstripe/global/jar.mn b/mozilla/toolkit/themes/winstripe/global/jar.mn index 7a1536a0232..472a5f7b010 100644 --- a/mozilla/toolkit/themes/winstripe/global/jar.mn +++ b/mozilla/toolkit/themes/winstripe/global/jar.mn @@ -98,6 +98,7 @@ classic.jar: skin/classic/global/radio/radio-check.gif (radio/radio-check.gif) skin/classic/global/radio/radio-check-dis.gif (radio/radio-check-dis.gif) skin/classic/global/scrollbar/slider.gif (scrollbar/slider.gif) + skin/classic/global/tabDragDrop/tabDragIndicator.png (tabDragDrop/tabDragIndicator.png) skin/classic/global/toolbar/chevron.gif (toolbar/chevron.gif) skin/classic/global/toolbar/Lighten.png (toolbar/Lighten.png) skin/classic/global/toolbar/spring.gif (toolbar/spring.gif) diff --git a/mozilla/toolkit/themes/winstripe/global/tabDragDrop/tabDragIndicator.png b/mozilla/toolkit/themes/winstripe/global/tabDragDrop/tabDragIndicator.png new file mode 100755 index 00000000000..6a18e78e5e3 Binary files /dev/null and b/mozilla/toolkit/themes/winstripe/global/tabDragDrop/tabDragIndicator.png differ