Bug 321578: Files dragged onto tabbar from explorer don't open in new tabs anymore.

Null check aDragSession.sourceNode.
r=cts, sr=Neil
This commit is contained in:
jag%tty.nl 2005-12-29 11:09:59 +00:00
parent 53a479114b
commit a55f7afdcc

View File

@ -1221,7 +1221,8 @@
<parameter name="aDragSession"/>
<body>
<![CDATA[
if (aDragSession.sourceNode.parentNode == this.mTabContainer) {
if (aDragSession.sourceNode &&
aDragSession.sourceNode.parentNode == this.mTabContainer) {
var newIndex = this.getDropIndex(aEvent);
var tabIndex = this.getTabIndex(aDragSession.sourceNode);
if (newIndex == tabIndex || newIndex == tabIndex + 1)
@ -1238,7 +1239,8 @@
<parameter name="aDragSession"/>
<body>
<![CDATA[
if (aDragSession.sourceNode.parentNode == this.mTabContainer) {
if (aDragSession.sourceNode &&
aDragSession.sourceNode.parentNode == this.mTabContainer) {
var ib = document.getAnonymousElementByAttribute(this, "class", "tab-drop-indicator-bar");
if (!aDragSession.canDrop)
@ -1285,7 +1287,8 @@
<parameter name="aDragSession"/>
<body>
<![CDATA[
if (aDragSession.sourceNode && aDragSession.sourceNode.parentNode == this.mTabContainer) {
if (aDragSession.sourceNode &&
aDragSession.sourceNode.parentNode == this.mTabContainer) {
var newIndex = this.getDropIndex(aEvent);
var tabIndex = this.getTabIndex(aDragSession.sourceNode);
if (newIndex > tabIndex)
@ -1327,7 +1330,8 @@
<parameter name="aDragSession"/>
<body>
<![CDATA[
if (aDragSession.sourceNode.parentNode == this.mTabContainer) {
if (aDragSession.sourceNode &&
aDragSession.sourceNode.parentNode == this.mTabContainer) {
var target = aEvent.relatedTarget;
while (target && target != this.mStrip)
target = target.parentNode;