don't call positionPinnedTabs() too many times

This commit is contained in:
SHIMODA Hiroshi 2010-12-07 19:22:41 +09:00
parent 961460cb0d
commit 30608ffdf7

View File

@ -237,8 +237,12 @@ TreeStyleTabBrowser.prototype = {
}, },
positionPinnedTabsWithDelay : function TSTBrowser_positionPinnedTabsWithDelay() positionPinnedTabsWithDelay : function TSTBrowser_positionPinnedTabsWithDelay()
{ {
window.setTimeout(function(aSelf) { if (this.positionPinnedTabsWithDelayTimer)
return;
this.positionPinnedTabsWithDelay = window.setTimeout(function(aSelf) {
aSelf.positionPinnedTabs(); aSelf.positionPinnedTabs();
aSelf.positionPinnedTabsWithDelay = null;
}, 0, this); }, 0, this);
}, },
PINNED_TAB_DEFAULT_WIDTH : 24, PINNED_TAB_DEFAULT_WIDTH : 24,