rem: '    body,html { background: transparent; padding: 0; margin: 0; }\n' + 
add: 'body,html{background:transparent;padding:0;margin:0;}' + 
context: 		_drawIframe: function (/*String*/html){			// summary:			//		Draws an iFrame using the existing one if one exists.			//		Used by Mozilla, Safari, and Opera			// detect firefox < 1.5, which has some iframe loading issues			var oldMoz = Boolean(dojo.render.html.moz && (									typeof window.XML == 'undefined'))			if(!this.iframe){				var currentDomain = (new dojo.uri.Uri(dojo.doc().location)).host;				this.iframe = dojo.doc().createElement("iframe");				// dojo.body().appendChild(this.iframe);				with(this.iframe){					style.border = "none";					style.lineHeight = "0"; // squash line height					style.verticalAlign = "bottom";					scrolling = this.height ? "auto" : "no";				}			}			// opera likes this to be outside the with block			this.iframe.src = dojo.uri.dojoUri("src/widget/templates/richtextframe.html") + ((dojo.doc().domain != currentDomain) ? ("#"+dojo.doc().domain) : "");			this.iframe.width = this.inheritWidth ? this._oldWidth : "100%";			if(this.height){				this.iframe.style.height = this.height;			}else{				var height = this._oldHeight;				if(this._hasCollapseableMargin(this.domNode, 'top')){					height += this._firstChildContributingMargin;				}				if(this._hasCollapseableMargin(this.domNode, 'bottom')){					height += this._lastChildContributingMargin;				}				this.iframe.height = height;			}			var tmpContent = dojo.doc().createElement('div');			tmpContent.innerHTML = html;			// make relative image urls absolute			if(this.relativeImageUrls){				var imgs = tmpContent.getElementsByTagName('img');				for(var i=0; i<imgs.length; i++){					imgs[i].src = (new dojo.uri.Uri(dojo.global().location, imgs[i].src)).toString();				}				html = tmpContent.innerHTML;			}			// fix margins on tmpContent			var firstChild = dojo.html.firstElement(tmpContent);			var lastChild = dojo.html.lastElement(tmpContent);			if(firstChild){				firstChild.style.marginTop = this._firstChildContributingMargin+"px";			}			if(lastChild){				lastChild.style.marginBottom = this._lastChildContributingMargin+"px";			}			// show existing content behind iframe for now			tmpContent.style.position = "absolute";			this.editingArea.appendChild(tmpContent);			this.editingArea.appendChild(this.iframe);			if(dojo.render.html.safari){				this.iframe.src = this.iframe.src;			}			var _iframeInitialized = false;			// now we wait for onload. Janky hack!			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();				}			});			if(this.editNode){				ifrFunc(); // iframe already exists, just set content			}else if(dojo.render.html.moz){				// FIXME: if we put this on a delay, we get a height of 20px.				// Otherwise we get the correctly specified minHeight value.				this.iframe.onload = function(){					setTimeout(ifrFunc, 250);				}			}else{ // new mozillas, opera, safari				this.iframe.onload = ifrFunc;			}		},
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