Bug 248612 - holding drag&drop pointer over a tab for a moment should open this tab to allow drag&drop of content from one tab to another tab, r=mano

This commit is contained in:
martijn.martijn@gmail.com 2007-08-21 22:02:14 -07:00
Родитель 855ace945e
Коммит b1ebe0914d
1 изменённых файлов: 10 добавлений и 16 удалений

Просмотреть файл

@ -180,9 +180,6 @@
<field name="mContextTab">
null
</field>
<field name="mModalDialogShowing">
false
</field>
<field name="arrowKeysShouldWrap" readonly="true">
#ifdef XP_MACOSX
true
@ -1701,6 +1698,8 @@
</body>
</method>
<field name="mDragTime">0</field>
<field name="mDragOverDelay">350</field>
<method name="onDragOver">
<parameter name="aEvent"/>
<parameter name="aFlavour"/>
@ -1728,8 +1727,13 @@
}
var isTabDrag = (aDragSession.sourceNode.parentNode == this.mTabContainer);
if (!isTabDrag)
if (!isTabDrag && aEvent.target.localName == "tab") {
if (!this.mDragTime)
this.mDragTime = Date.now();
if (Date.now() >= this.mDragTime + this.mDragOverDelay)
this.mTabContainer.selectedItem = aEvent.target;
return;
}
var newIndex = this.getNewIndex(aEvent);
@ -1888,6 +1892,8 @@
<parameter name="aDragSession"/>
<body>
<![CDATA[
this.mDragTime = 0;
if (aDragSession.sourceNode &&
aDragSession.sourceNode.parentNode == this.mTabContainer &&
aDragSession.canDrop) {
@ -2384,9 +2390,6 @@
onget="return this.mCurrentBrowser.userTypedValue;"
onset="return this.mCurrentBrowser.userTypedValue = val;"/>
<property name="forceSyncURLBarUpdate"
onget="return this.mModalDialogShowing;"/>
<method name="createTooltip">
<parameter name="event"/>
<body>
@ -2480,7 +2483,6 @@
for (var i = 0; i < browsers.length; ++i) {
if (this.getBrowserAtIndex(i).contentWindow == targetTop) {
this.mModalDialogShowing = true;
this.selectedTab = this.mTabContainer.childNodes[i];
break;
@ -2488,14 +2490,6 @@
}
]]>
</handler>
<handler event="DOMModalDialogClosed" phase="capturing">
<![CDATA[
if (!event.isTrusted)
return;
this.mModalDialogShowing = false;
]]>
</handler>
</handlers>
</binding>