Index: CHANGES.html
===================================================================
--- CHANGES.html	(revision 3843)
+++ CHANGES.html	Fri Jul 10 14:02:59 CEST 2009
@@ -108,7 +108,8 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3894">#3894</a> : Fixed an issue where editor failed to initialize when using the on-demand loading way.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3903">#3903</a> : Color button plugin doesn't read config entry from editor instance correctly.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3801">#3801</a> : Comments at the start of the document was lost in IE.</li>
-		<li><a href="http://dev.fckeditor.net/ticket/3879">#3879</a> : Color button panel was incorrect size on first open in webkit.</li>		
+		<li><a href="http://dev.fckeditor.net/ticket/3879">#3879</a> : Color button panel was incorrect size on first open in webkit.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3905">#3905</a> : Editor caused unauthenticated content warnings over SSL in FF 3.5.</li>	
 	</ul>
 	<h3>
 		CKEditor 3.0 RC</h3>
Index: _source/plugins/wysiwygarea/plugin.js
===================================================================
--- _source/plugins/wysiwygarea/plugin.js	(revision 3829)
+++ _source/plugins/wysiwygarea/plugin.js	Fri Jul 10 14:01:50 CEST 2009
@@ -216,9 +216,6 @@
 						isPendingFocus,
 						fireMode;
 
-					// Support for custom document.domain in IE.
-					var isCustomDomain = CKEDITOR.env.isCustomDomain();
-
 					// Creates the iframe that holds the editable document.
 					var createIFrame = function()
 					{
@@ -227,35 +224,39 @@
 						if ( fieldset )
 							fieldset.remove();
 
-						// The document domain must be set within the src
-						// attribute;
-						// Defer the script execution until iframe
-						// has been added to main window, this is needed for some
-						// browsers which will begin to load the frame content
-						// prior to it's presentation in DOM.(#3894)
-						var src = 'void( '
-								+ ( CKEDITOR.env.gecko ? 'setTimeout' : '' ) + '( function(){' +
-								'document.open();' +
-								( CKEDITOR.env.ie && isCustomDomain ? 'document.domain="' + document.domain + '";' : '' ) +
-								'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' +
-								'document.close();' +
-								'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' +
-								'}'
-								+ ( CKEDITOR.env.gecko ? ', 0 )' : ')()' )
-								+ ' )';
-
-						// Loading via src attribute does not work in Opera.
-						if ( CKEDITOR.env.opera )
-							src = 'void(0);';
-
 						iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' +
 								' style="width:100%;height:100%"' +
 								' frameBorder="0"' +
+								// Support for custom document.domain in IE.
+								( CKEDITOR.env.isCustomDomain() ?
+									' src="javascript:void((function(){' +
+										'document.open();' +
+										'document.domain=\'' + document.domain + '\';' +
+										'document.close();' +
+									'})())"' : '' ) +
 								' tabIndex="-1"' +
 								' allowTransparency="true"' +
-								' src="javascript:' + encodeURIComponent( src ) + '"' +
 								'></iframe>' );
 
+						// Register onLoad event for iframe element, which
+						// will fill it with content and set custom domain.
+						var onLoad = function( e )
+						{
+							iframe.removeListener( 'load', onLoad );
+							var doc = iframe.getFrameDocument().$;
+
+							// Custom domain handling is needed after document.open().
+							doc.open();
+							if ( CKEDITOR.env.isCustomDomain() )
+								doc.domain = document.domain;
+							
+							doc.write( CKEDITOR._[ 'cke_htmlToLoad_' + editor.name ] );
+							CKEDITOR._[ 'cke_htmlToLoad_' + editor.name ] = null;
+
+							doc.close();
+						};
+						iframe.on( 'load', onLoad );
+
 						var accTitle = editor.lang.editorTitle.replace( '%1', editor.name );
 
 						if ( CKEDITOR.env.gecko )
@@ -301,8 +302,6 @@
 					// enables editing, and makes some
 					var activationScript =
 						'<script id="cke_actscrpt" type="text/javascript">' +
-							'window.onload = function()' +
-							'{' +
 								// Remove this script from the DOM.
 								'var s = document.getElementById( "cke_actscrpt" );' +
 								's.parentNode.removeChild( s );' +
@@ -310,7 +309,6 @@
 								// Call the temporary function for the editing
 								// boostrap.
 								'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' +
-							'}' +
 						'</script>';
 
 					// Editing area bootstrap code.
@@ -504,18 +502,9 @@
 									'</html>' +
 									activationScript;
 
-								window[ '_cke_htmlToLoad_' + editor.name ] = data;
+								CKEDITOR._[ 'cke_htmlToLoad_' + editor.name ] = data;
 								CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
 								createIFrame();
-
-								// Opera must use the old method for loading contents.
-								if ( CKEDITOR.env.opera )
-								{
-									var doc = iframe.$.contentWindow.document;
-									doc.open();
-									doc.write( data );
-									doc.close();
-								}
 							},
 
 							getData : function()
