Index: browser/themes/pinstripe/browser/browser.css
===================================================================
RCS file: /cvsroot/mozilla/browser/themes/pinstripe/browser/browser.css,v
retrieving revision 1.70
diff -U 8 -p -r1.70 browser.css
--- browser/themes/pinstripe/browser/browser.css 31 Aug 2007 20:19:20 -0000 1.70
+++ browser/themes/pinstripe/browser/browser.css 3 Sep 2007 13:56:32 -0000
@@ -1228,20 +1228,16 @@ toolbarbutton.chevron > .toolbarbutton-m
}
.openintabs-menuitem {
list-style-image: none;
}
/* ::::: tabbrowser ::::: */
-.tabs-left {
- display: none !important;
-}
-
.tabbrowser-tab:not([selected="true"]):hover {
background: url("chrome://browser/skin/tabbrowser/tabbrowser-tabs-bkgnd.png") repeat-x;
}
.tabbrowser-tab:hover > .tab-image-middle > .tab-icon > .tab-extra-status {
background: none;
}
@@ -1295,20 +1291,16 @@ toolbarbutton.chevron > .toolbarbutton-m
.tabbrowser-tab:focus > .tab-image-middle > .tab-text {
border: 1.4pt solid -moz-mac-focusring;
}
.tabbrowser-tab[selected="true"], .tabbrowser-tab:hover {
color: #000000;
}
-.tabbrowser-tab[first-tab="true"] > .tab-image-left {
- margin-left: 3px !important;
-}
-
.tab-image-left, .tab-image-right {
width: 8px;
margin: 0px;
padding: 0px;
}
.tabbrowser-tab > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-right.png") no-repeat;
@@ -1392,42 +1384,61 @@ toolbarbutton.chevron > .toolbarbutton-m
.tabs-bottom {
border: none;
height: 4px !important;
background: url("chrome://browser/skin/tabbrowser/tabs-bottom-bg.png") repeat !important;
margin: 0px !important;
}
+.tabs-left {
+ display: -moz-box;
+ width: 3px;
+}
+
+.tabbrowser-tabs[overflow="true"] .tabs-left {
+ display: none;
+}
+
tabbrowser > tabbox > tabpanels {
-moz-appearance: none !important;
}
+/**
+ * Tab Drag and Drop
+ */
+
.tab-drop-indicator-bar {
- visibility: hidden;
- height: 9px;
- margin-top: -9px;
- position: relative;
+ height: 10px;
+ margin-top: -10px;
+ position: relative;
}
-.tab-drop-indicator {
- height: 9px;
- width: 9px;
- margin-bottom: -5px;
- position: relative;
- background: url('chrome://browser/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
+.tab-drop-indicator-bar[chromedir="ltr"] {
+ /* set margin-left to -half indicator width: */
+ margin-left: -4px;
}
-.tab-drop-indicator-bar[dragging="true"] {
- visibility: visible;
+.tab-drop-indicator-bar[chromedir="rtl"] {
+ /* set margin-right to -half indicator width: */
+ margin-right: -4px;
+}
+
+.tab-drop-indicator {
+ height: 10px;
+ width: 8px;
+ margin-bottom: -5px;
+ position: relative;
+ background: url('chrome://browser/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
}
/**
* In-tab close button
*/
+
.tab-close-button > .toolbarbutton-icon {
-moz-margin-end: 0px !important;
margin-top: 2px;
}
.tab-close-button {
list-style-image: url("chrome://global/skin/icons/closetab.png");
-moz-appearance: none;
Index: browser/themes/winstripe/browser/browser.css
===================================================================
RCS file: /cvsroot/mozilla/browser/themes/winstripe/browser/browser.css,v
retrieving revision 1.85
diff -U 8 -p -r1.85 browser.css
--- browser/themes/winstripe/browser/browser.css 31 Aug 2007 20:19:20 -0000 1.85
+++ browser/themes/winstripe/browser/browser.css 3 Sep 2007 13:56:38 -0000
@@ -1407,32 +1407,37 @@ tabpanels {
border: 1px dotted -moz-DialogText;
}
/**
* Tab Drag and Drop
*/
.tab-drop-indicator-bar {
- visibility: hidden;
- height: 9px;
- margin-top: -9px;
- position: relative;
+ height: 11px;
+ margin-top: -11px;
+ position: relative;
}
-.tab-drop-indicator {
- height: 9px;
- width: 9px;
- margin-bottom: -5px;
- position: relative;
- background: url('chrome://browser/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
+.tab-drop-indicator-bar[chromedir="ltr"] {
+ /* set margin-left to -half indicator width: */
+ margin-left: -5px;
+}
+
+.tab-drop-indicator-bar[chromedir="rtl"] {
+ /* set margin-right to -half indicator width: */
+ margin-right: -5px;
}
-.tab-drop-indicator-bar[dragging="true"] {
- visibility: visible;
+.tab-drop-indicator {
+ height: 11px;
+ width: 11px;
+ margin-bottom: -5px;
+ position: relative;
+ background: url('chrome://browser/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
}
/**
* In-tab close button
*/
.tab-close-button > .toolbarbutton-icon {
-moz-margin-end: 0px !important;
margin-top: 1px;
Index: browser/base/content/tabbrowser.xml
===================================================================
RCS file: /cvsroot/mozilla/browser/base/content/tabbrowser.xml,v
retrieving revision 1.240
diff -U 8 -p -r1.240 tabbrowser.xml
--- browser/base/content/tabbrowser.xml 26 Aug 2007 09:17:54 -0000 1.240
+++ browser/base/content/tabbrowser.xml 3 Sep 2007 13:56:53 -0000
@@ -61,17 +61,17 @@
-
+
@@ -1744,24 +1744,25 @@
= aDragSession.sourceNode.boxObject.screenX &&
aEvent.screenX <= (aDragSession.sourceNode.boxObject.screenX +
aDragSession.sourceNode.boxObject.width)))
- return false;
+ return false;
return true;
]]>
0
350
+
= this.mDragTime + this.mDragOverDelay)
this.mTabContainer.selectedItem = aEvent.target;
return;
}
var newIndex = this.getNewIndex(aEvent);
-
var ib = this.mTabDropIndicatorBar;
var ind = ib.firstChild;
- ib.setAttribute('dragging',
- aDragSession.canDrop ? 'true' : 'false');
-
var tabStripBoxObject = tabStrip.scrollBoxObject;
- var halfIndWidth = Math.floor((ind.boxObject.width + 1) / 2);
- if (window.getComputedStyle(this.parentNode, null)
- .direction == "ltr") {
- var newMarginLeft;
- var minMarginLeft = tabStripBoxObject.x - halfIndWidth -
- ib.boxObject.x;
- // make sure we don't place the tab drop indicator past the
- // edge, or the containing box will flex and stretch
- // the tab drop indicator bar, which will flex the url bar.
- // XXX todo
- // just use first value if you can figure out how to get
- // the tab drop indicator to crop instead of flex and stretch
- // the tab drop indicator bar.
- var maxMarginLeft = Math.min(
- (minMarginLeft + tabStripBoxObject.width),
- (ib.boxObject.x + ib.boxObject.width - ind.boxObject.width));
-
+ var minMargin = tabStripBoxObject.x - this.boxObject.x;
+ // make sure we don't place the tab drop indicator past the
+ // edge, or the containing box will flex and stretch
+ // the tab drop indicator bar, which will flex the url bar.
+ // XXX todo
+ // just use first value if you can figure out how to get
+ // the tab drop indicator to crop instead of flex and stretch
+ // the tab drop indicator bar.
+ var maxMargin = Math.min(minMargin + tabStripBoxObject.width,
+ ib.boxObject.x + ib.boxObject.width -
+ ind.boxObject.width);
+ var newMargin, tabBoxObject;
+ var ltr = (window.getComputedStyle(this.parentNode, null).direction
+ == "ltr");
+ if (pixelsToScroll) {
// if we are scrolling, put the drop indicator at the edge
// so that it doesn't jump while scrolling
- if (pixelsToScroll > 0)
- newMarginLeft = maxMarginLeft;
- else if (pixelsToScroll < 0)
- newMarginLeft = minMarginLeft;
- else {
+ newMargin = (pixelsToScroll > 0) ? maxMargin : minMargin;
+ }
+ else {
if (newIndex == this.mTabs.length) {
- newMarginLeft = this.mTabs[newIndex-1].boxObject.screenX +
- this.mTabs[newIndex-1].boxObject.width -
- this.boxObject.screenX - halfIndWidth;
- } else {
- newMarginLeft = this.mTabs[newIndex].boxObject.screenX -
- this.boxObject.screenX - halfIndWidth;
- }
-
- // ensure we never place the drop indicator beyond
- // our limits
- if (newMarginLeft < minMarginLeft)
- newMarginLeft = minMarginLeft;
- else if (newMarginLeft > maxMarginLeft)
- newMarginLeft = maxMarginLeft;
+ tabBoxObject = this.mTabs[newIndex-1].boxObject;
+ if (ltr)
+ newMargin = tabBoxObject.screenX - this.boxObject.screenX
+ + tabBoxObject.width;
+ else
+ newMargin = this.boxObject.screenX - tabBoxObject.screenX
+ + this.boxObject.width;
}
- ind.style.marginLeft = newMarginLeft + 'px';
- } else {
- var newMarginRight;
- var minMarginRight = tabStripBoxObject.x - halfIndWidth -
- ib.boxObject.x;
- // make sure we don't place the tab drop indicator past the
- // edge, or the containing box will flex and stretch
- // the tab drop indicator bar, which will flex the url bar.
- // XXX todo
- // just use first value if you can figure out how to get
- // the tab drop indicator to crop instead of flex and stretch
- // the tab drop indicator bar.
- var maxMarginRight = Math.min(
- (minMarginRight + tabStripBoxObject.width),
- (ib.boxObject.x + ib.boxObject.width - ind.boxObject.width));
-
- // if we are scrolling, put the drop indicator at the edge
- // so that it doesn't jump while scrolling
- if (pixelsToScroll > 0)
- newMarginRight = maxMarginRight;
- else if (pixelsToScroll < 0)
- newMarginRight = minMarginRight;
else {
- if (newIndex == this.mTabs.length) {
- newMarginRight = this.boxObject.width +
- this.boxObject.screenX -
- this.mTabs[newIndex-1].boxObject.screenX -
- halfIndWidth;
- } else {
- newMarginRight = this.boxObject.width +
- this.boxObject.screenX -
- this.mTabs[newIndex].boxObject.screenX -
- this.mTabs[newIndex].boxObject.width -
- halfIndWidth;
- }
-
- // ensure we never place the drop indicator beyond
- // our limits
- if (newMarginRight < minMarginRight)
- newMarginRight = minMarginRight;
- else if (newMarginRight > maxMarginRight)
- newMarginRight = maxMarginRight;
+ tabBoxObject = this.mTabs[newIndex].boxObject;
+ if (ltr)
+ newMargin = tabBoxObject.screenX - this.boxObject.screenX;
+ else
+ newMargin = this.boxObject.screenX - tabBoxObject.screenX
+ + this.boxObject.width - tabBoxObject.width;
}
- ind.style.marginRight = newMarginRight + 'px';
+ // ensure we never place the drop indicator beyond our limits
+ if (newMargin < minMargin)
+ newMargin = minMargin;
+ else if (newMargin > maxMargin)
+ newMargin = maxMargin;
}
+
+ if (ltr)
+ ind.style.marginLeft = newMargin + 'px';
+ else
+ ind.style.marginRight = newMargin + 'px';
+
+ ib.collapsed = !aDragSession.canDrop;
]]>
@@ -1954,24 +1916,17 @@
aDragSession.sourceNode.parentNode == this.mTabContainer &&
aDragSession.canDrop) {
var target = aEvent.relatedTarget;
while (target && target != this.mStrip)
target = target.parentNode;
if (target)
return;
}
- this.mTabDropIndicatorBar.setAttribute('dragging','false');
-
- // FIXME: bug 390979 - we need to reset the horizontal margins on the
- // tab-drop indicator here to avoid impacting tabbar resizing. This
- // shouldn't be necessary once we can collapse the indicator.
- var dropIndicator = this.mTabDropIndicatorBar.firstChild;
- dropIndicator.style.marginRight = "0px";
- dropIndicator.style.marginLeft = "0px";
+ this.mTabDropIndicatorBar.collapsed = true;
]]>