rem: var ifrFunc = dojo.lang.hitch(this, function(){ if(!_iframeInitialized){ _iframeInitialized = true; }else{ return; } if(!this.editNode){ if(this.iframe.contentWindow){ this.window = this.iframe.contentWindow; this.document = this.iframe.contentWindow.document }else if(this.iframe.contentDocument){  this.window = this.iframe.contentDocument.window; this.document = this.iframe.contentDocument; }   var getStyle = (function (domNode) { return function (style) { return dojo.html.getStyle(domNode, style); }; })(this.domNode);  var font = getStyle('font-weight') + " " + getStyle('font-size') + " " + getStyle('font-family');    var lineHeight = "1.0"; var lineHeightStyle = dojo.html.getUnitValue(this.domNode, 'line-height'); if (lineHeightStyle.value && lineHeightStyle.units=="") { lineHeight = lineHeightStyle.value; }  dojo.html.insertCssText( '    body,html { background: transparent; padding: 0; margin: 0; }\n' +   '    body { top: 0; left: 0; right: 0;' + (((this.height)||(dojo.render.html.opera)) ? '' : ' position: fixed; ') + '        font: ' + font + ';\n' + '        min-height: ' + this.minHeight + '; \n' + '        line-height: ' + lineHeight + '} \n' + '    p { margin: 1em 0 !important; }\n' + '    body > *:first-child { padding-top: 0 !important; margin-top: ' + this._firstChildContributingMargin + 'px !important; }\n' + '    body > *:last-child { padding-bottom: 0 !important; margin-bottom: ' + this._lastChildContributingMargin + 'px !important; }\n' + '    li > ul:-moz-first-node, li > ol:-moz-first-node { padding-top: 1.2em; }\n' + '    li { min-height: 1.2em; }\n' +  '', this.document);  tmpContent.parentNode.removeChild(tmpContent); this.document.body.innerHTML = html; if(oldMoz||dojo.render.html.safari){ this.document.designMode = "on"; } this.onLoad(); }else{ tmpContent.parentNode.removeChild(tmpContent); this.editNode.innerHTML = html; this.onDisplayChanged(); } }); 
add: dojo.lang.forEach(this.events, function(e){ dojo.event.connect(this.editNode, e.toLowerCase(), this, e); }, this); 
context: 			var ifrFunc = dojo.lang.hitch(this, function(){				if(!_iframeInitialized){					_iframeInitialized = true;				}else{ return; }				if(!this.editNode){					if(this.iframe.contentWindow){						this.window = this.iframe.contentWindow;						this.document = this.iframe.contentWindow.document					}else if(this.iframe.contentDocument){						// for opera						this.window = this.iframe.contentDocument.window;						this.document = this.iframe.contentDocument;					}					// curry the getStyle function					var getStyle = (function (domNode) { return function (style) {						return dojo.html.getStyle(domNode, style);					}; })(this.domNode);					var font =						getStyle('font-weight') + " " +						getStyle('font-size') + " " +						getStyle('font-family');					// line height is tricky - applying a units value will mess things up.					// if we can't get a non-units value, bail out.					var lineHeight = "1.0";					var lineHeightStyle = dojo.html.getUnitValue(this.domNode, 'line-height');					if (lineHeightStyle.value && lineHeightStyle.units=="") {						lineHeight = lineHeightStyle.value;					}					dojo.html.insertCssText(						'    body,html { background: transparent; padding: 0; margin: 0; }\n' +						// TODO: left positioning will case contents to disappear out of view						//       if it gets too wide for the visible area						'    body { top: 0; left: 0; right: 0;' +						(((this.height)||(dojo.render.html.opera)) ? '' : ' position: fixed; ') +						'        font: ' + font + ';\n' +						'        min-height: ' + this.minHeight + '; \n' +						'        line-height: ' + lineHeight + '} \n' +						'    p { margin: 1em 0 !important; }\n' +						'    body > *:first-child { padding-top: 0 !important; margin-top: ' + this._firstChildContributingMargin + 'px !important; }\n' + // FIXME: test firstChild nodeType						'    body > *:last-child { padding-bottom: 0 !important; margin-bottom: ' + this._lastChildContributingMargin + 'px !important; }\n' +						'    li > ul:-moz-first-node, li > ol:-moz-first-node { padding-top: 1.2em; }\n' +						'    li { min-height: 1.2em; }\n' +						//'    p,ul,li { padding-top: 0; padding-bottom: 0; margin-top:0; margin-bottom: 0; }\n' +						'', this.document);					tmpContent.parentNode.removeChild(tmpContent);					this.document.body.innerHTML = html;					if(oldMoz||dojo.render.html.safari){						this.document.designMode = "on";					}					this.onLoad();				}else{					tmpContent.parentNode.removeChild(tmpContent);					this.editNode.innerHTML = html;					this.onDisplayChanged();				}			});
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/RichText.js/buggy/www/resources/dojo-ajax/src/widget/RichText.js