From 472a2979e7abc7f3ce211d13a6dd539fb1d565bb Mon Sep 17 00:00:00 2001 From: Frank Yan Date: Wed, 23 Jun 2010 10:28:12 -0700 Subject: [PATCH] Bug 565783: Eliminate bounce when scrolling tab bar. r=enndeakin,dolske --- .../content/test/browser_overflowScroll.js | 6 +- .../tests/widgets/test_mousescroll.xul | 61 ++++++++++--------- toolkit/content/widgets/scrollbox.xml | 26 ++++++-- 3 files changed, 59 insertions(+), 34 deletions(-) diff --git a/browser/base/content/test/browser_overflowScroll.js b/browser/base/content/test/browser_overflowScroll.js index 4412a4e2ea61..c27e30cbb003 100644 --- a/browser/base/content/test/browser_overflowScroll.js +++ b/browser/base/content/test/browser_overflowScroll.js @@ -64,8 +64,12 @@ function runOverflowTests(aEvent) { EventUtils.synthesizeMouse(upButton, 0, 0, {clickCount: 3}); isLeft(tabContainer.firstChild, "Scrolled to the start with a triple click"); + for (var i = 2; i; i--) + EventUtils.synthesizeMouseScroll(scrollbox, 0, 0, {axis: "horizontal", delta: -1}); + isLeft(tabContainer.firstChild, "Remained at the start with the mouse wheel"); + element = nextRightElement(); - EventUtils.synthesizeMouseScroll(scrollbox, 0, 0, {delta: 1}); + EventUtils.synthesizeMouseScroll(scrollbox, 0, 0, {axis: "horizontal", delta: 1}); isRight(element, "Scrolled one tab to the right with the mouse wheel"); while (tabContainer.childNodes.length > 1) diff --git a/toolkit/content/tests/widgets/test_mousescroll.xul b/toolkit/content/tests/widgets/test_mousescroll.xul index 4bfa5e6172eb..99528c1aa753 100644 --- a/toolkit/content/tests/widgets/test_mousescroll.xul +++ b/toolkit/content/tests/widgets/test_mousescroll.xul @@ -29,7 +29,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=378028 - + @@ -40,7 +40,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=378028 - + @@ -54,7 +54,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=378028 - + @@ -68,7 +68,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=378028 - +