タブバーを自動的に隠す設定の時、タブバーを展開している間にウィンドウをリサイズするとタブバーの背景がウィンドウに合わせてリサイズされていなかったのを修正

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5606 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-12-24 15:01:23 +00:00
parent 85efda0a85
commit 7f86de1fcc

View File

@ -104,7 +104,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
sv.mTabBrowser.addEventListener('mousedown', this, true); sv.mTabBrowser.addEventListener('mousedown', this, true);
sv.mTabBrowser.addEventListener('mouseup', this, true); sv.mTabBrowser.addEventListener('mouseup', this, true);
sv.mTabBrowser.addEventListener('resize', this, true); window.addEventListener('resize', this, true);
sv.mTabBrowser.addEventListener('load', this, true); sv.mTabBrowser.addEventListener('load', this, true);
sv.mTabBrowser.mPanelContainer.addEventListener('scroll', this, true); sv.mTabBrowser.mPanelContainer.addEventListener('scroll', this, true);
if (this.shouldListenMouseMove) if (this.shouldListenMouseMove)
@ -130,7 +130,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
sv.mTabBrowser.removeEventListener('mousedown', this, true); sv.mTabBrowser.removeEventListener('mousedown', this, true);
sv.mTabBrowser.removeEventListener('mouseup', this, true); sv.mTabBrowser.removeEventListener('mouseup', this, true);
sv.mTabBrowser.removeEventListener('resize', this, true); window.removeEventListener('resize', this, true);
sv.mTabBrowser.removeEventListener('load', this, true); sv.mTabBrowser.removeEventListener('load', this, true);
sv.mTabBrowser.mPanelContainer.removeEventListener('scroll', this, true); sv.mTabBrowser.mPanelContainer.removeEventListener('scroll', this, true);
this.endListenMouseMove(); this.endListenMouseMove();
@ -542,6 +542,12 @@ TreeStyleTabBrowserAutoHide.prototype = {
try { try {
var v = sv.mTabBrowser.markupDocumentViewer; var v = sv.mTabBrowser.markupDocumentViewer;
if (this.shouldRedraw) { if (this.shouldRedraw) {
if (sv.mTabBrowser.hasAttribute(this.kTRANSPARENT) &&
sv.mTabBrowser.getAttribute(this.kTRANSPARENT) != this.kTRANSPARENT_STYLE[this.kTRANSPARENT_NONE])
this.drawBG();
else
this.clearBG();
v.move(window.outerWidth,window.outerHeight); v.move(window.outerWidth,window.outerHeight);
v.move( v.move(
( (
@ -555,16 +561,11 @@ TreeStyleTabBrowserAutoHide.prototype = {
0 0
) )
); );
if (sv.mTabBrowser.hasAttribute(this.kTRANSPARENT) &&
sv.mTabBrowser.getAttribute(this.kTRANSPARENT) != this.kTRANSPARENT_STYLE[this.kTRANSPARENT_NONE])
this.drawBG();
else
this.clearBG();
} }
else { else {
this.clearBG();
v.move(window.outerWidth,window.outerHeight); v.move(window.outerWidth,window.outerHeight);
v.move(0,0); v.move(0,0);
this.clearBG();
} }
} }
catch(e) { catch(e) {
@ -582,6 +583,9 @@ TreeStyleTabBrowserAutoHide.prototype = {
if (!this.tabbarCanvas || this.isResizing) return; if (!this.tabbarCanvas || this.isResizing) return;
this.tabbarCanvas.style.width = (this.tabbarCanvas.width = 1)+'px';
this.tabbarCanvas.style.height = (this.tabbarCanvas.height = 1)+'px';
var pos = sv.mTabBrowser.getAttribute(sv.kTABBAR_POSITION); var pos = sv.mTabBrowser.getAttribute(sv.kTABBAR_POSITION);
var frame = sv.mTabBrowser.contentWindow; var frame = sv.mTabBrowser.contentWindow;
@ -996,7 +1000,10 @@ TreeStyleTabBrowserAutoHide.prototype = {
{ {
if ( if (
!aEvent.originalTarget || !aEvent.originalTarget ||
aEvent.originalTarget.ownerDocument != document || (
aEvent.originalTarget.ownerDocument != document &&
aEvent.originalTarget != window
) ||
!this.shouldRedraw !this.shouldRedraw
) { ) {
return; return;