Minefield 4.0b3preでタブのコンテキストメニューを開けなくなる問題を修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7027 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
8ed77cd5e5
commit
be9d2059d0
@ -14,88 +14,93 @@
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
:root[tabFx2Compatible="7"]
|
||||
:root[tabFx2Compatible="8"]
|
||||
.tabbrowser-tab {
|
||||
-moz-binding: url(tabFx2Compatible.xml#tabbrowser-tab) !important;
|
||||
-moz-binding: url(tabFx2Compatible.xml#tabbrowser-tab-3) !important;
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="7"]:not([tabFx2Compatible-flags~="png-throbber"])
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="separate-tabContextMenu"]
|
||||
.tabbrowser-tab {
|
||||
-moz-binding: url(tabFx2Compatible.xml#tabbrowser-tab-4) !important;
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="8"]:not([tabFx2Compatible-flags~="png-throbber"])
|
||||
.tabbrowser-tab[busy] > hbox > stack > .tab-icon-image {
|
||||
list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif") !important;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="png-throbber"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="png-throbber"]
|
||||
.tabbrowser-tab[busy] > hbox > stack > .tab-icon-image {
|
||||
list-style-image: url("chrome://global/skin/icons/loading_16.png") !important;
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="mac"][tabFx2Compatible-flags~="png-throbber"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="mac"][tabFx2Compatible-flags~="png-throbber"]
|
||||
.tabbrowser-tab .tab-icon-image {
|
||||
list-style-image: url("chrome://global/skin/tree/item.png");
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="mac"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="mac"]
|
||||
.tabbrowser-tab:not(:hover):not([selected="true"]) .tab-icon-image {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy] > hbox > stack > .tab-icon-image {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/progress.png") !important;
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][stalled] > hbox > stack > .tab-icon-image {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/progress-pulsing.png") !important;
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="1"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 32px, 16px, 16px);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="2"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 48px, 16px, 32px);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="3"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 64px, 16px, 48px);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="4"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 80px, 16px, 64px);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="5"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 96px, 16px, 80px);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="6"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 112px, 16px, 96px);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="7"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 128px, 16px, 112px);
|
||||
}
|
||||
:root[tabFx2Compatible="7"][tabFx2Compatible-flags~="pie"]
|
||||
:root[tabFx2Compatible="8"][tabFx2Compatible-flags~="pie"]
|
||||
.tabbrowser-tab[busy][progress="8"] > hbox > stack > .tab-icon-image {
|
||||
-moz-image-region: rect(0, 144px, 16px, 128px);
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="7"]
|
||||
:root[tabFx2Compatible="8"]
|
||||
.tabbrowser-tab[selected="true"]:focus > hbox > .tab-text {
|
||||
border: 1px dotted -moz-DialogText;
|
||||
}
|
||||
|
||||
|
||||
:root[tabFx2Compatible="7"]
|
||||
:root[tabFx2Compatible="8"]
|
||||
.tabbrowser-tab[pinned="true"] .tab-text {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
|
||||
:root[tabFx2Compatible="7"]
|
||||
:root[tabFx2Compatible="8"]
|
||||
.tabbrowser-tab[pinned="true"] > .tab-image-left,
|
||||
:root[tabFx2Compatible="7"]
|
||||
:root[tabFx2Compatible="8"]
|
||||
.tabbrowser-tab[pinned="true"] > .tab-image-right {
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="tabbrowser-tab"
|
||||
<binding id="tabbrowser-tab-3"
|
||||
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-tab">
|
||||
<content chromedir="&locale.dir;"
|
||||
closetabtext="&closeTab.label;">
|
||||
@ -42,4 +42,21 @@
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="tabbrowser-tab-4"
|
||||
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-tab">
|
||||
<content context="tabContextMenu"
|
||||
closetabtext="&closeTab.label;">
|
||||
<xul:hbox class="tab-image-left" xbl:inherits="selected"/>
|
||||
<xul:hbox flex="1" class="tab-image-middle" align="center" xbl:inherits="selected">
|
||||
<xul:stack class="tab-icon">
|
||||
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/>
|
||||
<xul:image class="tab-extra-status"/>
|
||||
</xul:stack>
|
||||
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" class="tab-text"/>
|
||||
</xul:hbox>
|
||||
<xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button"/>
|
||||
<xul:hbox class="tab-image-right" xbl:inherits="selected"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
|
@ -19,7 +19,7 @@
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
window.removeEventListener('DOMContentLoaded', arguments.callee, true);
|
||||
|
||||
const currentRevision = 7;
|
||||
const currentRevision = 8;
|
||||
|
||||
var b = document.getElementById('content');
|
||||
if (!b || b.localName != 'tabbrowser') return;
|
||||
@ -38,6 +38,15 @@ window.addEventListener('DOMContentLoaded', function() {
|
||||
}
|
||||
}
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
const XULAppInfo = Cc['@mozilla.org/xre/app-info;1']
|
||||
.getService(Ci.nsIXULAppInfo)
|
||||
.QueryInterface(Ci.nsIXULRuntime);
|
||||
const Comparator = Cc['@mozilla.org/xpcom/version-comparator;1']
|
||||
.getService(Ci.nsIVersionComparator);
|
||||
|
||||
var url = window.getComputedStyle(b.selectedTab, '').getPropertyValue('-moz-binding');
|
||||
url = url.match(/url\((.+)\)/);
|
||||
if (url) {
|
||||
@ -64,12 +73,14 @@ window.addEventListener('DOMContentLoaded', function() {
|
||||
case 'chrome://browser/content/tabbrowser.xml#tabbrowser-tab': // built-in
|
||||
root.setAttribute('tabFx2Compatible', currentRevision);
|
||||
var flags = [];
|
||||
if (navigator.platform.toLowerCase().indexOf('mac') > -1)
|
||||
if (XULAppInfo.OS.toLowerCase().indexOf('darwin') > -1)
|
||||
flags.push('mac');
|
||||
if ('nsPIPlacesDatabase' in Components.interfaces)
|
||||
if (Comparator.compare(XULAppInfo.version, '3.1') >= 0)
|
||||
flags.push('png-throbber');
|
||||
if (b.mTabProgressListener.toSource().indexOf('_startStalledTimer') > -1)
|
||||
if (Comparator.compare(XULAppInfo.version, '3.7a1') >= 0)
|
||||
flags.push('pie');
|
||||
if (Comparator.compare(XULAppInfo.version, '4.0b1') >= 0)
|
||||
flags.push('separate-tabContextMenu');
|
||||
root.setAttribute('tabFx2Compatible-flags', flags.join(' '));
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user