From af90d76aa35f207c415a4281fe25a58885b0ff97 Mon Sep 17 00:00:00 2001 From: "rginda%netscape.com" Date: Thu, 6 Sep 2001 22:56:56 +0000 Subject: [PATCH] - venkman only - fix sort tests git-svn-id: svn://10.0.0.236/trunk@102478 18797224-902f-48f8-a5cc-f745e15eee43 --- .../venkman/resources/content/outliner-utils.js | 11 ++++++----- .../venkman/resources/content/tree-utils.js | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mozilla/extensions/venkman/resources/content/outliner-utils.js b/mozilla/extensions/venkman/resources/content/outliner-utils.js index 3ba20125444..96befc7bece 100644 --- a/mozilla/extensions/venkman/resources/content/outliner-utils.js +++ b/mozilla/extensions/venkman/resources/content/outliner-utils.js @@ -448,8 +448,8 @@ TreeOViewRecord.prototype.resort = function tovr_resort (leafSort) { if (!("childData" in this) || this.childData.length < 1 || - this.childData[0].sortCompare != tovr_sortcmp || - !("sortColumn" in this._share) || this._share.sortDirection == 0) + (this.childData[0].sortCompare == tovr_sortcmp && + !("sortColumn" in this._share) || this._share.sortDirection == 0)) { /* if we have no children, or we have the default sort compare and no * sort flags, then just exit */ @@ -461,7 +461,8 @@ function tovr_resort (leafSort) for (var i = 0; i < this.childData.length; ++i) { this.childData[i].childIndex = i; - if ("isContainerOpen" in this && this.childData[i].isContainerOpen) + if ("isContainerOpen" in this.childData[i] && + this.childData[i].isContainerOpen) this.childData[i].resort(true); else this.childData[i].sortIsInvalid = true; @@ -837,8 +838,8 @@ TORootRecord.prototype.resort = function torr_resort () { if (!("childData" in this) || this.childData.length < 1 || - this.childData[0].sortCompare != tovr_sortcmp || - !("sortColumn" in this._share) || this._share.sortDirection == 0) + (this.childData[0].sortCompare == tovr_sortcmp && + !("sortColumn" in this._share) || this._share.sortDirection == 0)) { /* if we have no children, or we have the default sort compare but we're * missing a sort flag, then just exit */ diff --git a/mozilla/extensions/venkman/resources/content/tree-utils.js b/mozilla/extensions/venkman/resources/content/tree-utils.js index 3ba20125444..96befc7bece 100644 --- a/mozilla/extensions/venkman/resources/content/tree-utils.js +++ b/mozilla/extensions/venkman/resources/content/tree-utils.js @@ -448,8 +448,8 @@ TreeOViewRecord.prototype.resort = function tovr_resort (leafSort) { if (!("childData" in this) || this.childData.length < 1 || - this.childData[0].sortCompare != tovr_sortcmp || - !("sortColumn" in this._share) || this._share.sortDirection == 0) + (this.childData[0].sortCompare == tovr_sortcmp && + !("sortColumn" in this._share) || this._share.sortDirection == 0)) { /* if we have no children, or we have the default sort compare and no * sort flags, then just exit */ @@ -461,7 +461,8 @@ function tovr_resort (leafSort) for (var i = 0; i < this.childData.length; ++i) { this.childData[i].childIndex = i; - if ("isContainerOpen" in this && this.childData[i].isContainerOpen) + if ("isContainerOpen" in this.childData[i] && + this.childData[i].isContainerOpen) this.childData[i].resort(true); else this.childData[i].sortIsInvalid = true; @@ -837,8 +838,8 @@ TORootRecord.prototype.resort = function torr_resort () { if (!("childData" in this) || this.childData.length < 1 || - this.childData[0].sortCompare != tovr_sortcmp || - !("sortColumn" in this._share) || this._share.sortDirection == 0) + (this.childData[0].sortCompare == tovr_sortcmp && + !("sortColumn" in this._share) || this._share.sortDirection == 0)) { /* if we have no children, or we have the default sort compare but we're * missing a sort flag, then just exit */