Output more debug log

This commit is contained in:
YUKI Hiroshi 2016-06-02 18:49:02 +09:00
parent 1b9f229aad
commit a1fde612d3

View File

@ -2285,6 +2285,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
updateTabbarOverflow : function TSTBrowser_updateTabbarOverflow() updateTabbarOverflow : function TSTBrowser_updateTabbarOverflow()
{ {
log('updateTabbarOverflow');
var d = this.document; var d = this.document;
var b = this.mTabBrowser; var b = this.mTabBrowser;
b.mTabContainer.removeAttribute('overflow'); b.mTabContainer.removeAttribute('overflow');
@ -2295,8 +2296,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
var scrollBox = this.scrollBox; var scrollBox = this.scrollBox;
scrollBox = d.getAnonymousElementByAttribute(scrollBox, 'anonid', 'scrollbox'); scrollBox = d.getAnonymousElementByAttribute(scrollBox, 'anonid', 'scrollbox');
if (scrollBox) if (scrollBox) {
scrollBox = d.getAnonymousNodes(scrollBox)[0]; scrollBox = d.getAnonymousNodes(scrollBox)[0];
log('scrollBox.width='+scrollBox.boxObject.width+' > container.width='+container.boxObject.width);
log('scrollBox.height='+scrollBox.boxObject.height+' > container.height='+container.boxObject.height);
}
if ( if (
scrollBox && scrollBox &&
( (
@ -2304,11 +2308,13 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
scrollBox.boxObject.height > container.boxObject.height scrollBox.boxObject.height > container.boxObject.height
) )
) { ) {
log(' => overflow');
b.mTabContainer.setAttribute('overflow', true); b.mTabContainer.setAttribute('overflow', true);
if (container != b.mTabContainer) if (container != b.mTabContainer)
container.setAttribute('overflow', true); container.setAttribute('overflow', true);
} }
else { else {
log(' => underflow');
b.mTabContainer.removeAttribute('overflow'); b.mTabContainer.removeAttribute('overflow');
if (container != b.mTabContainer) if (container != b.mTabContainer)
container.removeAttribute('overflow'); container.removeAttribute('overflow');