ライブラリ更新

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4736 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-16 10:28:27 +00:00
parent cc1709b865
commit 1a6faa7e67

View File

@ -12,7 +12,7 @@
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/autoScroll.js http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/autoScroll.js
*/ */
(function() { (function() {
const currentRevision = 1; const currentRevision = 2;
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {}; if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
@ -50,7 +50,11 @@
var innerBoxObject = (box.localName == 'arrowscrollbox' ? box._scrollbox : box ).boxObject; var innerBoxObject = (box.localName == 'arrowscrollbox' ? box._scrollbox : box ).boxObject;
var orientBox = box || tabs; var orientBox = box || tabs;
var isVertical = (orientBox.getAttribute('orient') || window.getComputedStyle(orientBox, '').getPropertyValue('-moz-box-orient')) == 'vertical'; var isMultirow = tabs.getAttribute('flowing') == 'multibar'; // Tab Mix Plus
var isVertical = (
isMultirow ||
((orientBox.getAttribute('orient') || window.getComputedStyle(orientBox, '').getPropertyValue('-moz-box-orient')) == 'vertical')
);
var maxX = {}, maxY = {}, curX = {}, curY = {}; var maxX = {}, maxY = {}, curX = {}, curY = {};
boxObject.getScrolledSize(maxX, maxY); boxObject.getScrolledSize(maxX, maxY);
@ -59,6 +63,7 @@
var pixels; var pixels;
if (isVertical) { if (isVertical) {
pixels = tabs.childNodes[0].boxObject.height * 0.5; pixels = tabs.childNodes[0].boxObject.height * 0.5;
if (isMultirow) pixels *= 0.5;
if (aEvent.screenY < boxObject.screenY + this.getUpButtonHeight(b)) { if (aEvent.screenY < boxObject.screenY + this.getUpButtonHeight(b)) {
if (curY.value == 0) return false; if (curY.value == 0) return false;
pixels *= -1; pixels *= -1;
@ -108,8 +113,8 @@
getScrollBoxObject : function(aTabBrowser) getScrollBoxObject : function(aTabBrowser)
{ {
var box = this.getScrollBox(aTabBrowser); var box = this.getScrollBox(aTabBrowser);
return box.scrollBoxObject || return (box.scrollBoxObject || box.boxObject)
box.boxObject.QueryInterface(Ci.nsIScrollBoxObject); // Tab Mix Plus .QueryInterface(Ci.nsIScrollBoxObject); // Tab Mix Plus
}, },
getUpButton : function(aTabBrowser) getUpButton : function(aTabBrowser)