tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r618461 [18/43] - in /tapestry/tapestry4/trunk/tapestry-framework/src/js: dojo-0.4.3-custom-4.1.5/ dojo-0.4.3-custom-4.1.5/nls/ dojo-0.4.3-custom-4.1.5/src/ dojo-0.4.3-custom-4.1.5/src/animation/ dojo-0.4.3-custom-4.1.5/src/cal/ dojo-0.4.3-...
Date Mon, 04 Feb 2008 22:08:37 GMT
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/__package__.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/__package__.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,2 @@
+dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
+dojo.provide("dojo.event.*");

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/__package__.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/__package__.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/browser.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/browser.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/browser.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/browser.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,478 @@
+dojo.provide("dojo.event.browser");
+dojo.require("dojo.event.common");
+dojo._ie_clobber=new function(){
+this.clobberNodes=[];
+function nukeProp(_1,_2){
+try{
+_1[_2]=null;
+}
+catch(e){
+}
+try{
+delete _1[_2];
+}
+catch(e){
+}
+try{
+_1.removeAttribute(_2);
+}
+catch(e){
+}
+}
+this.clobber=function(_3){
+var na;
+var _5;
+if(_3){
+_5=_3.all||_3.getElementsByTagName("*");
+na=[_3];
+for(var x=0;x<_5.length;x++){
+if(_5[x]["__doClobber__"]){
+na.push(_5[x]);
+}
+}
+}else{
+try{
+window.onload=null;
+}
+catch(e){
+}
+na=(this.clobberNodes.length)?this.clobberNodes:document.all;
+}
+_5=null;
+var _7={};
+for(var i=na.length-1;i>=0;i=i-1){
+var el=na[i];
+try{
+if(el&&el["__clobberAttrs__"]){
+for(var j=0;j<el.__clobberAttrs__.length;j++){
+nukeProp(el,el.__clobberAttrs__[j]);
+}
+nukeProp(el,"__clobberAttrs__");
+nukeProp(el,"__doClobber__");
+}
+}
+catch(e){
+}
+}
+na=null;
+};
+};
+if(dojo.render.html.ie){
+dojo.addOnUnload(function(){
+dojo._ie_clobber.clobber();
+try{
+if((dojo["widget"])&&(dojo.widget["manager"])){
+dojo.widget.manager.destroyAll();
+}
+}
+catch(e){
+}
+if(dojo.widget){
+for(var _b in dojo.widget._templateCache){
+if(dojo.widget._templateCache[_b].node){
+dojo.dom.destroyNode(dojo.widget._templateCache[_b].node);
+dojo.widget._templateCache[_b].node=null;
+delete dojo.widget._templateCache[_b].node;
+}
+}
+}
+try{
+window.onload=null;
+}
+catch(e){
+}
+try{
+window.onunload=null;
+}
+catch(e){
+}
+dojo._ie_clobber.clobberNodes=[];
+});
+}
+dojo.event.browser=new function(){
+var _c=0;
+this.normalizedEventName=function(_d){
+switch(_d){
+case "CheckboxStateChange":
+case "DOMAttrModified":
+case "DOMMenuItemActive":
+case "DOMMenuItemInactive":
+case "DOMMouseScroll":
+case "DOMNodeInserted":
+case "DOMNodeRemoved":
+case "RadioStateChange":
+return _d;
+break;
+default:
+var _e=_d.toLowerCase();
+return (_e.indexOf("on")==0)?_e.substr(2):_e;
+break;
+}
+};
+this.clean=function(_f){
+if(dojo.render.html.ie){
+dojo._ie_clobber.clobber(_f);
+}
+};
+this.addClobberNode=function(_10){
+if(!dojo.render.html.ie){
+return;
+}
+if(!_10["__doClobber__"]){
+_10.__doClobber__=true;
+dojo._ie_clobber.clobberNodes.push(_10);
+_10.__clobberAttrs__=[];
+}
+};
+this.addClobberNodeAttrs=function(_11,_12){
+if(!dojo.render.html.ie){
+return;
+}
+this.addClobberNode(_11);
+for(var x=0;x<_12.length;x++){
+_11.__clobberAttrs__.push(_12[x]);
+}
+};
+this.removeListener=function(_14,_15,fp,_17){
+if(!_17){
+var _17=false;
+}
+_15=dojo.event.browser.normalizedEventName(_15);
+if(_15=="key"){
+if(dojo.render.html.ie){
+this.removeListener(_14,"onkeydown",fp,_17);
+}
+_15="keypress";
+}
+if(_14.removeEventListener){
+_14.removeEventListener(_15,fp,_17);
+}
+};
+this.addListener=function(_18,_19,fp,_1b,_1c){
+if(!_18){
+return;
+}
+if(!_1b){
+var _1b=false;
+}
+_19=dojo.event.browser.normalizedEventName(_19);
+if(_19=="key"){
+if(dojo.render.html.ie){
+this.addListener(_18,"onkeydown",fp,_1b,_1c);
+}
+_19="keypress";
+}
+if(!_1c){
+var _1d=function(evt){
+if(!evt){
+evt=window.event;
+}
+var ret=fp(dojo.event.browser.fixEvent(evt,this));
+if(_1b){
+dojo.event.browser.stopEvent(evt);
+}
+return ret;
+};
+}else{
+_1d=fp;
+}
+if(_18.addEventListener){
+_18.addEventListener(_19,_1d,_1b);
+return _1d;
+}else{
+_19="on"+_19;
+if(typeof _18[_19]=="function"){
+var _20=_18[_19];
+_18[_19]=function(e){
+_20(e);
+return _1d(e);
+};
+}else{
+_18[_19]=_1d;
+}
+if(dojo.render.html.ie){
+this.addClobberNodeAttrs(_18,[_19]);
+}
+return _1d;
+}
+};
+this.isEvent=function(obj){
+return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
+};
+this.currentEvent=null;
+this.callListener=function(_23,_24){
+if(typeof _23!="function"){
+dojo.raise("listener not a function: "+_23);
+}
+dojo.event.browser.currentEvent.currentTarget=_24;
+return _23.call(_24,dojo.event.browser.currentEvent);
+};
+this._stopPropagation=function(){
+dojo.event.browser.currentEvent.cancelBubble=true;
+};
+this._preventDefault=function(){
+dojo.event.browser.currentEvent.returnValue=false;
+};
+this.keys={KEY_BACKSPACE:8,KEY_TAB:9,KEY_CLEAR:12,KEY_ENTER:13,KEY_SHIFT:16,KEY_CTRL:17,KEY_ALT:18,KEY_PAUSE:19,KEY_CAPS_LOCK:20,KEY_ESCAPE:27,KEY_SPACE:32,KEY_PAGE_UP:33,KEY_PAGE_DOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,KEY_INSERT:45,KEY_DELETE:46,KEY_HELP:47,KEY_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,KEY_NUMPAD_0:96,KEY_NUMPAD_1:97,KEY_NUMPAD_2:98,KEY_NUMPAD_3:99,KEY_NUMPAD_4:100,KEY_NUMPAD_5:101,KEY_NUMPAD_6:102,KEY_NUMPAD_7:103,KEY_NUMPAD_8:104,KEY_NUMPAD_9:105,KEY_NUMPAD_MULTIPLY:106,KEY_NUMPAD_PLUS:107,KEY_NUMPAD_ENTER:108,KEY_NUMPAD_MINUS:109,KEY_NUMPAD_PERIOD:110,KEY_NUMPAD_DIVIDE:111,KEY_F1:112,KEY_F2:113,KEY_F3:114,KEY_F4:115,KEY_F5:116,KEY_F6:117,KEY_F7:118,KEY_F8:119,KEY_F9:120,KEY_F10:121,KEY_F11:122,KEY_F12:123,KEY_F13:124,KEY_F14:125,KEY_F15:126,KEY_NUM_LOCK:144,KEY_SCROLL_LOCK:145};
+this.revKeys=[];
+for(var key in this.keys){
+this.revKeys[this.keys[key]]=key;
+}
+this.fixEvent=function(evt,_27){
+if(!evt){
+if(window["event"]){
+evt=window.event;
+}
+}
+if((evt["type"])&&(evt["type"].indexOf("key")==0)){
+evt.keys=this.revKeys;
+for(var key in this.keys){
+evt[key]=this.keys[key];
+}
+if(evt["type"]=="keydown"&&dojo.render.html.ie){
+switch(evt.keyCode){
+case evt.KEY_SHIFT:
+case evt.KEY_CTRL:
+case evt.KEY_ALT:
+case evt.KEY_CAPS_LOCK:
+case evt.KEY_LEFT_WINDOW:
+case evt.KEY_RIGHT_WINDOW:
+case evt.KEY_SELECT:
+case evt.KEY_NUM_LOCK:
+case evt.KEY_SCROLL_LOCK:
+case evt.KEY_NUMPAD_0:
+case evt.KEY_NUMPAD_1:
+case evt.KEY_NUMPAD_2:
+case evt.KEY_NUMPAD_3:
+case evt.KEY_NUMPAD_4:
+case evt.KEY_NUMPAD_5:
+case evt.KEY_NUMPAD_6:
+case evt.KEY_NUMPAD_7:
+case evt.KEY_NUMPAD_8:
+case evt.KEY_NUMPAD_9:
+case evt.KEY_NUMPAD_PERIOD:
+break;
+case evt.KEY_NUMPAD_MULTIPLY:
+case evt.KEY_NUMPAD_PLUS:
+case evt.KEY_NUMPAD_ENTER:
+case evt.KEY_NUMPAD_MINUS:
+case evt.KEY_NUMPAD_DIVIDE:
+break;
+case evt.KEY_PAUSE:
+case evt.KEY_TAB:
+case evt.KEY_BACKSPACE:
+case evt.KEY_ENTER:
+case evt.KEY_ESCAPE:
+case evt.KEY_PAGE_UP:
+case evt.KEY_PAGE_DOWN:
+case evt.KEY_END:
+case evt.KEY_HOME:
+case evt.KEY_LEFT_ARROW:
+case evt.KEY_UP_ARROW:
+case evt.KEY_RIGHT_ARROW:
+case evt.KEY_DOWN_ARROW:
+case evt.KEY_INSERT:
+case evt.KEY_DELETE:
+case evt.KEY_F1:
+case evt.KEY_F2:
+case evt.KEY_F3:
+case evt.KEY_F4:
+case evt.KEY_F5:
+case evt.KEY_F6:
+case evt.KEY_F7:
+case evt.KEY_F8:
+case evt.KEY_F9:
+case evt.KEY_F10:
+case evt.KEY_F11:
+case evt.KEY_F12:
+case evt.KEY_F12:
+case evt.KEY_F13:
+case evt.KEY_F14:
+case evt.KEY_F15:
+case evt.KEY_CLEAR:
+case evt.KEY_HELP:
+evt.key=evt.keyCode;
+break;
+default:
+if(evt.ctrlKey||evt.altKey){
+var _29=evt.keyCode;
+if(_29>=65&&_29<=90&&evt.shiftKey==false){
+_29+=32;
+}
+if(_29>=1&&_29<=26&&evt.ctrlKey){
+_29+=96;
+}
+evt.key=String.fromCharCode(_29);
+}
+}
+}else{
+if(evt["type"]=="keypress"){
+if(dojo.render.html.opera){
+if(evt.which==0){
+evt.key=evt.keyCode;
+}else{
+if(evt.which>0){
+switch(evt.which){
+case evt.KEY_SHIFT:
+case evt.KEY_CTRL:
+case evt.KEY_ALT:
+case evt.KEY_CAPS_LOCK:
+case evt.KEY_NUM_LOCK:
+case evt.KEY_SCROLL_LOCK:
+break;
+case evt.KEY_PAUSE:
+case evt.KEY_TAB:
+case evt.KEY_BACKSPACE:
+case evt.KEY_ENTER:
+case evt.KEY_ESCAPE:
+evt.key=evt.which;
+break;
+default:
+var _29=evt.which;
+if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
+_29+=32;
+}
+evt.key=String.fromCharCode(_29);
+}
+}
+}
+}else{
+if(dojo.render.html.ie){
+if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){
+evt.key=String.fromCharCode(evt.keyCode);
+}
+}else{
+if(dojo.render.html.safari){
+switch(evt.keyCode){
+case 25:
+evt.key=evt.KEY_TAB;
+evt.shift=true;
+break;
+case 63232:
+evt.key=evt.KEY_UP_ARROW;
+break;
+case 63233:
+evt.key=evt.KEY_DOWN_ARROW;
+break;
+case 63234:
+evt.key=evt.KEY_LEFT_ARROW;
+break;
+case 63235:
+evt.key=evt.KEY_RIGHT_ARROW;
+break;
+case 63236:
+evt.key=evt.KEY_F1;
+break;
+case 63237:
+evt.key=evt.KEY_F2;
+break;
+case 63238:
+evt.key=evt.KEY_F3;
+break;
+case 63239:
+evt.key=evt.KEY_F4;
+break;
+case 63240:
+evt.key=evt.KEY_F5;
+break;
+case 63241:
+evt.key=evt.KEY_F6;
+break;
+case 63242:
+evt.key=evt.KEY_F7;
+break;
+case 63243:
+evt.key=evt.KEY_F8;
+break;
+case 63244:
+evt.key=evt.KEY_F9;
+break;
+case 63245:
+evt.key=evt.KEY_F10;
+break;
+case 63246:
+evt.key=evt.KEY_F11;
+break;
+case 63247:
+evt.key=evt.KEY_F12;
+break;
+case 63250:
+evt.key=evt.KEY_PAUSE;
+break;
+case 63272:
+evt.key=evt.KEY_DELETE;
+break;
+case 63273:
+evt.key=evt.KEY_HOME;
+break;
+case 63275:
+evt.key=evt.KEY_END;
+break;
+case 63276:
+evt.key=evt.KEY_PAGE_UP;
+break;
+case 63277:
+evt.key=evt.KEY_PAGE_DOWN;
+break;
+case 63302:
+evt.key=evt.KEY_INSERT;
+break;
+case 63248:
+case 63249:
+case 63289:
+break;
+default:
+evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;
+}
+}else{
+evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;
+}
+}
+}
+}
+}
+}
+if(dojo.render.html.ie){
+if(!evt.target){
+evt.target=evt.srcElement;
+}
+if(!evt.currentTarget){
+evt.currentTarget=(_27?_27:evt.srcElement);
+}
+if(!evt.layerX){
+evt.layerX=evt.offsetX;
+}
+if(!evt.layerY){
+evt.layerY=evt.offsetY;
+}
+var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document;
+var _2b=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
+if(!evt.pageX){
+evt.pageX=evt.clientX+(_2b.scrollLeft||0);
+}
+if(!evt.pageY){
+evt.pageY=evt.clientY+(_2b.scrollTop||0);
+}
+if(evt.type=="mouseover"){
+evt.relatedTarget=evt.fromElement;
+}
+if(evt.type=="mouseout"){
+evt.relatedTarget=evt.toElement;
+}
+this.currentEvent=evt;
+evt.callListener=this.callListener;
+evt.stopPropagation=this._stopPropagation;
+evt.preventDefault=this._preventDefault;
+}
+return evt;
+};
+this.stopEvent=function(evt){
+if(window.event){
+evt.cancelBubble=true;
+evt.returnValue=false;
+}else{
+evt.preventDefault();
+evt.stopPropagation();
+}
+};
+};

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/browser.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/browser.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/browser.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/common.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/common.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,547 @@
+dojo.provide("dojo.event.common");
+dojo.require("dojo.lang.array");
+dojo.require("dojo.lang.extras");
+dojo.require("dojo.lang.func");
+dojo.event=new function(){
+this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
+function interpolateArgs(_1,_2){
+var dl=dojo.lang;
+var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(_1.length>2)?_1[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};
+switch(_1.length){
+case 0:
+return;
+case 1:
+return;
+case 2:
+ao.srcFunc=_1[0];
+ao.adviceFunc=_1[1];
+break;
+case 3:
+if((dl.isObject(_1[0]))&&(dl.isString(_1[1]))&&(dl.isString(_1[2]))){
+ao.adviceType="after";
+ao.srcObj=_1[0];
+ao.srcFunc=_1[1];
+ao.adviceFunc=_1[2];
+}else{
+if((dl.isString(_1[1]))&&(dl.isString(_1[2]))){
+ao.srcFunc=_1[1];
+ao.adviceFunc=_1[2];
+}else{
+if((dl.isObject(_1[0]))&&(dl.isString(_1[1]))&&(dl.isFunction(_1[2]))){
+ao.adviceType="after";
+ao.srcObj=_1[0];
+ao.srcFunc=_1[1];
+var _5=dl.nameAnonFunc(_1[2],ao.adviceObj,_2);
+ao.adviceFunc=_5;
+}else{
+if((dl.isFunction(_1[0]))&&(dl.isObject(_1[1]))&&(dl.isString(_1[2]))){
+ao.adviceType="after";
+ao.srcObj=dj_global;
+var _5=dl.nameAnonFunc(_1[0],ao.srcObj,_2);
+ao.srcFunc=_5;
+ao.adviceObj=_1[1];
+ao.adviceFunc=_1[2];
+}
+}
+}
+}
+break;
+case 4:
+if((dl.isObject(_1[0]))&&(dl.isObject(_1[2]))){
+ao.adviceType="after";
+ao.srcObj=_1[0];
+ao.srcFunc=_1[1];
+ao.adviceObj=_1[2];
+ao.adviceFunc=_1[3];
+}else{
+if((dl.isString(_1[0]))&&(dl.isString(_1[1]))&&(dl.isObject(_1[2]))){
+ao.adviceType=_1[0];
+ao.srcObj=dj_global;
+ao.srcFunc=_1[1];
+ao.adviceObj=_1[2];
+ao.adviceFunc=_1[3];
+}else{
+if((dl.isString(_1[0]))&&(dl.isFunction(_1[1]))&&(dl.isObject(_1[2]))){
+ao.adviceType=_1[0];
+ao.srcObj=dj_global;
+var _5=dl.nameAnonFunc(_1[1],dj_global,_2);
+ao.srcFunc=_5;
+ao.adviceObj=_1[2];
+ao.adviceFunc=_1[3];
+}else{
+if((dl.isString(_1[0]))&&(dl.isObject(_1[1]))&&(dl.isString(_1[2]))&&(dl.isFunction(_1[3]))){
+ao.srcObj=_1[1];
+ao.srcFunc=_1[2];
+var _5=dl.nameAnonFunc(_1[3],dj_global,_2);
+ao.adviceObj=dj_global;
+ao.adviceFunc=_5;
+}else{
+if(dl.isObject(_1[1])){
+ao.srcObj=_1[1];
+ao.srcFunc=_1[2];
+ao.adviceObj=dj_global;
+ao.adviceFunc=_1[3];
+}else{
+if(dl.isObject(_1[2])){
+ao.srcObj=dj_global;
+ao.srcFunc=_1[1];
+ao.adviceObj=_1[2];
+ao.adviceFunc=_1[3];
+}else{
+ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
+ao.srcFunc=_1[1];
+ao.adviceFunc=_1[2];
+ao.aroundFunc=_1[3];
+}
+}
+}
+}
+}
+}
+break;
+case 6:
+ao.srcObj=_1[1];
+ao.srcFunc=_1[2];
+ao.adviceObj=_1[3];
+ao.adviceFunc=_1[4];
+ao.aroundFunc=_1[5];
+ao.aroundObj=dj_global;
+break;
+default:
+ao.srcObj=_1[1];
+ao.srcFunc=_1[2];
+ao.adviceObj=_1[3];
+ao.adviceFunc=_1[4];
+ao.aroundObj=_1[5];
+ao.aroundFunc=_1[6];
+ao.once=_1[7];
+ao.delay=_1[8];
+ao.rate=_1[9];
+ao.adviceMsg=_1[10];
+ao.maxCalls=(!isNaN(parseInt(_1[11])))?_1[11]:-1;
+break;
+}
+if(dl.isFunction(ao.aroundFunc)){
+var _5=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_2);
+ao.aroundFunc=_5;
+}
+if(dl.isFunction(ao.srcFunc)){
+ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
+}
+if(dl.isFunction(ao.adviceFunc)){
+ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
+}
+if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
+ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
+}
+if(!ao.srcObj){
+dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
+}
+if(!ao.adviceObj){
+dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
+}
+if(!ao.adviceFunc){
+dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
+dojo.debugShallow(ao);
+}
+return ao;
+}
+this.connect=function(){
+if(arguments.length==1){
+var ao=arguments[0];
+}else{
+var ao=interpolateArgs(arguments,true);
+}
+if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
+if(dojo.render.html.ie){
+ao.srcFunc="onkeydown";
+this.connect(ao);
+}
+ao.srcFunc="onkeypress";
+}
+if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
+var _7={};
+for(var x in ao){
+_7[x]=ao[x];
+}
+var _9=[];
+dojo.lang.forEach(ao.srcObj,function(_a){
+if((dojo.render.html.capable)&&(dojo.lang.isString(_a))){
+_a=dojo.byId(_a);
+}
+_7.srcObj=_a;
+_9.push(dojo.event.connect.call(dojo.event,_7));
+});
+return _9;
+}
+var _b=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
+if(ao.adviceFunc){
+var _c=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);
+}
+_b.kwAddAdvice(ao);
+return _b;
+};
+this.log=function(a1,a2){
+var _f;
+if((arguments.length==1)&&(typeof a1=="object")){
+_f=a1;
+}else{
+_f={srcObj:a1,srcFunc:a2};
+}
+_f.adviceFunc=function(){
+var _10=[];
+for(var x=0;x<arguments.length;x++){
+_10.push(arguments[x]);
+}
+dojo.debug("("+_f.srcObj+")."+_f.srcFunc,":",_10.join(", "));
+};
+this.kwConnect(_f);
+};
+this.connectBefore=function(){
+var _12=["before"];
+for(var i=0;i<arguments.length;i++){
+_12.push(arguments[i]);
+}
+return this.connect.apply(this,_12);
+};
+this.connectAround=function(){
+var _14=["around"];
+for(var i=0;i<arguments.length;i++){
+_14.push(arguments[i]);
+}
+return this.connect.apply(this,_14);
+};
+this.connectOnce=function(){
+var ao=interpolateArgs(arguments,true);
+ao.once=true;
+return this.connect(ao);
+};
+this.connectRunOnce=function(){
+var ao=interpolateArgs(arguments,true);
+ao.maxCalls=1;
+return this.connect(ao);
+};
+this._kwConnectImpl=function(_18,_19){
+var fn=(_19)?"disconnect":"connect";
+if(typeof _18["srcFunc"]=="function"){
+_18.srcObj=_18["srcObj"]||dj_global;
+var _1b=dojo.lang.nameAnonFunc(_18.srcFunc,_18.srcObj,true);
+_18.srcFunc=_1b;
+}
+if(typeof _18["adviceFunc"]=="function"){
+_18.adviceObj=_18["adviceObj"]||dj_global;
+var _1b=dojo.lang.nameAnonFunc(_18.adviceFunc,_18.adviceObj,true);
+_18.adviceFunc=_1b;
+}
+_18.srcObj=_18["srcObj"]||dj_global;
+_18.adviceObj=_18["adviceObj"]||_18["targetObj"]||dj_global;
+_18.adviceFunc=_18["adviceFunc"]||_18["targetFunc"];
+return dojo.event[fn](_18);
+};
+this.kwConnect=function(_1c){
+return this._kwConnectImpl(_1c,false);
+};
+this.disconnect=function(){
+if(arguments.length==1){
+var ao=arguments[0];
+}else{
+var ao=interpolateArgs(arguments,true);
+}
+if(!ao.adviceFunc){
+return;
+}
+if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
+if(dojo.render.html.ie){
+ao.srcFunc="onkeydown";
+this.disconnect(ao);
+}
+ao.srcFunc="onkeypress";
+}
+if(!ao.srcObj[ao.srcFunc]){
+return null;
+}
+var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);
+mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
+return mjp;
+};
+this.kwDisconnect=function(_1f){
+return this._kwConnectImpl(_1f,true);
+};
+};
+dojo.event.MethodInvocation=function(_20,obj,_22){
+this.jp_=_20;
+this.object=obj;
+this.args=[];
+for(var x=0;x<_22.length;x++){
+this.args[x]=_22[x];
+}
+this.around_index=-1;
+};
+dojo.event.MethodInvocation.prototype.proceed=function(){
+this.around_index++;
+if(this.around_index>=this.jp_.around.length){
+return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);
+}else{
+var ti=this.jp_.around[this.around_index];
+var _25=ti[0]||dj_global;
+var _26=ti[1];
+return _25[_26].call(_25,this);
+}
+};
+dojo.event.MethodJoinPoint=function(obj,_28){
+this.object=obj||dj_global;
+this.methodname=_28;
+this.methodfunc=this.object[_28];
+this.squelch=false;
+};
+dojo.event.MethodJoinPoint.getForMethod=function(obj,_2a){
+if(!obj){
+obj=dj_global;
+}
+var ofn=obj[_2a];
+if(!ofn){
+ofn=obj[_2a]=function(){
+};
+if(!obj[_2a]){
+dojo.raise("Cannot set do-nothing method on that object "+_2a);
+}
+}else{
+if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
+return null;
+}
+}
+var _2c=_2a+"$joinpoint";
+var _2d=_2a+"$joinpoint$method";
+var _2e=obj[_2c];
+if(!_2e){
+var _2f=false;
+if(dojo.event["browser"]){
+if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
+_2f=true;
+dojo.event.browser.addClobberNodeAttrs(obj,[_2c,_2d,_2a]);
+}
+}
+var _30=ofn.length;
+obj[_2d]=ofn;
+_2e=obj[_2c]=new dojo.event.MethodJoinPoint(obj,_2d);
+if(!_2f){
+obj[_2a]=function(){
+return _2e.run.apply(_2e,arguments);
+};
+}else{
+obj[_2a]=function(){
+var _31=[];
+if(!arguments.length){
+var evt=null;
+try{
+if(obj.ownerDocument){
+evt=obj.ownerDocument.parentWindow.event;
+}else{
+if(obj.documentElement){
+evt=obj.documentElement.ownerDocument.parentWindow.event;
+}else{
+if(obj.event){
+evt=obj.event;
+}else{
+evt=window.event;
+}
+}
+}
+}
+catch(e){
+evt=window.event;
+}
+if(evt){
+_31.push(dojo.event.browser.fixEvent(evt,this));
+}
+}else{
+for(var x=0;x<arguments.length;x++){
+if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
+_31.push(dojo.event.browser.fixEvent(arguments[x],this));
+}else{
+_31.push(arguments[x]);
+}
+}
+}
+return _2e.run.apply(_2e,_31);
+};
+}
+obj[_2a].__preJoinArity=_30;
+}
+return _2e;
+};
+dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){
+this.object[this.methodname]=this.methodfunc;
+this.before=[];
+this.after=[];
+this.around=[];
+},disconnect:dojo.lang.forward("unintercept"),run:function(){
+var obj=this.object||dj_global;
+var _35=arguments;
+var _36=[];
+for(var x=0;x<_35.length;x++){
+_36[x]=_35[x];
+}
+var _38=function(_39){
+if(!_39){
+dojo.debug("Null argument to unrollAdvice()");
+return;
+}
+var _3a=_39[0]||dj_global;
+var _3b=_39[1];
+if(!_3a[_3b]){
+dojo.raise("function \""+_3b+"\" does not exist on \""+_3a+"\"");
+}
+var _3c=_39[2]||dj_global;
+var _3d=_39[3];
+var msg=_39[6];
+var _3f=_39[7];
+if(_3f>-1){
+if(_3f==0){
+return;
+}
+_39[7]--;
+}
+var _40;
+var to={args:[],jp_:this,object:obj,proceed:function(){
+return _3a[_3b].apply(_3a,to.args);
+}};
+to.args=_36;
+var _42=parseInt(_39[4]);
+var _43=((!isNaN(_42))&&(_39[4]!==null)&&(typeof _39[4]!="undefined"));
+if(_39[5]){
+var _44=parseInt(_39[5]);
+var cur=new Date();
+var _46=false;
+if((_39["last"])&&((cur-_39.last)<=_44)){
+if(dojo.event._canTimeout){
+if(_39["delayTimer"]){
+clearTimeout(_39.delayTimer);
+}
+var tod=parseInt(_44*2);
+var _48=dojo.lang.shallowCopy(_39);
+_39.delayTimer=setTimeout(function(){
+_48[5]=0;
+_38(_48);
+},tod);
+}
+return;
+}else{
+_39.last=cur;
+}
+}
+if(_3d){
+_3c[_3d].call(_3c,to);
+}else{
+if((_43)&&((dojo.render.html)||(dojo.render.svg))){
+dj_global["setTimeout"](function(){
+if(msg){
+_3a[_3b].call(_3a,to);
+}else{
+_3a[_3b].apply(_3a,_35);
+}
+},_42);
+}else{
+if(msg){
+_3a[_3b].call(_3a,to);
+}else{
+_3a[_3b].apply(_3a,_35);
+}
+}
+}
+};
+var _49=function(){
+if(this.squelch){
+try{
+return _38.apply(this,arguments);
+}
+catch(e){
+dojo.debug(e);
+}
+}else{
+return _38.apply(this,arguments);
+}
+};
+if((this["before"])&&(this.before.length>0)){
+dojo.lang.forEach(this.before.concat(new Array()),_49);
+}
+var _4a;
+try{
+if((this["around"])&&(this.around.length>0)){
+var mi=new dojo.event.MethodInvocation(this,obj,_35);
+_4a=mi.proceed();
+}else{
+if(this.methodfunc){
+_4a=this.object[this.methodname].apply(this.object,_35);
+}
+}
+}
+catch(e){
+if(!this.squelch){
+dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",_35);
+dojo.raise(e);
+}
+}
+if((this["after"])&&(this.after.length>0)){
+dojo.lang.forEach(this.after.concat(new Array()),_49);
+}
+return (this.methodfunc)?_4a:null;
+},getArr:function(_4c){
+var _4d="after";
+if((typeof _4c=="string")&&(_4c.indexOf("before")!=-1)){
+_4d="before";
+}else{
+if(_4c=="around"){
+_4d="around";
+}
+}
+if(!this[_4d]){
+this[_4d]=[];
+}
+return this[_4d];
+},kwAddAdvice:function(_4e){
+this.addAdvice(_4e["adviceObj"],_4e["adviceFunc"],_4e["aroundObj"],_4e["aroundFunc"],_4e["adviceType"],_4e["precedence"],_4e["once"],_4e["delay"],_4e["rate"],_4e["adviceMsg"],_4e["maxCalls"]);
+},addAdvice:function(_4f,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59){
+var arr=this.getArr(_53);
+if(!arr){
+dojo.raise("bad this: "+this);
+}
+var ao=[_4f,_50,_51,_52,_56,_57,_58,_59];
+if(_55){
+if(this.hasAdvice(_4f,_50,_53,arr)>=0){
+return;
+}
+}
+if(_54=="first"){
+arr.unshift(ao);
+}else{
+arr.push(ao);
+}
+},hasAdvice:function(_5c,_5d,_5e,arr){
+if(!arr){
+arr=this.getArr(_5e);
+}
+var ind=-1;
+for(var x=0;x<arr.length;x++){
+var aao=(typeof _5d=="object")?(new String(_5d)).toString():_5d;
+var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
+if((arr[x][0]==_5c)&&(a1o==aao)){
+ind=x;
+}
+}
+return ind;
+},removeAdvice:function(_64,_65,_66,_67){
+var arr=this.getArr(_66);
+var ind=this.hasAdvice(_64,_65,_66,arr);
+if(ind==-1){
+return false;
+}
+while(ind!=-1){
+arr.splice(ind,1);
+if(_67){
+break;
+}
+ind=this.hasAdvice(_64,_65,_66,arr);
+}
+return true;
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/common.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/common.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/common.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/topic.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/topic.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/topic.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/topic.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,66 @@
+dojo.require("dojo.event.common");
+dojo.provide("dojo.event.topic");
+dojo.event.topic=new function(){
+this.topics={};
+this.getTopic=function(_1){
+if(!this.topics[_1]){
+this.topics[_1]=new this.TopicImpl(_1);
+}
+return this.topics[_1];
+};
+this.registerPublisher=function(_2,_3,_4){
+var _2=this.getTopic(_2);
+_2.registerPublisher(_3,_4);
+};
+this.subscribe=function(_5,_6,_7){
+var _5=this.getTopic(_5);
+_5.subscribe(_6,_7);
+};
+this.unsubscribe=function(_8,_9,_a){
+var _8=this.getTopic(_8);
+_8.unsubscribe(_9,_a);
+};
+this.destroy=function(_b){
+this.getTopic(_b).destroy();
+delete this.topics[_b];
+};
+this.publishApply=function(_c,_d){
+var _c=this.getTopic(_c);
+_c.sendMessage.apply(_c,_d);
+};
+this.publish=function(_e,_f){
+var _e=this.getTopic(_e);
+var _10=[];
+for(var x=1;x<arguments.length;x++){
+_10.push(arguments[x]);
+}
+_e.sendMessage.apply(_e,_10);
+};
+};
+dojo.event.topic.TopicImpl=function(_12){
+this.topicName=_12;
+this.subscribe=function(_13,_14){
+var tf=_14||_13;
+var to=(!_14)?dj_global:_13;
+return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
+};
+this.unsubscribe=function(_17,_18){
+var tf=(!_18)?_17:_18;
+var to=(!_18)?null:_17;
+return dojo.event.kwDisconnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
+};
+this._getJoinPoint=function(){
+return dojo.event.MethodJoinPoint.getForMethod(this,"sendMessage");
+};
+this.setSquelch=function(_1b){
+this._getJoinPoint().squelch=_1b;
+};
+this.destroy=function(){
+this._getJoinPoint().disconnect();
+};
+this.registerPublisher=function(_1c,_1d){
+dojo.event.connect(_1c,_1d,this,"sendMessage");
+};
+this.sendMessage=function(_1e){
+};
+};

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/topic.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/topic.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event/topic.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/experimental.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/experimental.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/experimental.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/experimental.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,9 @@
+dojo.provide("dojo.experimental");
+dojo.experimental=function(_1,_2){
+var _3="EXPERIMENTAL: "+_1;
+_3+=" -- Not yet ready for use.  APIs subject to change without notice.";
+if(_2){
+_3+=" "+_2;
+}
+dojo.debug(_3);
+};

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/experimental.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/experimental.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/experimental.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,433 @@
+dojo.provide("dojo.flash");
+dojo.require("dojo.string.*");
+dojo.require("dojo.uri.*");
+dojo.require("dojo.html.common");
+dojo.flash=function(){
+};
+dojo.flash={flash6_version:null,flash8_version:null,ready:false,_visible:true,_loadedListeners:new Array(),_installingListeners:new Array(),setSwf:function(_1){
+if(_1==null||dojo.lang.isUndefined(_1)){
+return;
+}
+if(_1.flash6!=null&&!dojo.lang.isUndefined(_1.flash6)){
+this.flash6_version=_1.flash6;
+}
+if(_1.flash8!=null&&!dojo.lang.isUndefined(_1.flash8)){
+this.flash8_version=_1.flash8;
+}
+if(!dojo.lang.isUndefined(_1.visible)){
+this._visible=_1.visible;
+}
+this._initialize();
+},useFlash6:function(){
+if(this.flash6_version==null){
+return false;
+}else{
+if(this.flash6_version!=null&&dojo.flash.info.commVersion==6){
+return true;
+}else{
+return false;
+}
+}
+},useFlash8:function(){
+if(this.flash8_version==null){
+return false;
+}else{
+if(this.flash8_version!=null&&dojo.flash.info.commVersion==8){
+return true;
+}else{
+return false;
+}
+}
+},addLoadedListener:function(_2){
+this._loadedListeners.push(_2);
+},addInstallingListener:function(_3){
+this._installingListeners.push(_3);
+},loaded:function(){
+dojo.flash.ready=true;
+if(dojo.flash._loadedListeners.length>0){
+for(var i=0;i<dojo.flash._loadedListeners.length;i++){
+dojo.flash._loadedListeners[i].call(null);
+}
+}
+},installing:function(){
+if(dojo.flash._installingListeners.length>0){
+for(var i=0;i<dojo.flash._installingListeners.length;i++){
+dojo.flash._installingListeners[i].call(null);
+}
+}
+},_initialize:function(){
+var _6=new dojo.flash.Install();
+dojo.flash.installer=_6;
+if(_6.needed()==true){
+_6.install();
+}else{
+dojo.flash.obj=new dojo.flash.Embed(this._visible);
+dojo.flash.obj.write(dojo.flash.info.commVersion);
+dojo.flash.comm=new dojo.flash.Communicator();
+}
+}};
+dojo.flash.Info=function(){
+if(dojo.render.html.ie){
+document.writeln("<script language=\"VBScript\" type=\"text/vbscript\">");
+document.writeln("Function VBGetSwfVer(i)");
+document.writeln("  on error resume next");
+document.writeln("  Dim swControl, swVersion");
+document.writeln("  swVersion = 0");
+document.writeln("  set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))");
+document.writeln("  if (IsObject(swControl)) then");
+document.writeln("    swVersion = swControl.GetVariable(\"$version\")");
+document.writeln("  end if");
+document.writeln("  VBGetSwfVer = swVersion");
+document.writeln("End Function");
+document.writeln("</script>");
+}
+this._detectVersion();
+this._detectCommunicationVersion();
+};
+dojo.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,commVersion:6,installing:false,isVersionOrAbove:function(_7,_8,_9){
+_9=parseFloat("."+_9);
+if(this.versionMajor>=_7&&this.versionMinor>=_8&&this.versionRevision>=_9){
+return true;
+}else{
+return false;
+}
+},_detectVersion:function(){
+var _a;
+for(var _b=25;_b>0;_b--){
+if(dojo.render.html.ie){
+_a=VBGetSwfVer(_b);
+}else{
+_a=this._JSFlashInfo(_b);
+}
+if(_a==-1){
+this.capable=false;
+return;
+}else{
+if(_a!=0){
+var _c;
+if(dojo.render.html.ie){
+var _d=_a.split(" ");
+var _e=_d[1];
+_c=_e.split(",");
+}else{
+_c=_a.split(".");
+}
+this.versionMajor=_c[0];
+this.versionMinor=_c[1];
+this.versionRevision=_c[2];
+var _f=this.versionMajor+"."+this.versionRevision;
+this.version=parseFloat(_f);
+this.capable=true;
+break;
+}
+}
+}
+},_JSFlashInfo:function(_10){
+if(navigator.plugins!=null&&navigator.plugins.length>0){
+if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
+var _11=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
+var _12=navigator.plugins["Shockwave Flash"+_11].description;
+var _13=_12.split(" ");
+var _14=_13[2].split(".");
+var _15=_14[0];
+var _16=_14[1];
+if(_13[3]!=""){
+var _17=_13[3].split("r");
+}else{
+var _17=_13[4].split("r");
+}
+var _18=_17[1]>0?_17[1]:0;
+var _19=_15+"."+_16+"."+_18;
+return _19;
+}
+}
+return -1;
+},_detectCommunicationVersion:function(){
+if(this.capable==false){
+this.commVersion=null;
+return;
+}
+if(typeof djConfig["forceFlashComm"]!="undefined"&&typeof djConfig["forceFlashComm"]!=null){
+this.commVersion=djConfig["forceFlashComm"];
+return;
+}
+if(dojo.render.html.safari==true||dojo.render.html.opera==true){
+this.commVersion=8;
+}else{
+this.commVersion=6;
+}
+}};
+dojo.flash.Embed=function(_1a){
+this._visible=_1a;
+};
+dojo.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){
+switch(window.location.protocol){
+case "https:":
+return "https";
+break;
+default:
+return "http";
+break;
+}
+},write:function(_1b,_1c){
+if(dojo.lang.isUndefined(_1c)){
+_1c=false;
+}
+var _1d=new dojo.string.Builder();
+_1d.append("width: "+this.width+"px; ");
+_1d.append("height: "+this.height+"px; ");
+if(this._visible==false){
+_1d.append("position: absolute; ");
+_1d.append("z-index: 10000; ");
+_1d.append("top: -1000px; ");
+_1d.append("left: -1000px; ");
+}
+_1d=_1d.toString();
+var _1e;
+var _1f;
+if(_1b==6){
+_1f=dojo.flash.flash6_version;
+var _20=djConfig.baseRelativePath;
+_1f=_1f+"?baseRelativePath="+escape(_20);
+_1e="<embed id=\""+this.id+"\" src=\""+_1f+"\" "+"    quality=\"high\" bgcolor=\"#ffffff\" "+"    width=\""+this.width+"\" height=\""+this.height+"\" "+"    name=\""+this.id+"\" "+"    align=\"middle\" allowScriptAccess=\"sameDomain\" "+"    type=\"application/x-shockwave-flash\" swLiveConnect=\"true\" "+"    pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\">";
+}else{
+_1f=dojo.flash.flash8_version;
+var _21=_1f;
+var _22=_1f;
+var _20=djConfig.baseRelativePath;
+if(_1c){
+var _23=escape(window.location);
+document.title=document.title.slice(0,47)+" - Flash Player Installation";
+var _24=escape(document.title);
+_21+="?MMredirectURL="+_23+"&MMplayerType=ActiveX"+"&MMdoctitle="+_24+"&baseRelativePath="+escape(_20);
+_22+="?MMredirectURL="+_23+"&MMplayerType=PlugIn"+"&baseRelativePath="+escape(_20);
+}
+if(_22.indexOf("?")==-1){
+_22+="?baseRelativePath="+escape(_20)+"' ";
+}
+_1e="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+"codebase=\""+this.protocol()+"://fpdownload.macromedia.com/pub/shockwave/cabs/flash/"+"swflash.cab#version=8,0,0,0\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"align=\"middle\"> "+"<param name=\"allowScriptAccess\" value=\"sameDomain\" /> "+"<param name=\"movie\" value=\""+_21+"\" /> "+"<param name=\"quality\" value=\"high\" /> "+"<param name=\"bgcolor\" value=\"#ffffff\" /> "+"<embed src=\""+_22+"' "+"quality=\"high\" "+"bgcolor=\"#ffffff\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"name=\""+this.id+"\" "+"swLiveConnect=\"true\" "+"align=\"middle\" "+"allowScriptAccess=\"sameDomain\" "+"type=\"application/x-shockwave-flash\" "+"pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\" />"+"</object>";
+}
+_1e="<div id=\""+this.id+"Container\" style=\""+_1d+"\"> "+_1e+"</div>";
+document.writeln(_1e);
+},get:function(){
+return document.getElementById(this.id);
+},setVisible:function(_25){
+var _26=dojo.byId(this.id+"Container");
+if(_25==true){
+_26.style.visibility="visible";
+}else{
+_26.style.position="absolute";
+_26.style.x="-1000px";
+_26.style.y="-1000px";
+_26.style.visibility="hidden";
+}
+},center:function(){
+var _27=this.width;
+var _28=this.height;
+var _29=dojo.html.getScroll().offset;
+var _2a=dojo.html.getViewport();
+var x=_29.x+(_2a.width-_27)/2;
+var y=_29.y+(_2a.height-_28)/2;
+var _2d=dojo.byId(this.id+"Container");
+_2d.style.top=y+"px";
+_2d.style.left=x+"px";
+}};
+dojo.flash.Communicator=function(){
+if(dojo.flash.useFlash6()){
+this._writeFlash6();
+}else{
+if(dojo.flash.useFlash8()){
+this._writeFlash8();
+}
+}
+};
+dojo.flash.Communicator.prototype={_writeFlash6:function(){
+var id=dojo.flash.obj.id;
+document.writeln("<script language=\"JavaScript\">");
+document.writeln("  function "+id+"_DoFSCommand(command, args){ ");
+document.writeln("    dojo.flash.comm._handleFSCommand(command, args); ");
+document.writeln("}");
+document.writeln("</script>");
+if(dojo.render.html.ie){
+document.writeln("<SCRIPT LANGUAGE=VBScript> ");
+document.writeln("on error resume next ");
+document.writeln("Sub "+id+"_FSCommand(ByVal command, ByVal args)");
+document.writeln(" call "+id+"_DoFSCommand(command, args)");
+document.writeln("end sub");
+document.writeln("</SCRIPT> ");
+}
+},_writeFlash8:function(){
+},_handleFSCommand:function(_2f,_30){
+if(_2f!=null&&!dojo.lang.isUndefined(_2f)&&/^FSCommand:(.*)/.test(_2f)==true){
+_2f=_2f.match(/^FSCommand:(.*)/)[1];
+}
+if(_2f=="addCallback"){
+this._fscommandAddCallback(_2f,_30);
+}else{
+if(_2f=="call"){
+this._fscommandCall(_2f,_30);
+}else{
+if(_2f=="fscommandReady"){
+this._fscommandReady();
+}
+}
+}
+},_fscommandAddCallback:function(_31,_32){
+var _33=_32;
+var _34=function(){
+return dojo.flash.comm._call(_33,arguments);
+};
+dojo.flash.comm[_33]=_34;
+dojo.flash.obj.get().SetVariable("_succeeded",true);
+},_fscommandCall:function(_35,_36){
+var _37=dojo.flash.obj.get();
+var _38=_36;
+var _39=parseInt(_37.GetVariable("_numArgs"));
+var _3a=new Array();
+for(var i=0;i<_39;i++){
+var _3c=_37.GetVariable("_"+i);
+_3a.push(_3c);
+}
+var _3d;
+if(_38.indexOf(".")==-1){
+_3d=window[_38];
+}else{
+_3d=eval(_38);
+}
+var _3e=null;
+if(!dojo.lang.isUndefined(_3d)&&_3d!=null){
+_3e=_3d.apply(null,_3a);
+}
+_37.SetVariable("_returnResult",_3e);
+},_fscommandReady:function(){
+var _3f=dojo.flash.obj.get();
+_3f.SetVariable("fscommandReady","true");
+},_call:function(_40,_41){
+var _42=dojo.flash.obj.get();
+_42.SetVariable("_functionName",_40);
+_42.SetVariable("_numArgs",_41.length);
+for(var i=0;i<_41.length;i++){
+var _44=_41[i];
+_44=_44.replace(/\0/g,"\\0");
+_42.SetVariable("_"+i,_44);
+}
+_42.TCallLabel("/_flashRunner","execute");
+var _45=_42.GetVariable("_returnResult");
+_45=_45.replace(/\\0/g,"\x00");
+return _45;
+},_addExternalInterfaceCallback:function(_46){
+var _47=function(){
+var _48=new Array(arguments.length);
+for(var i=0;i<arguments.length;i++){
+_48[i]=arguments[i];
+}
+return dojo.flash.comm._execFlash(_46,_48);
+};
+dojo.flash.comm[_46]=_47;
+},_encodeData:function(_4a){
+var _4b=/\&([^;]*)\;/g;
+_4a=_4a.replace(_4b,"&amp;$1;");
+_4a=_4a.replace(/</g,"&lt;");
+_4a=_4a.replace(/>/g,"&gt;");
+_4a=_4a.replace("\\","&custom_backslash;&custom_backslash;");
+_4a=_4a.replace(/\n/g,"\\n");
+_4a=_4a.replace(/\r/g,"\\r");
+_4a=_4a.replace(/\f/g,"\\f");
+_4a=_4a.replace(/\0/g,"\\0");
+_4a=_4a.replace(/\'/g,"\\'");
+_4a=_4a.replace(/\"/g,"\\\"");
+return _4a;
+},_decodeData:function(_4c){
+if(_4c==null||typeof _4c=="undefined"){
+return _4c;
+}
+_4c=_4c.replace(/\&custom_lt\;/g,"<");
+_4c=_4c.replace(/\&custom_gt\;/g,">");
+_4c=eval("\""+_4c+"\"");
+return _4c;
+},_chunkArgumentData:function(_4d,_4e){
+var _4f=dojo.flash.obj.get();
+var _50=Math.ceil(_4d.length/1024);
+for(var i=0;i<_50;i++){
+var _52=i*1024;
+var _53=i*1024+1024;
+if(i==(_50-1)){
+_53=i*1024+_4d.length;
+}
+var _54=_4d.substring(_52,_53);
+_54=this._encodeData(_54);
+_4f.CallFunction("<invoke name=\"chunkArgumentData\" "+"returntype=\"javascript\">"+"<arguments>"+"<string>"+_54+"</string>"+"<number>"+_4e+"</number>"+"</arguments>"+"</invoke>");
+}
+},_chunkReturnData:function(){
+var _55=dojo.flash.obj.get();
+var _56=_55.getReturnLength();
+var _57=new Array();
+for(var i=0;i<_56;i++){
+var _59=_55.CallFunction("<invoke name=\"chunkReturnData\" "+"returntype=\"javascript\">"+"<arguments>"+"<number>"+i+"</number>"+"</arguments>"+"</invoke>");
+if(_59=="\"\""||_59=="''"){
+_59="";
+}else{
+_59=_59.substring(1,_59.length-1);
+}
+_57.push(_59);
+}
+var _5a=_57.join("");
+return _5a;
+},_execFlash:function(_5b,_5c){
+var _5d=dojo.flash.obj.get();
+_5d.startExec();
+_5d.setNumberArguments(_5c.length);
+for(var i=0;i<_5c.length;i++){
+this._chunkArgumentData(_5c[i],i);
+}
+_5d.exec(_5b);
+var _5f=this._chunkReturnData();
+_5f=this._decodeData(_5f);
+_5d.endExec();
+return _5f;
+}};
+dojo.flash.Install=function(){
+};
+dojo.flash.Install.prototype={needed:function(){
+if(dojo.flash.info.capable==false){
+return true;
+}
+if(dojo.render.os.mac==true&&!dojo.flash.info.isVersionOrAbove(8,0,0)){
+return true;
+}
+if(!dojo.flash.info.isVersionOrAbove(6,0,0)){
+return true;
+}
+return false;
+},install:function(){
+dojo.flash.info.installing=true;
+dojo.flash.installing();
+if(dojo.flash.info.capable==false){
+var _60=new dojo.flash.Embed(false);
+_60.write(8);
+}else{
+if(dojo.flash.info.isVersionOrAbove(6,0,65)){
+var _60=new dojo.flash.Embed(false);
+_60.write(8,true);
+_60.setVisible(true);
+_60.center();
+}else{
+alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
+window.location.href=+dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
+}
+}
+},_onInstallStatus:function(msg){
+if(msg=="Download.Complete"){
+dojo.flash._initialize();
+}else{
+if(msg=="Download.Cancelled"){
+alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
+window.location.href=dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
+}else{
+if(msg=="Download.Failed"){
+alert("There was an error downloading the Flash Player update. "+"Please try again later, or visit macromedia.com to download "+"the latest version of the Flash plugin.");
+}
+}
+}
+}};
+dojo.flash.info=new dojo.flash.Info();

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash6/DojoExternalInterface.as
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash6/DojoExternalInterface.as?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash6/DojoExternalInterface.as (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash6/DojoExternalInterface.as Mon Feb  4 14:07:13 2008
@@ -0,0 +1,215 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/** 
+		An implementation of Flash 8's ExternalInterface that works with Flash 6
+		and which is source-compatible with Flash 8. 
+		
+		@author Brad Neuberg, bkn3@columbia.edu 
+*/
+
+class DojoExternalInterface{
+	public static var available:Boolean;
+	public static var dojoPath = "";
+	
+	public static var _fscommandReady = false;
+	public static var _callbacks = new Array();
+
+	public static function initialize(){ 
+		//getURL("javascript:dojo.debug('FLASH:DojoExternalInterface initialize')");
+		// FIXME: Set available variable by testing for capabilities
+		DojoExternalInterface.available = true;
+		
+		// extract the dojo base path
+		DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath();
+		//getURL("javascript:dojo.debug('FLASH:dojoPath="+DojoExternalInterface.dojoPath+"')");
+		
+		// Sometimes, on IE, the fscommand infrastructure can take a few hundred
+		// milliseconds the first time a page loads. Set a timer to keep checking
+		// to make sure we can issue fscommands; otherwise, our calls to fscommand
+		// for setCallback() and loaded() will just "disappear"
+		_root.fscommandReady = false;
+		var fsChecker = function(){
+			// issue a test fscommand
+			fscommand("fscommandReady");
+			
+			// JavaScript should set _root.fscommandReady if it got the call
+			if(_root.fscommandReady == "true"){
+				DojoExternalInterface._fscommandReady = true;
+				clearInterval(_root.fsTimer);
+			}
+		};
+		_root.fsTimer = setInterval(fsChecker, 100);
+	}
+	
+	public static function addCallback(methodName:String, instance:Object, 
+											method:Function) : Boolean{
+		// A variable that indicates whether the call below succeeded
+		_root._succeeded = null;
+		
+		// Callbacks are registered with the JavaScript side as follows.
+		// On the Flash side, we maintain a lookup table that associates
+		// the methodName with the actual instance and method that are
+		// associated with this method.
+		// Using fscommand, we send over the action "addCallback", with the
+		// argument being the methodName to add, such as "foobar".
+		// The JavaScript takes these values and registers the existence of
+		// this callback point.
+		
+		// precede the method name with a _ character in case it starts
+		// with a number
+		_callbacks["_" + methodName] = {_instance: instance, _method: method};
+		_callbacks[_callbacks.length] = methodName;
+		
+		// The API for ExternalInterface says we have to make sure the call
+		// succeeded; check to see if there is a value 
+		// for _succeeded, which is set by the JavaScript side
+		if(_root._succeeded == null){
+			return false;
+		}else{
+			return true;
+		}
+	}
+	
+	public static function call(methodName:String, 
+								resultsCallback:Function) : Void{
+		// FIXME: support full JSON serialization
+		
+		// First, we pack up all of the arguments to this call and set them
+		// as Flash variables, which the JavaScript side will unpack using
+		// plugin.GetVariable(). We set the number of arguments as "_numArgs",
+		// and add each argument as a variable, such as "_1", "_2", etc., starting
+		// from 0.
+		// We then execute an fscommand with the action "call" and the
+		// argument being the method name. JavaScript takes the method name,
+		// retrieves the arguments using GetVariable, executes the method,
+		// and then places the return result in a Flash variable
+		// named "_returnResult".
+		_root._numArgs = arguments.length - 2;
+		for(var i = 2; i < arguments.length; i++){
+			var argIndex = i - 2;
+			_root["_" + argIndex] = arguments[i];
+		}
+		
+		_root._returnResult = undefined;
+		fscommand("call", methodName);
+		
+		// immediately return if the caller is not waiting for return results
+		if(resultsCallback == undefined || resultsCallback == null){
+			return;
+		}
+		
+		// check at regular intervals for return results	
+		var resultsChecker = function(){
+			if((typeof _root._returnResult != "undefined")&&
+				(_root._returnResult != "undefined")){
+				clearInterval(_root._callbackID);
+				resultsCallback.call(null, _root._returnResult);
+			}
+		};	
+		_root._callbackID = setInterval(resultsChecker, 100);
+	}
+	
+	/** 
+			Called by Flash to indicate to JavaScript that we are ready to have
+			our Flash functions called. Calling loaded()
+			will fire the dojo.flash.loaded() event, so that JavaScript can know that
+			Flash has finished loading and adding its callbacks, and can begin to
+			interact with the Flash file.
+	*/
+	public static function loaded(){
+		//getURL("javascript:dojo.debug('FLASH:loaded')");
+		
+		// one more step: see if fscommands are ready to be executed; if not,
+		// set an interval that will keep running until fscommands are ready;
+		// make sure the gateway is loaded as well
+		var execLoaded = function(){
+			if(DojoExternalInterface._fscommandReady == true){
+				clearInterval(_root.loadedInterval);
+				
+				// initialize the small Flash file that helps gateway JS to Flash
+				// calls
+				DojoExternalInterface._initializeFlashRunner();
+			}	
+		};
+		
+		if(_fscommandReady == true){
+			execLoaded();
+		}else{
+			_root.loadedInterval = setInterval(execLoaded, 50);
+		}
+	}
+	
+	/** 
+			Handles and executes a JavaScript to Flash method call. Used by
+			initializeFlashRunner. 
+	*/
+	public static function _handleJSCall(){
+		// get our parameters
+		var numArgs = parseInt(_root._numArgs);
+		var jsArgs = new Array();
+		for(var i = 0; i < numArgs; i++){
+			var currentValue = _root["_" + i];
+			jsArgs.push(currentValue);
+		}
+		
+		// get our function name
+		var functionName = _root._functionName;
+		
+		// now get the actual instance and method object to execute on,
+		// using our lookup table that was constructed by calls to
+		// addCallback on initialization
+		var instance = _callbacks["_" + functionName]._instance;
+		var method = _callbacks["_" + functionName]._method;
+		
+		// execute it
+		var results = method.apply(instance, jsArgs);
+		
+		// return the results
+		_root._returnResult = results;
+	}
+	
+	/** Called by the flash6_gateway.swf to indicate that it is loaded. */
+	public static function _gatewayReady(){
+		for(var i = 0; i < _callbacks.length; i++){
+			fscommand("addCallback", _callbacks[i]);
+		}
+		call("dojo.flash.loaded");
+	}
+	
+	/** 
+			When JavaScript wants to communicate with Flash it simply sets
+			the Flash variable "_execute" to true; this method creates the
+			internal Movie Clip, called the Flash Runner, that makes this
+			magic happen.
+	*/
+	public static function _initializeFlashRunner(){
+		// figure out where our Flash movie is
+		var swfLoc = DojoExternalInterface.dojoPath + "flash6_gateway.swf";
+		
+		// load our gateway helper file
+		_root.createEmptyMovieClip("_flashRunner", 5000);
+		_root._flashRunner._lockroot = true;
+		_root._flashRunner.loadMovie(swfLoc);
+	}
+	
+	private static function getDojoPath(){
+		var url = _root._url;
+		var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length;
+		var path = url.substring(start);
+		var end = path.indexOf("&");
+		if(end != -1){
+			path = path.substring(0, end);
+		}
+		return path;
+	}
+}
+
+// vim:ts=4:noet:tw=0:

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash6/flash6_gateway.fla
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash6/flash6_gateway.fla?rev=618461&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash6/flash6_gateway.fla
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/DojoExternalInterface.as
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/DojoExternalInterface.as?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/DojoExternalInterface.as (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/DojoExternalInterface.as Mon Feb  4 14:07:13 2008
@@ -0,0 +1,234 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/**
+	A wrapper around Flash 8's ExternalInterface; DojoExternalInterface is needed so that we
+	can do a Flash 6 implementation of ExternalInterface, and be able
+	to support having a single codebase that uses DojoExternalInterface
+	across Flash versions rather than having two seperate source bases,
+	where one uses ExternalInterface and the other uses DojoExternalInterface.
+	
+	DojoExternalInterface class does a variety of optimizations to bypass ExternalInterface's
+	unbelievably bad performance so that we can have good performance
+	on Safari; see the blog post
+	http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html
+	for details.
+	
+	@author Brad Neuberg, bkn3@columbia.edu
+*/
+import flash.external.ExternalInterface;
+
+class DojoExternalInterface{
+	public static var available:Boolean;
+	public static var dojoPath = "";
+	
+	private static var flashMethods:Array = new Array();
+	private static var numArgs:Number;
+	private static var argData:Array;
+	private static var resultData = null;
+	
+	public static function initialize(){
+		// extract the dojo base path
+		DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath();
+		
+		// see if we need to do an express install
+		var install:ExpressInstall = new ExpressInstall();
+		if(install.needsUpdate){
+			install.init();
+		}
+		
+		// register our callback functions
+		ExternalInterface.addCallback("startExec", DojoExternalInterface, startExec);
+		ExternalInterface.addCallback("setNumberArguments", DojoExternalInterface,
+																	setNumberArguments);
+		ExternalInterface.addCallback("chunkArgumentData", DojoExternalInterface,
+																	chunkArgumentData);
+		ExternalInterface.addCallback("exec", DojoExternalInterface, exec);
+		ExternalInterface.addCallback("getReturnLength", DojoExternalInterface,
+																	getReturnLength);
+		ExternalInterface.addCallback("chunkReturnData", DojoExternalInterface,
+																	chunkReturnData);
+		ExternalInterface.addCallback("endExec", DojoExternalInterface, endExec);
+		
+		// set whether communication is available
+		DojoExternalInterface.available = ExternalInterface.available;
+		DojoExternalInterface.call("loaded");
+	}
+	
+	public static function addCallback(methodName:String, instance:Object, 
+										 								 method:Function) : Boolean{
+		// register DojoExternalInterface methodName with it's instance
+		DojoExternalInterface.flashMethods[methodName] = instance;
+		
+		// tell JavaScript about DojoExternalInterface new method so we can create a proxy
+		ExternalInterface.call("dojo.flash.comm._addExternalInterfaceCallback", 
+													 methodName);
+													 
+		return true;
+	}
+	
+	public static function call(methodName:String,
+								resultsCallback:Function) : Void{
+		// we might have any number of optional arguments, so we have to 
+		// pass them in dynamically; strip out the results callback
+		var parameters = new Array();
+		for(var i = 0; i < arguments.length; i++){
+			if(i != 1){ // skip the callback
+				parameters.push(arguments[i]);
+			}
+		}
+		
+		var results = ExternalInterface.call.apply(ExternalInterface, parameters);
+		
+		// immediately give the results back, since ExternalInterface is
+		// synchronous
+		if(resultsCallback != null && typeof resultsCallback != "undefined"){
+			resultsCallback.call(null, results);
+		}
+	}
+	
+	/** 
+			Called by Flash to indicate to JavaScript that we are ready to have
+			our Flash functions called. Calling loaded()
+			will fire the dojo.flash.loaded() event, so that JavaScript can know that
+			Flash has finished loading and adding its callbacks, and can begin to
+			interact with the Flash file.
+	*/
+	public static function loaded(){
+		DojoExternalInterface.call("dojo.flash.loaded");
+	}
+	
+	public static function startExec():Void{
+		DojoExternalInterface.numArgs = null;
+		DojoExternalInterface.argData = null;
+		DojoExternalInterface.resultData = null;
+	}
+	
+	public static function setNumberArguments(numArgs):Void{
+		DojoExternalInterface.numArgs = numArgs;
+		DojoExternalInterface.argData = new Array(DojoExternalInterface.numArgs);
+	}
+	
+	public static function chunkArgumentData(value, argIndex:Number):Void{
+		//getURL("javascript:dojo.debug('FLASH: chunkArgumentData, value="+value+", argIndex="+argIndex+"')");
+		var currentValue = DojoExternalInterface.argData[argIndex];
+		if(currentValue == null || typeof currentValue == "undefined"){
+			DojoExternalInterface.argData[argIndex] = value;
+		}else{
+			DojoExternalInterface.argData[argIndex] += value;
+		}
+	}
+	
+	public static function exec(methodName):Void{
+		// decode all of the arguments that were passed in
+		for(var i = 0; i < DojoExternalInterface.argData.length; i++){
+			DojoExternalInterface.argData[i] = 
+				DojoExternalInterface.decodeData(DojoExternalInterface.argData[i]);
+		}
+		
+		var instance = DojoExternalInterface.flashMethods[methodName];
+		DojoExternalInterface.resultData = instance[methodName].apply(
+																			instance, DojoExternalInterface.argData);
+		// encode the result data
+		DojoExternalInterface.resultData = 
+			DojoExternalInterface.encodeData(DojoExternalInterface.resultData);
+			
+		//getURL("javascript:dojo.debug('FLASH: encoded result data="+DojoExternalInterface.resultData+"')");
+	}
+	
+	public static function getReturnLength():Number{
+	 if(DojoExternalInterface.resultData == null || 
+	 					typeof DojoExternalInterface.resultData == "undefined"){
+	 	return 0;
+	 }
+	 var segments = Math.ceil(DojoExternalInterface.resultData.length / 1024);
+	 return segments;
+	}
+	
+	public static function chunkReturnData(segment:Number):String{
+		var numSegments = DojoExternalInterface.getReturnLength();
+		var startCut = segment * 1024;
+		var endCut = segment * 1024 + 1024;
+		if(segment == (numSegments - 1)){
+			endCut = segment * 1024 + DojoExternalInterface.resultData.length;
+		}
+			
+		var piece = DojoExternalInterface.resultData.substring(startCut, endCut);
+		
+		//getURL("javascript:dojo.debug('FLASH: chunking return piece="+piece+"')");
+		
+		return piece;
+	}
+	
+	public static function endExec():Void{
+	}
+	
+	private static function decodeData(data):String{
+		// we have to use custom encodings for certain characters when passing
+		// them over; for example, passing a backslash over as //// from JavaScript
+		// to Flash doesn't work
+		data = DojoExternalInterface.replaceStr(data, "&custom_backslash;", "\\");
+		
+		data = DojoExternalInterface.replaceStr(data, "\\\'", "\'");
+		data = DojoExternalInterface.replaceStr(data, "\\\"", "\"");
+		
+		return data;
+	}
+	
+	private static function encodeData(data){
+		//getURL("javascript:dojo.debug('inside flash, data before="+data+"')");
+
+		// double encode all entity values, or they will be mis-decoded
+		// by Flash when returned
+		data = DojoExternalInterface.replaceStr(data, "&", "&amp;");
+		
+		// certain XMLish characters break Flash's wire serialization for
+		// ExternalInterface; encode these into a custom encoding, rather than
+		// the standard entity encoding, because otherwise we won't be able to
+		// differentiate between our own encoding and any entity characters
+		// that are being used in the string itself
+		data = DojoExternalInterface.replaceStr(data, '<', '&custom_lt;');
+		data = DojoExternalInterface.replaceStr(data, '>', '&custom_gt;');
+		
+		// encode control characters and JavaScript delimiters
+		data = DojoExternalInterface.replaceStr(data, "\n", "\\n");
+		data = DojoExternalInterface.replaceStr(data, "\r", "\\r");
+		data = DojoExternalInterface.replaceStr(data, "\f", "\\f");
+		data = DojoExternalInterface.replaceStr(data, "'", "\\'");
+		data = DojoExternalInterface.replaceStr(data, '"', '\"');
+		
+		//getURL("javascript:dojo.debug('inside flash, data after="+data+"')");
+		return data;
+	}
+	
+	/** 
+			Flash ActionScript has no String.replace method or support for
+			Regular Expressions! We roll our own very simple one.
+	*/
+	private static function replaceStr(inputStr:String, replaceThis:String, 
+																		 withThis:String):String {
+		var splitStr = inputStr.split(replaceThis)
+		inputStr = splitStr.join(withThis)
+		return inputStr;
+	}
+	
+	private static function getDojoPath(){
+		var url = _root._url;
+		var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length;
+		var path = url.substring(start);
+		var end = path.indexOf("&");
+		if(end != -1){
+			path = path.substring(0, end);
+		}
+		return path;
+	}
+}
+
+// vim:ts=4:noet:tw=0:

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/ExpressInstall.as
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/ExpressInstall.as?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/ExpressInstall.as (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/flash/flash8/ExpressInstall.as Mon Feb  4 14:07:13 2008
@@ -0,0 +1,81 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/**
+ * Based on the expressinstall.as class created by Geoff Stearns as part
+ * of the FlashObject library.
+ *
+ * Use this file to invoke the Macromedia Flash Player Express Install functionality
+ * This file is intended for use with the FlashObject embed script. You can download FlashObject 
+ * and this file at the following URL: http://blog.deconcept.com/flashobject/
+ *
+ * Usage: 
+ *          var ExpressInstall = new ExpressInstall();
+ *          
+ *          // test to see if install is needed:
+ *          if (ExpressInstall.needsUpdate) { // returns true if update is needed
+ *              ExpressInstall.init(); // starts the update
+ *          }
+ *
+ *	NOTE: Your Flash movie must be at least 214px by 137px in order to use ExpressInstall.
+ *
+ */
+
+class ExpressInstall {
+	public var needsUpdate:Boolean;
+	private var updater:MovieClip;
+	private var hold:MovieClip;
+	
+	public function ExpressInstall(){
+		// does the user need to update?
+		this.needsUpdate = (_root.MMplayerType == undefined) ? false : true;	
+	}
+
+	public function init():Void{
+		this.loadUpdater();
+	}
+
+	public function loadUpdater():Void {
+		System.security.allowDomain("fpdownload.macromedia.com");
+
+		// hope that nothing is at a depth of 10000000, you can change this depth if needed, but you want
+		// it to be on top of your content if you have any stuff on the first frame
+		this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
+
+		// register the callback so we know if they cancel or there is an error
+		var _self = this;
+		this.updater.installStatus = _self.onInstallStatus;
+		this.hold = this.updater.createEmptyMovieClip("hold", 1);
+
+		// can't use movieClipLoader because it has to work in 6.0.65
+		this.updater.onEnterFrame = function():Void {
+			if(typeof this.hold.startUpdate == 'function'){
+				_self.initUpdater();
+				this.onEnterFrame = null;
+			}
+		}
+
+		var cacheBuster:Number = Math.random();
+
+		this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/"
+												+"update/current/swf/autoUpdater.swf?"+ cacheBuster);
+	}
+
+	private function initUpdater():Void{
+		this.hold.redirectURL = _root.MMredirectURL;
+		this.hold.MMplayerType = _root.MMplayerType;
+		this.hold.MMdoctitle = _root.MMdoctitle;
+		this.hold.startUpdate();
+	}
+
+	public function onInstallStatus(msg):Void{
+		getURL("javascript:dojo.flash.install._onInstallStatus('"+msg+"')");
+	}
+}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/Colorspace.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/Colorspace.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/Colorspace.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/Colorspace.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,710 @@
+dojo.provide("dojo.gfx.Colorspace");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.math.matrix");
+dojo.gfx.Colorspace=function(){
+this.whitePoint="D65";
+this.stdObserver="10";
+this.chromaticAdaptationAlg="bradford";
+this.RGBWorkingSpace="s_rgb";
+this.useApproxCIELabMapping=1;
+this.chainMaps={"RGB_to_xyY":["XYZ"],"xyY_to_RGB":["XYZ"],"RGB_to_Lab":["XYZ"],"Lab_to_RGB":["XYZ"],"RGB_to_LCHab":["XYZ","Lab"],"LCHab_to_RGB":["Lab"],"xyY_to_Lab":["XYZ"],"Lab_to_xyY":["XYZ"],"XYZ_to_LCHab":["Lab"],"LCHab_to_XYZ":["Lab"],"xyY_to_LCHab":["XYZ","Lab"],"LCHab_to_xyY":["Lab","XYZ"],"RGB_to_Luv":["XYZ"],"Luv_to_RGB":["XYZ"],"xyY_to_Luv":["XYZ"],"Luv_to_xyY":["XYZ"],"Lab_to_Luv":["XYZ"],"Luv_to_Lab":["XYZ"],"LCHab_to_Luv":["Lab","XYZ"],"Luv_to_LCHab":["XYZ","Lab"],"RGB_to_LCHuv":["XYZ","Luv"],"LCHuv_to_RGB":["Luv","XYZ"],"XYZ_to_LCHuv":["Luv"],"LCHuv_to_XYZ":["Luv"],"xyY_to_LCHuv":["XYZ","Luv"],"LCHuv_to_xyY":["Luv","XYZ"],"Lab_to_LCHuv":["XYZ","Luv"],"LCHuv_to_Lab":["Luv","XYZ"],"LCHab_to_LCHuv":["Lab","XYZ","Luv"],"LCHuv_to_LCHab":["Luv","XYZ","Lab"],"XYZ_to_CMY":["RGB"],"CMY_to_XYZ":["RGB"],"xyY_to_CMY":["RGB"],"CMY_to_xyY":["RGB"],"Lab_to_CMY":["RGB"],"CMY_to_Lab":["RGB"],"LCHab_to_CMY":["RGB"],"CMY_to_LCHab":["RGB"],"Luv_to_CMY":["RGB"],"CMY_to_Luv":["RGB"]
 ,"LCHuv_to_CMY":["RGB"],"CMY_to_LCHuv":["RGB"],"XYZ_to_HSL":["RGB"],"HSL_to_XYZ":["RGB"],"xyY_to_HSL":["RGB"],"HSL_to_xyY":["RGB"],"Lab_to_HSL":["RGB"],"HSL_to_Lab":["RGB"],"LCHab_to_HSL":["RGB"],"HSL_to_LCHab":["RGB"],"Luv_to_HSL":["RGB"],"HSL_to_Luv":["RGB"],"LCHuv_to_HSL":["RGB"],"HSL_to_LCHuv":["RGB"],"CMY_to_HSL":["RGB"],"HSL_to_CMY":["RGB"],"CMYK_to_HSL":["RGB"],"HSL_to_CMYK":["RGB"],"XYZ_to_HSV":["RGB"],"HSV_to_XYZ":["RGB"],"xyY_to_HSV":["RGB"],"HSV_to_xyY":["RGB"],"Lab_to_HSV":["RGB"],"HSV_to_Lab":["RGB"],"LCHab_to_HSV":["RGB"],"HSV_to_LCHab":["RGB"],"Luv_to_HSV":["RGB"],"HSV_to_Luv":["RGB"],"LCHuv_to_HSV":["RGB"],"HSV_to_LCHuv":["RGB"],"CMY_to_HSV":["RGB"],"HSV_to_CMY":["RGB"],"CMYK_to_HSV":["RGB"],"HSV_to_CMYK":["RGB"],"HSL_to_HSV":["RGB"],"HSV_to_HSL":["RGB"],"XYZ_to_CMYK":["RGB"],"CMYK_to_XYZ":["RGB"],"xyY_to_CMYK":["RGB"],"CMYK_to_xyY":["RGB"],"Lab_to_CMYK":["RGB"],"CMYK_to_Lab":["RGB"],"LCHab_to_CMYK":["RGB"],"CMYK_to_LCHab":["RGB"],"Luv_to_CMYK":["RGB"],"CMYK_
 to_Luv":["RGB"],"LCHuv_to_CMYK":["RGB"],"CMYK_to_LCHuv":["RGB"]};
+return this;
+};
+dojo.gfx.Colorspace.prototype.convert=function(_1,_2,_3){
+var k=_2+"_to_"+_3;
+if(this[k]){
+return this[k](_1);
+}else{
+if(this.chainMaps[k]){
+var _5=_2;
+var _6=this.chainMaps[k].concat();
+_6.push(_3);
+for(var i=0;i<_6.length;i++){
+_1=this.convert(_1,_5,_6[i]);
+_5=_6[i];
+}
+return _1;
+}else{
+dojo.debug("Can't convert from "+_2+" to "+_3);
+}
+}
+};
+dojo.gfx.Colorspace.prototype.munge=function(_8,_9){
+if(dojo.lang.isArray(_9[0])){
+_9=_9[0];
+}
+var _a=new Array();
+for(var i=0;i<_8.length;i++){
+_a[_8.charAt(i)]=_9[i];
+}
+return _a;
+};
+dojo.gfx.Colorspace.prototype.getWhitePoint=function(){
+var x=0;
+var y=0;
+var t=0;
+switch(this.stdObserver){
+case "2":
+switch(this.whitePoint){
+case "E":
+x=1/3;
+y=1/3;
+t=5400;
+break;
+case "D50":
+x=0.34567;
+y=0.3585;
+t=5000;
+break;
+case "D55":
+x=0.33242;
+y=0.34743;
+t=5500;
+break;
+case "D65":
+x=0.31271;
+y=0.32902;
+t=6500;
+break;
+case "D75":
+x=0.29902;
+y=0.31485;
+t=7500;
+break;
+case "A":
+x=0.44757;
+y=0.40745;
+t=2856;
+break;
+case "B":
+x=0.34842;
+y=0.35161;
+t=4874;
+break;
+case "C":
+x=0.31006;
+y=0.31616;
+t=6774;
+break;
+case "9300":
+x=0.2848;
+y=0.2932;
+t=9300;
+break;
+case "F2":
+x=0.37207;
+y=0.37512;
+t=4200;
+break;
+case "F7":
+x=0.31285;
+y=0.32918;
+t=6500;
+break;
+case "F11":
+x=0.38054;
+y=0.37691;
+t=4000;
+break;
+default:
+dojo.debug("White point "+this.whitePoint+" isn't defined for Std. Observer "+this.strObserver);
+}
+break;
+case "10":
+switch(this.whitePoint){
+case "E":
+x=1/3;
+y=1/3;
+t=5400;
+break;
+case "D50":
+x=0.34773;
+y=0.35952;
+t=5000;
+break;
+case "D55":
+x=0.33411;
+y=0.34877;
+t=5500;
+break;
+case "D65":
+x=0.31382;
+y=0.331;
+t=6500;
+break;
+case "D75":
+x=0.29968;
+y=0.3174;
+t=7500;
+break;
+case "A":
+x=0.45117;
+y=0.40594;
+t=2856;
+break;
+case "B":
+x=0.3498;
+y=0.3527;
+t=4874;
+break;
+case "C":
+x=0.31039;
+y=0.31905;
+t=6774;
+break;
+case "F2":
+x=0.37928;
+y=0.36723;
+t=4200;
+break;
+case "F7":
+x=0.31565;
+y=0.32951;
+t=6500;
+break;
+case "F11":
+x=0.38543;
+y=0.3711;
+t=4000;
+break;
+default:
+dojo.debug("White point "+this.whitePoint+" isn't defined for Std. Observer "+this.strObserver);
+}
+break;
+default:
+dojo.debug("Std. Observer "+this.strObserver+" isn't defined");
+}
+var z=1-x-y;
+var wp={"x":x,"y":y,"z":z,"t":t};
+wp.Y=1;
+var XYZ=this.xyY_to_XYZ([wp.x,wp.y,wp.Y]);
+wp.X=XYZ[0];
+wp.Y=XYZ[1];
+wp.Z=XYZ[2];
+return wp;
+};
+dojo.gfx.Colorspace.prototype.getPrimaries=function(){
+var m=[];
+switch(this.RGBWorkingSpace){
+case "adobe_rgb_1998":
+m=[2.2,"D65",0.64,0.33,0.297361,0.21,0.71,0.627355,0.15,0.06,0.075285];
+break;
+case "apple_rgb":
+m=[1.8,"D65",0.625,0.34,0.244634,0.28,0.595,0.672034,0.155,0.07,0.083332];
+break;
+case "best_rgb":
+m=[2.2,"D50",0.7347,0.2653,0.228457,0.215,0.775,0.737352,0.13,0.035,0.034191];
+break;
+case "beta_rgb":
+m=[2.2,"D50",0.6888,0.3112,0.303273,0.1986,0.7551,0.663786,0.1265,0.0352,0.032941];
+break;
+case "bruce_rgb":
+m=[2.2,"D65",0.64,0.33,0.240995,0.28,0.65,0.683554,0.15,0.06,0.075452];
+break;
+case "cie_rgb":
+m=[2.2,"E",0.735,0.265,0.176204,0.274,0.717,0.812985,0.167,0.009,0.010811];
+break;
+case "color_match_rgb":
+m=[1.8,"D50",0.63,0.34,0.274884,0.295,0.605,0.658132,0.15,0.075,0.066985];
+break;
+case "don_rgb_4":
+m=[2.2,"D50",0.696,0.3,0.27835,0.215,0.765,0.68797,0.13,0.035,0.03368];
+break;
+case "eci_rgb":
+m=[1.8,"D50",0.67,0.33,0.32025,0.21,0.71,0.602071,0.14,0.08,0.077679];
+break;
+case "ekta_space_ps5":
+m=[2.2,"D50",0.695,0.305,0.260629,0.26,0.7,0.734946,0.11,0.005,0.004425];
+break;
+case "ntsc_rgb":
+m=[2.2,"C",0.67,0.33,0.298839,0.21,0.71,0.586811,0.14,0.08,0.11435];
+break;
+case "pal_secam_rgb":
+m=[2.2,"D65",0.64,0.33,0.222021,0.29,0.6,0.706645,0.15,0.06,0.071334];
+break;
+case "pro_photo_rgb":
+m=[1.8,"D50",0.7347,0.2653,0.28804,0.1596,0.8404,0.711874,0.0366,0.0001,0.000086];
+break;
+case "smpte-c_rgb":
+m=[2.2,"D65",0.63,0.34,0.212395,0.31,0.595,0.701049,0.155,0.07,0.086556];
+break;
+case "s_rgb":
+m=[2.2,"D65",0.64,0.33,0.212656,0.3,0.6,0.715158,0.15,0.06,0.072186];
+break;
+case "wide_gamut_rgb":
+m=[2.2,"D50",0.735,0.265,0.258187,0.115,0.826,0.724938,0.157,0.018,0.016875];
+break;
+default:
+dojo.debug("RGB working space "+this.RGBWorkingSpace+" isn't defined");
+}
+var p={name:this.RGBWorkingSpace,gamma:m[0],wp:m[1],xr:m[2],yr:m[3],Yr:m[4],xg:m[5],yg:m[6],Yg:m[7],xb:m[8],yb:m[9],Yb:m[10]};
+if(p.wp!=this.whitePoint){
+var r=this.XYZ_to_xyY(this.chromaticAdaptation(this.xyY_to_XYZ([p.xr,p.yr,p.Yr]),p.wp,this.whitePoint));
+var g=this.XYZ_to_xyY(this.chromaticAdaptation(this.xyY_to_XYZ([p.xg,p.yg,p.Yg]),p.wp,this.whitePoint));
+var b=this.XYZ_to_xyY(this.chromaticAdaptation(this.xyY_to_XYZ([p.xb,p.yb,p.Yb]),p.wp,this.whitePoint));
+p.xr=r[0];
+p.yr=r[1];
+p.Yr=r[2];
+p.xg=g[0];
+p.yg=g[1];
+p.Yg=g[2];
+p.xb=b[0];
+p.yb=b[1];
+p.Yb=b[2];
+p.wp=this.whitePoint;
+}
+p.zr=1-p.xr-p.yr;
+p.zg=1-p.xg-p.yg;
+p.zb=1-p.xb-p.yb;
+return p;
+};
+dojo.gfx.Colorspace.prototype.epsilon=function(){
+return this.useApproxCIELabMapping?0.008856:216/24289;
+};
+dojo.gfx.Colorspace.prototype.kappa=function(){
+return this.useApproxCIELabMapping?903.3:24389/27;
+};
+dojo.gfx.Colorspace.prototype.XYZ_to_xyY=function(){
+var src=this.munge("XYZ",arguments);
+var sum=src.X+src.Y+src.Z;
+if(sum==0){
+var wp=this.getWhitePoint();
+var x=wp.x;
+var y=wp.y;
+}else{
+var x=src.X/sum;
+var y=src.Y/sum;
+}
+var Y=src.Y;
+return [x,y,Y];
+};
+dojo.gfx.Colorspace.prototype.xyY_to_XYZ=function(){
+var src=this.munge("xyY",arguments);
+if(src.y==0){
+var X=0;
+var Y=0;
+var Z=0;
+}else{
+var X=(src.x*src.Y)/src.y;
+var Y=src.Y;
+var Z=((1-src.x-src.y)*src.Y)/src.y;
+}
+return [X,Y,Z];
+};
+dojo.gfx.Colorspace.prototype.RGB_to_XYZ=function(){
+var src=this.munge("RGB",arguments);
+var m=this.getRGB_XYZ_Matrix();
+var pr=this.getPrimaries();
+if(this.RGBWorkingSpace=="s_rgb"){
+var r=(src.R>0.04045)?Math.pow(((src.R+0.055)/1.055),2.4):src.R/12.92;
+var g=(src.G>0.04045)?Math.pow(((src.G+0.055)/1.055),2.4):src.G/12.92;
+var b=(src.B>0.04045)?Math.pow(((src.B+0.055)/1.055),2.4):src.B/12.92;
+}else{
+var r=Math.pow(src.R,pr.gamma);
+var g=Math.pow(src.G,pr.gamma);
+var b=Math.pow(src.B,pr.gamma);
+}
+var XYZ=dojo.math.matrix.multiply([[r,g,b]],m);
+return [XYZ[0][0],XYZ[0][1],XYZ[0][2]];
+};
+dojo.gfx.Colorspace.prototype.XYZ_to_RGB=function(){
+var src=this.munge("XYZ",arguments);
+var mi=this.getXYZ_RGB_Matrix();
+var pr=this.getPrimaries();
+var rgb=dojo.math.matrix.multiply([[src.X,src.Y,src.Z]],mi);
+var r=rgb[0][0];
+var g=rgb[0][1];
+var b=rgb[0][2];
+if(this.RGBWorkingSpace=="s_rgb"){
+var R=(r>0.0031308)?(1.055*Math.pow(r,1/2.4))-0.055:12.92*r;
+var G=(g>0.0031308)?(1.055*Math.pow(g,1/2.4))-0.055:12.92*g;
+var B=(b>0.0031308)?(1.055*Math.pow(b,1/2.4))-0.055:12.92*b;
+}else{
+var R=Math.pow(r,1/pr.gamma);
+var G=Math.pow(g,1/pr.gamma);
+var B=Math.pow(b,1/pr.gamma);
+}
+return [R,G,B];
+};
+dojo.gfx.Colorspace.prototype.XYZ_to_Lab=function(){
+var src=this.munge("XYZ",arguments);
+var wp=this.getWhitePoint();
+var xr=src.X/wp.X;
+var yr=src.Y/wp.Y;
+var zr=src.Z/wp.Z;
+var fx=(xr>this.epsilon())?Math.pow(xr,1/3):(this.kappa()*xr+16)/116;
+var fy=(yr>this.epsilon())?Math.pow(yr,1/3):(this.kappa()*yr+16)/116;
+var fz=(zr>this.epsilon())?Math.pow(zr,1/3):(this.kappa()*zr+16)/116;
+var L=116*fy-16;
+var a=500*(fx-fy);
+var b=200*(fy-fz);
+return [L,a,b];
+};
+dojo.gfx.Colorspace.prototype.Lab_to_XYZ=function(){
+var src=this.munge("Lab",arguments);
+var wp=this.getWhitePoint();
+var yr=(src.L>(this.kappa()*this.epsilon()))?Math.pow((src.L+16)/116,3):src.L/this.kappa();
+var fy=(yr>this.epsilon())?(src.L+16)/116:(this.kappa()*yr+16)/116;
+var fx=(src.a/500)+fy;
+var fz=fy-(src.b/200);
+var _43=Math.pow(fx,3);
+var _44=Math.pow(fz,3);
+var xr=(_43>this.epsilon())?_43:(116*fx-16)/this.kappa();
+var zr=(_44>this.epsilon())?_44:(116*fz-16)/this.kappa();
+var X=xr*wp.X;
+var Y=yr*wp.Y;
+var Z=zr*wp.Z;
+return [X,Y,Z];
+};
+dojo.gfx.Colorspace.prototype.Lab_to_LCHab=function(){
+var src=this.munge("Lab",arguments);
+var L=src.L;
+var C=Math.pow(src.a*src.a+src.b*src.b,0.5);
+var H=Math.atan2(src.b,src.a)*(180/Math.PI);
+if(H<0){
+H+=360;
+}
+if(H>360){
+H-=360;
+}
+return [L,C,H];
+};
+dojo.gfx.Colorspace.prototype.LCHab_to_Lab=function(){
+var src=this.munge("LCH",arguments);
+var _4f=src.H*(Math.PI/180);
+var L=src.L;
+var a=src.C/Math.pow(Math.pow(Math.tan(_4f),2)+1,0.5);
+if((90<src.H)&&(src.H<270)){
+a=-a;
+}
+var b=Math.pow(Math.pow(src.C,2)-Math.pow(a,2),0.5);
+if(src.H>180){
+b=-b;
+}
+return [L,a,b];
+};
+dojo.gfx.Colorspace.prototype.chromaticAdaptation=function(col,_54,_55){
+col=this.munge("XYZ",[col]);
+var _56=this.whitePoint;
+this.whitePoint=_54;
+var _57=this.getWhitePoint();
+this.whitePoint=_55;
+var _58=this.getWhitePoint();
+this.whitePoint=_56;
+switch(this.chromaticAdaptationAlg){
+case "xyz_scaling":
+var ma=[[1,0,0],[0,1,0],[0,0,1]];
+var mai=[[1,0,0],[0,1,0],[0,0,1]];
+break;
+case "bradford":
+var ma=[[0.8951,-0.7502,0.0389],[0.2664,1.7135,-0.0685],[-0.1614,0.0367,1.0296]];
+var mai=[[0.986993,0.432305,-0.008529],[-0.147054,0.51836,0.040043],[0.159963,0.049291,0.968487]];
+break;
+case "von_kries":
+var ma=[[0.40024,-0.2263,0],[0.7076,1.16532,0],[-0.08081,0.0457,0.91822]];
+var mai=[[1.859936,0.361191,0],[-1.129382,0.638812,0],[0.219897,-0.000006,1.089064]];
+break;
+default:
+dojo.debug("The "+this.chromaticAdaptationAlg+" chromatic adaptation algorithm matricies are not defined");
+}
+var _5b=dojo.math.matrix.multiply([[_57.x,_57.y,_57.z]],ma);
+var _5c=dojo.math.matrix.multiply([[_58.x,_58.y,_58.z]],ma);
+var _5d=[[_5c[0][0]/_5b[0][0],0,0],[0,_5c[0][1]/_5b[0][1],0],[0,0,_5c[0][2]/_5b[0][2]]];
+var m=dojo.math.matrix.multiply(dojo.math.matrix.multiply(ma,_5d),mai);
+var dst=dojo.math.matrix.multiply([[col.X,col.Y,col.Z]],m);
+return dst[0];
+};
+dojo.gfx.Colorspace.prototype.getRGB_XYZ_Matrix=function(){
+var wp=this.getWhitePoint();
+var pr=this.getPrimaries();
+var Xr=pr.xr/pr.yr;
+var Yr=1;
+var Zr=(1-pr.xr-pr.yr)/pr.yr;
+var Xg=pr.xg/pr.yg;
+var Yg=1;
+var Zg=(1-pr.xg-pr.yg)/pr.yg;
+var Xb=pr.xb/pr.yb;
+var Yb=1;
+var Zb=(1-pr.xb-pr.yb)/pr.yb;
+var m1=[[Xr,Yr,Zr],[Xg,Yg,Zg],[Xb,Yb,Zb]];
+var m2=[[wp.X,wp.Y,wp.Z]];
+var sm=dojo.math.matrix.multiply(m2,dojo.math.matrix.inverse(m1));
+var Sr=sm[0][0];
+var Sg=sm[0][1];
+var Sb=sm[0][2];
+var m4=[[Sr*Xr,Sr*Yr,Sr*Zr],[Sg*Xg,Sg*Yg,Sg*Zg],[Sb*Xb,Sb*Yb,Sb*Zb]];
+return m4;
+};
+dojo.gfx.Colorspace.prototype.getXYZ_RGB_Matrix=function(){
+var m=this.getRGB_XYZ_Matrix();
+return dojo.math.matrix.inverse(m);
+};
+dojo.gfx.Colorspace.prototype.XYZ_to_Luv=function(){
+var src=this.munge("XYZ",arguments);
+var wp=this.getWhitePoint();
+var ud=(4*src.X)/(src.X+15*src.Y+3*src.Z);
+var vd=(9*src.Y)/(src.X+15*src.Y+3*src.Z);
+var udr=(4*wp.X)/(wp.X+15*wp.Y+3*wp.Z);
+var vdr=(9*wp.Y)/(wp.X+15*wp.Y+3*wp.Z);
+var yr=src.Y/wp.Y;
+var L=(yr>this.epsilon())?116*Math.pow(yr,1/3)-16:this.kappa()*yr;
+var u=13*L*(ud-udr);
+var v=13*L*(vd-vdr);
+return [L,u,v];
+};
+dojo.gfx.Colorspace.prototype.Luv_to_XYZ=function(){
+var src=this.munge("Luv",arguments);
+var wp=this.getWhitePoint();
+var uz=(4*wp.X)/(wp.X+15*wp.Y+3*wp.Z);
+var vz=(9*wp.Y)/(wp.X+15*wp.Y+3*wp.Z);
+var Y=(src.L>this.kappa()*this.epsilon())?Math.pow((src.L+16)/116,3):src.L/this.kappa();
+var a=(1/3)*(((52*src.L)/(src.u+13*src.L*uz))-1);
+var b=-5*Y;
+var c=-(1/3);
+var d=Y*(((39*src.L)/(src.v+13*src.L*vz))-5);
+var X=(d-b)/(a-c);
+var Z=X*a+b;
+return [X,Y,Z];
+};
+dojo.gfx.Colorspace.prototype.Luv_to_LCHuv=function(){
+var src=this.munge("Luv",arguments);
+var L=src.L;
+var C=Math.pow(src.u*src.u+src.v*src.v,0.5);
+var H=Math.atan2(src.v,src.u)*(180/Math.PI);
+if(H<0){
+H+=360;
+}
+if(H>360){
+H-=360;
+}
+return [L,C,H];
+};
+dojo.gfx.Colorspace.prototype.LCHuv_to_Luv=function(){
+var src=this.munge("LCH",arguments);
+var _8d=src.H*(Math.PI/180);
+var L=src.L;
+var u=src.C/Math.pow(Math.pow(Math.tan(_8d),2)+1,0.5);
+var v=Math.pow(src.C*src.C-u*u,0.5);
+if((90<src.H)&&(src.H<270)){
+u*=-1;
+}
+if(src.H>180){
+v*=-1;
+}
+return [L,u,v];
+};
+dojo.gfx.Colorspace.colorTemp_to_whitePoint=function(T){
+if(T<4000){
+dojo.debug("Can't find a white point for temperatures under 4000K");
+return [0,0];
+}
+if(T>25000){
+dojo.debug("Can't find a white point for temperatures over 25000K");
+return [0,0];
+}
+var T1=T;
+var T2=T*T;
+var T3=T2*T;
+var _95=Math.pow(10,9);
+var _96=Math.pow(10,6);
+var _97=Math.pow(10,3);
+if(T<=7000){
+var x=(-4.607*_95/T3)+(2.9678*_96/T2)+(0.09911*_97/T)+0.244063;
+}else{
+var x=(-2.0064*_95/T3)+(1.9018*_96/T2)+(0.24748*_97/T)+0.23704;
+}
+var y=-3*x*x+2.87*x-0.275;
+return [x,y];
+};
+dojo.gfx.Colorspace.prototype.RGB_to_CMY=function(){
+var src=this.munge("RGB",arguments);
+var C=1-src.R;
+var M=1-src.G;
+var Y=1-src.B;
+return [C,M,Y];
+};
+dojo.gfx.Colorspace.prototype.CMY_to_RGB=function(){
+var src=this.munge("CMY",arguments);
+var R=1-src.C;
+var G=1-src.M;
+var B=1-src.Y;
+return [R,G,B];
+};
+dojo.gfx.Colorspace.prototype.RGB_to_CMYK=function(){
+var src=this.munge("RGB",arguments);
+var K=Math.min(1-src.R,1-src.G,1-src.B);
+var C=(1-src.R-K)/(1-K);
+var M=(1-src.G-K)/(1-K);
+var Y=(1-src.B-K)/(1-K);
+return [C,M,Y,K];
+};
+dojo.gfx.Colorspace.prototype.CMYK_to_RGB=function(){
+var src=this.munge("CMYK",arguments);
+var R=1-Math.min(1,src.C*(1-src.K)+src.K);
+var G=1-Math.min(1,src.M*(1-src.K)+src.K);
+var B=1-Math.min(1,src.Y*(1-src.K)+src.K);
+return [R,G,B];
+};
+dojo.gfx.Colorspace.prototype.CMY_to_CMYK=function(){
+var src=this.munge("CMY",arguments);
+var K=Math.min(src.C,src.M,src.Y);
+var C=(src.C-K)/(1-K);
+var M=(src.M-K)/(1-K);
+var Y=(src.Y-K)/(1-K);
+return [C,M,Y,K];
+};
+dojo.gfx.Colorspace.prototype.CMYK_to_CMY=function(){
+var src=this.munge("CMYK",arguments);
+var C=Math.min(1,src.C*(1-src.K)+src.K);
+var M=Math.min(1,src.M*(1-src.K)+src.K);
+var Y=Math.min(1,src.Y*(1-src.K)+src.K);
+return [C,M,Y];
+};
+dojo.gfx.Colorspace.prototype.RGB_to_HSV=function(){
+var src=this.munge("RGB",arguments);
+var min=Math.min(src.R,src.G,src.B);
+var V=Math.max(src.R,src.G,src.B);
+var _b7=V-min;
+var H=null;
+var S=(V==0)?0:_b7/V;
+if(S==0){
+H=0;
+}else{
+if(src.R==V){
+H=60*(src.G-src.B)/_b7;
+}else{
+if(src.G==V){
+H=120+60*(src.B-src.R)/_b7;
+}else{
+if(src.B==V){
+H=240+60*(src.R-src.G)/_b7;
+}
+}
+}
+if(H<0){
+H+=360;
+}
+}
+H=(H==0)?360:H;
+return [H,S,V];
+};
+dojo.gfx.Colorspace.prototype.HSV_to_RGB=function(){
+var src=this.munge("HSV",arguments);
+if(src.H==360){
+src.H=0;
+}
+var r=null;
+var g=null;
+var b=null;
+if(src.S==0){
+var R=src.V;
+var G=src.V;
+var B=src.V;
+}else{
+var _c1=src.H/60;
+var i=Math.floor(_c1);
+var f=_c1-i;
+var p=src.V*(1-src.S);
+var q=src.V*(1-(src.S*f));
+var t=src.V*(1-(src.S*(1-f)));
+switch(i){
+case 0:
+R=src.V;
+G=t;
+B=p;
+break;
+case 1:
+R=q;
+G=src.V;
+B=p;
+break;
+case 2:
+R=p;
+G=src.V;
+B=t;
+break;
+case 3:
+R=p;
+G=q;
+B=src.V;
+break;
+case 4:
+R=t;
+G=p;
+B=src.V;
+break;
+case 5:
+R=src.V;
+G=p;
+B=q;
+break;
+}
+}
+return [R,G,B];
+};
+dojo.gfx.Colorspace.prototype.RGB_to_HSL=function(){
+var src=this.munge("RGB",arguments);
+var min=Math.min(src.R,src.G,src.B);
+var max=Math.max(src.R,src.G,src.B);
+var _ca=max-min;
+var H=0;
+var S=0;
+var L=(min+max)/2;
+if((L>0)&&(L<1)){
+S=_ca/((L<0.5)?(2*L):(2-2*L));
+}
+if(_ca>0){
+if((max==src.R)&&(max!=src.G)){
+H+=(src.G-src.B)/_ca;
+}
+if((max==src.G)&&(max!=src.B)){
+H+=(2+(src.B-src.R)/_ca);
+}
+if((max==src.B)&&(max!=src.R)){
+H+=(4+(src.R-src.G)/_ca);
+}
+H*=60;
+}
+H=(H==0)?360:H;
+return [H,S,L];
+};
+dojo.gfx.Colorspace.prototype.HSL_to_RGB=function(){
+var src=this.munge("HSL",arguments);
+while(src.H<0){
+src.H+=360;
+}
+while(src.H>=360){
+src.H-=360;
+}
+var R=0;
+var G=0;
+var B=0;
+if(src.H<120){
+R=(120-src.H)/60;
+G=src.H/60;
+B=0;
+}else{
+if(src.H<240){
+R=0;
+G=(240-src.H)/60;
+B=(src.H-120)/60;
+}else{
+R=(src.H-240)/60;
+G=0;
+B=(360-src.H)/60;
+}
+}
+R=2*src.S*Math.min(R,1)+(1-src.S);
+G=2*src.S*Math.min(G,1)+(1-src.S);
+B=2*src.S*Math.min(B,1)+(1-src.S);
+if(src.L<0.5){
+R=src.L*R;
+G=src.L*G;
+B=src.L*B;
+}else{
+R=(1-src.L)*R+2*src.L-1;
+G=(1-src.L)*G+2*src.L-1;
+B=(1-src.L)*B+2*src.L-1;
+}
+return [R,G,B];
+};

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/Colorspace.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/Colorspace.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/Colorspace.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/__package__.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/__package__.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,4 @@
+dojo.kwCompoundRequire({common:["dojo.gfx.color","dojo.gfx.matrix","dojo.gfx.common"]});
+dojo.requireIf(dojo.render.svg.capable,"dojo.gfx.svg");
+dojo.requireIf(dojo.render.vml.capable,"dojo.gfx.vml");
+dojo.provide("dojo.gfx.*");

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/__package__.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/gfx/__package__.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message