From 2e1c50ed90920c45069053ce015836b55e24ee98 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Sat, 6 Nov 2010 14:41:02 +0100 Subject: [PATCH] Backed out changeset 7ef7de3f34b1 (bug 594002) because of browser_480148.js failures on Linux. --- browser/base/content/tabbrowser.xml | 12 +---- .../content/test/browser_overflowScroll.js | 12 ++--- toolkit/content/widgets/scrollbox.xml | 48 ++----------------- 3 files changed, 9 insertions(+), 63 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index aba85dabe25..fdb9bb62fc8 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2708,20 +2708,12 @@ var width = 0; var scrollButtonWidth = this.getAttribute("overflow") != "true" ? 0 : this.mTabstrip._scrollButtonDown.scrollWidth; - var paddingStart = this.mTabstrip.scrollboxPaddingStart; - for (var i = this.tabbrowser._numPinnedTabs - 1; i >= 0; i--) { let tab = this.childNodes[i]; width += tab.scrollWidth; - if (this.getAttribute("overflow") != "true") - tab.style.MozMarginStart = - (width + scrollButtonWidth) + "px"; - else - tab.style.MozMarginStart = - (width + scrollButtonWidth + paddingStart) + "px"; + tab.style.MozMarginStart = - (width + scrollButtonWidth) + "px"; } - if (width == 0 || this.getAttribute("overflow") != "true") - this.style.MozMarginStart = width + "px"; - else - this.style.MozMarginStart = width + paddingStart + "px"; + this.style.MozMarginStart = width + "px"; this.mTabstrip.ensureElementIsVisible(this.selectedItem, false); ]]> diff --git a/browser/base/content/test/browser_overflowScroll.js b/browser/base/content/test/browser_overflowScroll.js index 3ce914eff84..fc899c123b3 100644 --- a/browser/base/content/test/browser_overflowScroll.js +++ b/browser/base/content/test/browser_overflowScroll.js @@ -46,16 +46,14 @@ function runOverflowTests(aEvent) { var element; gBrowser.selectedTab = firstScrollable(); - ok(left(scrollbox) <= left(firstScrollable()), "Selecting the first tab scrolls it into view " + - "(" + left(scrollbox) + " <= " + left(firstScrollable()) + ")"); + isLeft(firstScrollable(), "Selecting the first tab scrolls it into view"); element = nextRightElement(); EventUtils.synthesizeMouse(downButton, 1, 1, {}); isRight(element, "Scrolled one tab to the right with a single click"); gBrowser.selectedTab = tabs[tabs.length - 1]; - ok(right(gBrowser.selectedTab) <= right(scrollbox), "Selecting the last tab scrolls it into view " + - "(" + right(gBrowser.selectedTab) + " <= " + right(scrollbox) + ")"); + isRight(gBrowser.selectedTab, "Selecting the last tab scrolls it into view"); element = nextLeftElement(); EventUtils.synthesizeMouse(upButton, 1, 1, {}); @@ -66,13 +64,11 @@ function runOverflowTests(aEvent) { isLeft(element, "Scrolled one page of tabs with a double click"); EventUtils.synthesizeMouse(upButton, 1, 1, {clickCount: 3}); - var firstScrollableLeft = left(firstScrollable()); - ok(left(scrollbox) <= firstScrollableLeft, "Scrolled to the start with a triple click " + - "(" + left(scrollbox) + " <= " + firstScrollableLeft + ")"); + isLeft(firstScrollable(), "Scrolled to the start with a triple click"); for (var i = 2; i; i--) EventUtils.synthesizeMouseScroll(scrollbox, 1, 1, {axis: "horizontal", delta: -1}); - is(left(firstScrollable()), firstScrollableLeft, "Remained at the start with the mouse wheel"); + isLeft(firstScrollable(), "Remained at the start with the mouse wheel"); element = nextRightElement(); EventUtils.synthesizeMouseScroll(scrollbox, 1, 1, {axis: "horizontal", delta: 1}); diff --git a/toolkit/content/widgets/scrollbox.xml b/toolkit/content/widgets/scrollbox.xml index 466019a6033..e9b605d0f9f 100644 --- a/toolkit/content/widgets/scrollbox.xml +++ b/toolkit/content/widgets/scrollbox.xml @@ -26,10 +26,7 @@ collapsed="true" xbl:inherits="orient" oncommand="_autorepeatbuttonScroll(event);"/> - + - - - - - - + = (vertical ? scrollContentRect.bottom : scrollContentRect.right)) { - elementEnd = vertical ? scrollPaddingRect.bottom : scrollPaddingRect.right; - } - var amountToScroll; if (elementStart < containerStart) { @@ -582,10 +543,7 @@ onmouseup="if (event.button == 0) _stopScroll();" onmouseover="_continueScroll(-1);" onmouseout="_pauseScroll();"/> - +