reduce event listener methods

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-01-22 12:33:29 +09:00
parent 0b8a4070c5
commit dbbdc42aca

View File

@ -399,7 +399,6 @@ TreeStyleTabBrowser.prototype = {
window.addEventListener('resize', this, true); window.addEventListener('resize', this, true);
window.addEventListener('beforecustomization', this, true); window.addEventListener('beforecustomization', this, true);
window.addEventListener('aftercustomization', this, false); window.addEventListener('aftercustomization', this, false);
window.addEventListener('customizationchange', this, false);
window.addEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_ENTERED, this, false); window.addEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_ENTERED, this, false);
window.addEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_EXITED, this, false); window.addEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_EXITED, this, false);
@ -1642,7 +1641,6 @@ TreeStyleTabBrowser.prototype = {
window.removeEventListener('resize', this, true); window.removeEventListener('resize', this, true);
window.removeEventListener('beforecustomization', this, true); window.removeEventListener('beforecustomization', this, true);
window.removeEventListener('aftercustomization', this, false); window.removeEventListener('aftercustomization', this, false);
window.removeEventListener('customizationchange', this, false);
window.removeEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_ENTERED, this, false); window.removeEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_ENTERED, this, false);
window.removeEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_EXITED, this, false); window.removeEventListener(this.kEVENT_TYPE_PRINT_PREVIEW_EXITED, this, false);
@ -2122,14 +2120,11 @@ TreeStyleTabBrowser.prototype = {
return this.onResize(aEvent); return this.onResize(aEvent);
// toolbar customizing on Firefox 4 or later
case 'beforecustomization': case 'beforecustomization':
return this.onToolbarCustomizeStart(aEvent); return this.syncDestroyTabbar();
case 'aftercustomization': case 'aftercustomization':
return this.onToolbarCustomizeEnd(aEvent); return this.syncReinitTabbar();
case 'customizationchange':
return this.onToolbarCustomizeChanging(aEvent);
case this.kEVENT_TYPE_PRINT_PREVIEW_ENTERED: case this.kEVENT_TYPE_PRINT_PREVIEW_ENTERED:
@ -3338,22 +3333,6 @@ TreeStyleTabBrowser.prototype = {
this.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_WINDOW_RESIZE); this.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_WINDOW_RESIZE);
}, },
// toolbar customizing on Firefox 4 or later
onToolbarCustomizeStart : function TSTBrowser_onToolbarCustomizeStart(aEvent)
{
this.syncDestroyTabbar();
},
onToolbarCustomizeEnd : function TSTBrowser_onToolbarCustomizeEnd(aEvent)
{
this.syncReinitTabbar();
},
onToolbarCustomizeChanging : function TSTBrowser_onToolbarCustomizeChanging(aEvent)
{
},
onPopupShowing : function TSTBrowser_onPopupShowing(aEvent) onPopupShowing : function TSTBrowser_onPopupShowing(aEvent)
{ {
if (aEvent.target.localName == 'tooltip') if (aEvent.target.localName == 'tooltip')