contentAreaDNDObserverを使わずに、コンテンツ領域へのタブバーのドロップをハンドリングするようにした( https://bugzilla.mozilla.org/show_bug.cgi?id=545714 の変更への追従)
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6599 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
1985fe3220
commit
5ad661b1ff
@ -1125,20 +1125,6 @@ catch(e) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (window.contentAreaDNDObserver &&
|
|
||||||
!('getSupportedFlavours' in contentAreaDNDObserver)) { // Firefox 3.6 or later
|
|
||||||
eval('contentAreaDNDObserver.onDrop = '+
|
|
||||||
contentAreaDNDObserver.onDrop.toSource().replace(
|
|
||||||
'var types = aEvent.dataTransfer.types;',
|
|
||||||
<![CDATA[$&
|
|
||||||
if (gBrowser.treeStyleTab.panelDNDObserver.canDrop(aEvent, gBrowser.treeStyleTab.getCurrentDragSession())) {
|
|
||||||
return gBrowser.treeStyleTab.panelDNDObserver.onDrop(aEvent, null, gBrowser.treeStyleTab.getCurrentDragSession());
|
|
||||||
}
|
|
||||||
]]>
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('PrintUtils' in window) {
|
if ('PrintUtils' in window) {
|
||||||
eval('PrintUtils.printPreview = '+PrintUtils.printPreview.toSource().replace(
|
eval('PrintUtils.printPreview = '+PrintUtils.printPreview.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
|
@ -230,7 +230,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
strip.addEventListener('click', this, true);
|
strip.addEventListener('click', this, true);
|
||||||
b.mPanelContainer.addEventListener('dragexit', this, false);
|
b.mPanelContainer.addEventListener('dragexit', this, false);
|
||||||
b.mPanelContainer.addEventListener('dragover', this, false);
|
b.mPanelContainer.addEventListener('dragover', this, false);
|
||||||
b.mPanelContainer.addEventListener('dragdrop', this, false);
|
b.mPanelContainer.addEventListener('drop', this, true);
|
||||||
|
b.mPanelContainer.addEventListener('dragdrop', this, false); // for Firefox 3.5 or older
|
||||||
|
|
||||||
if (this.isFloating)
|
if (this.isFloating)
|
||||||
window.addEventListener('resize', this, true);
|
window.addEventListener('resize', this, true);
|
||||||
@ -1344,7 +1345,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
strip.removeEventListener('click', this, true);
|
strip.removeEventListener('click', this, true);
|
||||||
b.mPanelContainer.removeEventListener('dragexit', this, false);
|
b.mPanelContainer.removeEventListener('dragexit', this, false);
|
||||||
b.mPanelContainer.removeEventListener('dragover', this, false);
|
b.mPanelContainer.removeEventListener('dragover', this, false);
|
||||||
b.mPanelContainer.removeEventListener('dragdrop', this, false);
|
b.mPanelContainer.removeEventListener('drop', this, true);
|
||||||
|
b.mPanelContainer.removeEventListener('dragdrop', this, false); // for Firefox 3.5 or older
|
||||||
|
|
||||||
if (this.isFloating)
|
if (this.isFloating)
|
||||||
window.removeEventListener('resize', this, true);
|
window.removeEventListener('resize', this, true);
|
||||||
@ -1647,7 +1649,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
observer = this.tabbarDNDObserver;
|
observer = this.tabbarDNDObserver;
|
||||||
canDrop = true;
|
canDrop = true;
|
||||||
}
|
}
|
||||||
else {
|
else { // for Firefox 3.5 or older
|
||||||
observer = this.panelDNDObserver;
|
observer = this.panelDNDObserver;
|
||||||
canDrop = observer.canDrop(aEvent, this.getCurrentDragSession());
|
canDrop = observer.canDrop(aEvent, this.getCurrentDragSession());
|
||||||
}
|
}
|
||||||
@ -1658,6 +1660,17 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// drop on panelContainer
|
||||||
|
case 'drop':
|
||||||
|
let (session = this.getCurrentDragSession()) {
|
||||||
|
if (this.panelDNDObserver.canDrop(aEvent, session)) {
|
||||||
|
this.panelDNDObserver.onDrop(aEvent, null, session);
|
||||||
|
aEvent.preventDefault();
|
||||||
|
aEvent.stopPropagation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
case 'mouseover':
|
case 'mouseover':
|
||||||
if (this.isEventFiredOnTwisty(aEvent))
|
if (this.isEventFiredOnTwisty(aEvent))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user