Update of /cvsroot/qooxdoo/qooxdoo/source/script/widgets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6586/source/script/widgets
Modified Files:
Tag: renderer
QxGallery.js QxIframe.js QxSpinner.js
Log Message:
Fixed many memory leaks, optimized some disposers, added missing dispose call for some events
Index: QxIframe.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxIframe.js,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -u -d -r1.1.2.19 -r1.1.2.20
--- QxIframe.js 16 Jan 2006 16:11:57 -0000 1.1.2.19
+++ QxIframe.js 28 Jan 2006 18:19:24 -0000 1.1.2.20
@@ -112,14 +112,14 @@
proto._onreadystatechange = function()
{
if (this._realFrame.readyState == "complete") {
- this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_LOAD));
+ this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_LOAD), true);
};
};
proto._onload = function()
{
this._isLoaded = true;
- this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_LOAD));
+ this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_LOAD), true);
};
Index: QxGallery.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxGallery.js,v
retrieving revision 1.21.2.10
retrieving revision 1.21.2.11
diff -u -d -r1.21.2.10 -r1.21.2.11
--- QxGallery.js 25 Jan 2006 14:14:07 -0000 1.21.2.10
+++ QxGallery.js 28 Jan 2006 18:19:24 -0000 1.21.2.11
@@ -40,7 +40,7 @@
this._processedImages = 0;
this.setOverflow("auto");
-
+
this.setHtmlProperty("className", "QxGallery");
this._manager = new QxDomSelectionManager(this);
@@ -86,7 +86,7 @@
---------------------------------------------------------------------------
*/
-proto._applyElementData = function()
+proto._applyElementData = function()
{
var o = this;
window.setTimeout(function()
@@ -292,7 +292,7 @@
if (vItem)
{
if (this.hasEventListeners("beforeToolTipAppear")) {
- this.dispatchEvent(new QxDataEvent("beforeToolTipAppear", vItem));
+ this.dispatchEvent(new QxDataEvent("beforeToolTipAppear", vItem), true);
};
if (!this.getToolTip()) {
@@ -449,19 +449,19 @@
proto.createImageCell = function(inode, d)
{
- if (this.hasEventListeners("loadComplete"))
+ if (this.hasEventListeners("loadComplete"))
{
inode.onload = this.imageOnLoad;
inode.onerror = this.imageOnError;
inode.gallery = this;
};
-
+
if (this._mshtml) {
inode.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + d.src + "',sizingMethod='scale')";
} else {
inode.src = d.src;
};
-
+
inode.width = d.thumbWidth + 2;
inode.height = d.thumbHeight + 2;
inode.style.marginLeft = inode.style.marginRight = Math.floor((this.getThumbMaxWidth()-d.thumbWidth)/2) + "px";
Index: QxSpinner.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxSpinner.js,v
retrieving revision 1.9.2.28
retrieving revision 1.9.2.29
diff -u -d -r1.9.2.28 -r1.9.2.29
--- QxSpinner.js 25 Jan 2006 11:19:00 -0000 1.9.2.28
+++ QxSpinner.js 28 Jan 2006 18:19:24 -0000 1.9.2.29
@@ -41,7 +41,7 @@
// BEHAVIOR
// ************************************************************************
this.setTabIndex(-1);
-
+
if (QxClient.isMshtml()) {
this.setStyleProperty("fontSize", QxConst.CORE_0PIXEL);
};
@@ -61,11 +61,11 @@
this._textfield.setValue(String(this._manager.getValue()));
this.add(this._textfield);
-
-
+
+
// ************************************************************************
// BUTTON LAYOUT
- // ************************************************************************
+ // ************************************************************************
this._buttonlayout = new QxVerticalBoxLayout;
this._buttonlayout.setWidth(QxConst.CORE_AUTO);
this.add(this._buttonlayout);
@@ -107,7 +107,7 @@
this._downbutton.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN, this._onmousedown, this);
this._manager.addEventListener(QxConst.INTERNAL_CHANGE, this._onchange, this);
this._timer.addEventListener(QxConst.EVENT_TYPE_INTERVAL, this._oninterval, this);
-
+
// ************************************************************************
// INITIALIZATION
@@ -409,7 +409,7 @@
};
if (this.hasEventListeners(QxConst.INTERNAL_CHANGE)) {
- this.dispatchEvent(new QxEvent(QxConst.INTERNAL_CHANGE));
+ this.dispatchEvent(new QxEvent(QxConst.INTERNAL_CHANGE), true);
};
};
@@ -618,7 +618,8 @@
this._manager.setValue(this._manager.getValue() + ((this._intervalIncrease ? 1 : - 1) * this.getPageIncrementAmount()));
};
-proto._resetIncrements = function() {
+proto._resetIncrements = function()
+{
this.resetIncrementAmount();
this.resetInterval();
};
@@ -642,14 +643,22 @@
this.removeEventListener(QxConst.EVENT_TYPE_KEYPRESS, this._onkeypress, this);
this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN, this._onkeydown, this);
this.removeEventListener(QxConst.EVENT_TYPE_KEYUP, this._onkeyup, this);
+ this.removeEventListener(QxConst.EVENT_TYPE_MOUSEWHEEL, this._onmousewheel, this);
if (this._textfield)
{
this._textfield.removeEventListener(QxConst.EVENT_TYPE_BLUR, this._onblur, this);
+ this._textfield.removeEventListener(QxConst.EVENT_TYPE_INPUT, this._oninput, this);
this._textfield.dispose();
this._textfield = null;
};
+ if (this._buttonlayout)
+ {
+ this._buttonlayout.dispose();
+ this._buttonlayout = null;
+ };
+
if (this._upbutton)
{
this._upbutton.removeEventListener(QxConst.EVENT_TYPE_MOUSEDOWN, this._onmousedown, this);
|