context: proto._calculateChildrenDependHelper = function(vModifiedWidget, vHint, vCache, vStart, vRange, vStop){  if (this[vCache] == null || this[vCache].length == 0)  {    var vChildren = this.getChildren();    var vChildrenLength = vChildren.length;    if (vChildrenLength == 0) {      return null;    };    var vDependCache = this[vCache] = [];    var vCurrentChild;    var vCurrentNeeded;    for (var i=0; i<vChildrenLength; i++)    {      vCurrentChild = vChildren[i];      if(vCurrentChild.isCreated())      {        vCurrentNeeded = vCurrentChild._computeNeededSize(vStart, vRange, vStop);        // this.debug("Child: " + vCurrentChild._computeNeededSize(vStart, vRange, vStop));        vDependCache.push({ widget : vCurrentChild, size : vCurrentNeeded ? vCurrentNeeded : 0 });      };    };    vDependCache.sort(this._compareDependSize);  }  else  {    if (!vModifiedWidget && this._wasVisible)    {      if (vRange == "height" && this._lastChildWithInvalidatedPreferredHeight)      {        vModifiedWidget = this._lastChildWithInvalidatedPreferredHeight;        this._lastChildWithInvalidatedPreferredHeight = null;      }      else if (vRange == "width" && this._lastChildWithInvalidatedPreferredWidth)      {        vModifiedWidget = this._lastChildWithInvalidatedPreferredWidth;        this._lastChildWithInvalidatedPreferredWidth = null;      };      // this.debug("POST-FIX: " + vRange + " : " + vModifiedWidget);    };    if (vModifiedWidget && vModifiedWidget != this)    {      var vDependCache = this[vCache];      var vDependCacheLength = vDependCache.length;      var vChildFound = false;      var vCurrentNeeded;      if (vHint != "add")      {        for (var i=0; i<vDependCacheLength; i++)        {          if (vDependCache[i].widget == vModifiedWidget)          {            // Update child in array            if (vModifiedWidget.getParent() == this)            {              // this.debug("Update for: " + vModifiedWidget);              vCurrentNeeded = vModifiedWidget._computeNeededSize(vStart, vRange, vStop);              vDependCache[i].size = vCurrentNeeded ? vCurrentNeeded : 0;            }            // Remove child from array            else            {              vDependCache.splice(i, 1);            };            vChildFound = true;            break;          };        };      };      // Add child to array      if (vHint == "add" || !vChildFound)      {        if(vModifiedWidget.getParent() == this)        {          vCurrentNeeded = vModifiedWidget._computeNeededSize(vStart, vRange, vStop);          vDependCache.push({ widget : vModifiedWidget, size : vCurrentNeeded ? vCurrentNeeded : 0 });        }        else        {          throw new Error("No change while recalculating the dependCache!");        };      };      vDependCache.sort(this._compareDependSize);    }    else    {      var vDependCache = this[vCache];    };  };  return vDependCache.length > 0 ? vDependCache[0].size : null;};
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/525d248d902add77d4ba160f7c524b9776572ebb/QxWidget.js/clean/qooxdoo/source/script/widgets/QxWidget.js