[Qooxdoo-commit] qooxdoo/source/script/gui QxNativeWindow.js,1.1.2.22,1.1.2.23
Brought to you by:
ecker,
martinwittemann
|
From: Andreas E. <ec...@us...> - 2006-01-24 18:17:44
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8850/source/script/gui Modified Files: Tag: renderer QxNativeWindow.js Log Message: Added possibilty to resize existing window (if allowed by cross-domain security policies). Index: QxNativeWindow.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxNativeWindow.js,v retrieving revision 1.1.2.22 retrieving revision 1.1.2.23 diff -u -d -r1.1.2.22 -r1.1.2.23 --- QxNativeWindow.js 24 Jan 2006 15:00:17 -0000 1.1.2.22 +++ QxNativeWindow.js 24 Jan 2006 18:17:35 -0000 1.1.2.23 @@ -96,12 +96,12 @@ /*! The outer width of the window. */ -QxNativeWindow.addProperty({ name : "width", defaultValue : 400 }); +QxNativeWindow.addProperty({ name : "width", type : QxConst.TYPEOF_NUMBER, defaultValue : 400, impl : "dimension" }); /*! The outer height of the window. */ -QxNativeWindow.addProperty({ name : "height", defaultValue : 250 }); +QxNativeWindow.addProperty({ name : "height", type : QxConst.TYPEOF_NUMBER, defaultValue : 250, impl : "dimension" }); /*! The left screen coordinate of the window. @@ -216,6 +216,32 @@ return true; }; +proto._modifyDimension = function(propValue, propOldValue, propName) +{ + /* + http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2brows.mspx + Changes to Functionality in Microsoft Windows XP Service Pack 2 + Part 5: Enhanced Browsing Security + URLACTION_FEATURE_WINDOW_RESTRICTIONS + Allow script-initiated windows without size or position constraints + Code: 2102 + */ + + if (!this.isClosed()) + { + try + { + this._window.resizeTo(this.getWidth(), this.getHeight()); + } + catch(ex) + { + this.error("Cross-Domain Scripting problem: Could not resize window!"); + }; + }; + + return true; +}; + proto._modifyName = function(propValue, propOldValue, propName) { if (!this.isClosed()) { @@ -571,16 +597,16 @@ return; }; + if (this.getDependent()) { + this.close(); + }; + if (this._timer) { this._timer.stop(); this._timer = null; }; - - if (this.getDependent()) { - this.close(); - }; - + this._window = null; return QxTarget.prototype.dispose.call(this); |