Tab Mix Plus 0.3.7.3との組み合わせでまるで動かなくなっていた問題に暫定対処

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4212 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-04-28 04:55:59 +00:00
parent d049f7a44e
commit 81ebf0bcf8
2 changed files with 9 additions and 8 deletions

View File

@ -1375,7 +1375,7 @@ catch(e) {
window.BrowserLoadURL window.BrowserLoadURL
]]>).forEach(function(aFunc) { ]]>).forEach(function(aFunc) {
var source = this._getFunctionSource(aFunc); var source = this._getFunctionSource(aFunc);
if (!source || !/^function BrowserLoadURL/.test(source)) if (!source || !/^\(?function BrowserLoadURL/.test(source))
return; return;
eval(aFunc+' = '+source.replace( eval(aFunc+' = '+source.replace(
'aTriggeringEvent && aTriggeringEvent.altKey', 'aTriggeringEvent && aTriggeringEvent.altKey',
@ -1437,7 +1437,7 @@ catch(e) {
window.handleLinkClick window.handleLinkClick
]]>).some(function(aFunc) { ]]>).some(function(aFunc) {
var source = this._getFunctionSource(aFunc); var source = this._getFunctionSource(aFunc);
if (!source || !/^function handleLinkClick/.test(source)) if (!source || !/^\(?function handleLinkClick/.test(source))
return false; return false;
eval(aFunc+' = '+source.replace( eval(aFunc+' = '+source.replace(
/(openNewTabWith\()/g, /(openNewTabWith\()/g,
@ -1495,7 +1495,7 @@ catch(e) {
window.contentAreaClick window.contentAreaClick
]]>).forEach(function(aFunc) { ]]>).forEach(function(aFunc) {
var source = this._getFunctionSource(aFunc); var source = this._getFunctionSource(aFunc);
if (!source || !/^function contentAreaClick/.test(source)) if (!source || !/^\(?function contentAreaClick/.test(source))
return; return;
eval(aFunc+' = '+source.replace( eval(aFunc+' = '+source.replace(
/((openWebPanel\([^\;]+\);|PlacesUIUtils.showMinimalAddBookmarkUI\([^;]+\);)event.preventDefault\(\);return false;\})/, /((openWebPanel\([^\;]+\);|PlacesUIUtils.showMinimalAddBookmarkUI\([^;]+\);)event.preventDefault\(\);return false;\})/,
@ -1532,7 +1532,7 @@ catch(e) {
window.BrowserBack window.BrowserBack
]]>).forEach(function(aFunc) { ]]>).forEach(function(aFunc) {
var source = this._getFunctionSource(aFunc); var source = this._getFunctionSource(aFunc);
if (!source || !/^function (gotoHistoryIndex|BrowserForward|BrowserBack)/.test(source)) if (!source || !/^\(?function (gotoHistoryIndex|BrowserForward|BrowserBack)/.test(source))
return; return;
eval(aFunc+' = '+source.replace( eval(aFunc+' = '+source.replace(
/(openUILinkIn\()/g, /(openUILinkIn\()/g,
@ -1549,7 +1549,7 @@ catch(e) {
window.BrowserGoHome window.BrowserGoHome
]]>).forEach(function(aFunc) { ]]>).forEach(function(aFunc) {
var source = this._getFunctionSource(aFunc); var source = this._getFunctionSource(aFunc);
if (!source || !/^function (BrowserHomeClick|BrowserGoHome)/.test(source)) if (!source || !/^\(?function (BrowserHomeClick|BrowserGoHome)/.test(source))
return; return;
eval(aFunc+' = '+source.replace( eval(aFunc+' = '+source.replace(
'gBrowser.loadTabs(', 'gBrowser.loadTabs(',

View File

@ -93,7 +93,7 @@ TreeStyleTabBrowser.prototype = {
getTabClosebox : function(aTab) getTabClosebox : function(aTab)
{ {
var close = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-close-button tabs-closebutton always-right') || // Tab Mix Plus var close = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-close-button always-right') || // Tab Mix Plus
document.getAnonymousElementByAttribute(aTab, 'class', 'tab-close-button'); document.getAnonymousElementByAttribute(aTab, 'class', 'tab-close-button');
return close; return close;
}, },
@ -788,6 +788,7 @@ TreeStyleTabBrowser.prototype = {
scrollInnerBox.removeAttribute('flex'); scrollInnerBox.removeAttribute('flex');
if (scrollFrame) { // Tab Mix Plus if (scrollFrame) { // Tab Mix Plus
document.getAnonymousNodes(scrollFrame)[0].removeAttribute('flex');
scrollFrame.parentNode.orient = scrollFrame.parentNode.orient =
scrollFrame.orient = 'vertical'; scrollFrame.orient = 'vertical';
newTabBox.orient = 'horizontal'; newTabBox.orient = 'horizontal';
@ -863,6 +864,7 @@ TreeStyleTabBrowser.prototype = {
scrollInnerBox.setAttribute('flex', 1); scrollInnerBox.setAttribute('flex', 1);
if (scrollFrame) { // Tab Mix Plus if (scrollFrame) { // Tab Mix Plus
document.getAnonymousNodes(scrollFrame)[0].setAttribute('flex', 1);
scrollFrame.parentNode.orient = scrollFrame.parentNode.orient =
scrollFrame.orient = 'horizontal'; scrollFrame.orient = 'horizontal';
newTabBox.orient = 'vertical'; newTabBox.orient = 'vertical';
@ -1866,7 +1868,6 @@ TreeStyleTabBrowser.prototype = {
onTabbarOverflow : function(aEvent) onTabbarOverflow : function(aEvent)
{ {
var box = aEvent.currentTarget;
var tabs = this.mTabBrowser.mTabContainer; var tabs = this.mTabBrowser.mTabContainer;
var horizontal = tabs.orient == 'horizontal'; var horizontal = tabs.orient == 'horizontal';
if (horizontal) return; if (horizontal) return;
@ -1874,7 +1875,7 @@ TreeStyleTabBrowser.prototype = {
if (aEvent.detail == 1) return; if (aEvent.detail == 1) return;
if (aEvent.type == 'overflow') { if (aEvent.type == 'overflow') {
tabs.setAttribute('overflow', 'true'); tabs.setAttribute('overflow', 'true');
box.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem); this.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem);
} }
else { else {
tabs.removeAttribute('overflow'); tabs.removeAttribute('overflow');