rem: var t; if ((t = this._share.rowCache[targetRow])) return t; 
add: if (targetRow in this._share.rowCache) return this._share.rowCache[targetRow]; 
context: function tovr_find (targetRow, myRow){    var t;    if ((t = this._share.rowCache[targetRow]))        return t;    else if (0) {        /* XXX take this out later */        if (typeof myRow == "undefined")            myRow = this.calculateVisualRow();        else        {            ASSERT (myRow == this.calculateVisualRow(), "someone lied to me, " +                    myRow + " != " + this.calculateVisualRow());        }            if (targetRow < myRow || targetRow > myRow + this.visualFootprint)        {            ASSERT (0, "I don't contain visual row " + targetRow + ", only " +                    myRow + "..." + (myRow + this.visualFootprint));            return null;        }    }    /* if this is true, we *are* the index */    if (targetRow == myRow)        return (this._share.rowCache[targetRow] = this);    /* otherwise, we've got to search the kids */    var childStart = myRow; /* childStart represents the starting visual row                             * for the child we're examining. */    for (var i = 0; i < this.childData.length; ++i)    {        var child = this.childData[i];        /* ignore hidden children */        if (child.isHidden)            continue;        /* if this kid is the targetRow, we're done */        if (childStart == targetRow)            return (this._share.rowCache[targetRow] = child);        /* if this kid contains the index, ask *it* to find the record */        else if (targetRow <= childStart + child.visualFootprint) {            /* this *has* to succeed */            var rv = child.locateChildByVisualRow(targetRow, childStart + 1);            //XXXASSERT (rv, "Can't find a row that *has* to be there.");            /* don't cache this, the previous call to locateChildByVisualRow             * just did. */            return rv;        }        /* otherwise, get ready to ask the next kid */        childStart += child.visualFootprint;    }    if (0) {    /* XXX take this out later */    ASSERT (0, "locateChildByVisualRow() failed.  Asked for row " + targetRow +            ", record only contains " + myRow + "..." +            (myRow + this.visualFootprint));    }    return null;}   
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/b243396c405e4eee825cfde1ffa0dd7a6caf0e83/outliner-utils.js/clean/extensions/venkman/resources/content/outliner-utils.js