From eb5e8e85a45e8497ffdf5c5df78014e085eff0bf Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Thu, 15 Sep 2005 23:54:40 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20305730:=20Support=20page=20up/down=20in?= =?UTF-8?q?=20richlistbox,=20patch=20by=20Simon=20B=C3=BCnzli=20,=20r=3Dmconnor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@180332 18797224-902f-48f8-a5cc-f745e15eee43 --- .../toolkit/content/widgets/richlistbox.xml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/mozilla/toolkit/content/widgets/richlistbox.xml b/mozilla/toolkit/content/widgets/richlistbox.xml index 05dc9d30134..5eb75885988 100644 --- a/mozilla/toolkit/content/widgets/richlistbox.xml +++ b/mozilla/toolkit/content/widgets/richlistbox.xml @@ -314,6 +314,70 @@ + + + + = y.value) && + (aItem.boxObject.y < y.value + this.scrollBoxObject.height); + ]]> + + + + + + + = 0 && index >= 0 && index < this.getRowCount()) { + var actualIndex = (index && aDirection == -1) ? index - 1 : index; + height -= this.getItemAtIndex(actualIndex).boxObject.height; + index += aDirection; + } + index -= aDirection; + + if (this.selectedItem != index) { + this.selectedItem = this.getItemAtIndex(index); + return true; + } + + // Move by at least one item if the view port is too small + if (aDirection == -1) + return this.goUp(); + + return this.goDown(); + ]]> + + + @@ -394,6 +458,8 @@ + +