Brush up codes

This commit is contained in:
Piro / YUKI Hiroshi 2016-09-05 23:42:20 +09:00
parent bc0c05e1a5
commit ccbc8855e9

View File

@ -643,11 +643,12 @@ var TreeStyleTabWindowHelper = {
if (!scrollbox.__treestyletab__ensureElementIsVisible) { if (!scrollbox.__treestyletab__ensureElementIsVisible) {
scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible; scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible;
scrollbox.ensureElementIsVisible = function(...aArgs) { scrollbox.ensureElementIsVisible = function(...aArgs) {
if (b.treeStyleTab.shouldCancelEnsureElementIsVisible()) var treeStyleTab = gBrowser.treeStyleTab;
if (treeStyleTab.shouldCancelEnsureElementIsVisible())
return; return;
let shouldScrollNow = aArgs[1] === false; let shouldScrollNow = aArgs[1] === false;
if (b.treeStyleTab.animationEnabled && !shouldScrollNow) if (treeStyleTab.animationEnabled && !shouldScrollNow)
return b.treeStyleTab.scrollToTab(aArgs[0]); return treeStyleTab.scrollToTab(aArgs[0]);
scrollbox.__treestyletab__ensureElementIsVisible.call(this, ...aArgs); scrollbox.__treestyletab__ensureElementIsVisible.call(this, ...aArgs);
}; };
} }