Ticket #3905: 3905_2.patch
File 3905_2.patch, 5.3 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
223 223 var isCustomDomain = CKEDITOR.env.isCustomDomain(); 224 224 225 225 // Creates the iframe that holds the editable document. 226 var createIFrame = function( )226 var createIFrame = function( data ) 227 227 { 228 228 if ( iframe ) 229 229 iframe.remove(); … … 231 231 fieldset.remove(); 232 232 233 233 frameLoaded = 0; 234 // The document domain must be set within the src235 // attribute;236 // Defer the script execution until iframe237 // has been added to main window, this is needed for some238 // browsers which will begin to load the frame content239 // prior to it's presentation in DOM.(#3894)240 var src = 'void( '241 + ( CKEDITOR.env.gecko ? 'setTimeout' : '' ) + '( function(){' +242 'document.open();' +243 ( CKEDITOR.env.ie && isCustomDomain ? 'document.domain="' + document.domain + '";' : '' ) +244 'document.write( window.parent[ "_cke_htmlToLoad_' + editor.name + '" ] );' +245 'document.close();' +246 'window.parent[ "_cke_htmlToLoad_' + editor.name + '" ] = null;' +247 '}'248 + ( CKEDITOR.env.gecko ? ', 0 )' : ')()' )249 + ' )';250 234 251 // Loading via src attribute does not work in Opera.252 if ( CKEDITOR.env.opera )253 src = 'void(0);';254 255 235 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + 256 ' style="width:100%;height:100%"' + 257 ' frameBorder="0"' + 258 ' tabIndex="-1"' + 259 ' allowTransparency="true"' + 260 ' src="javascript:' + encodeURIComponent( src ) + '"' + 261 '></iframe>' ); 236 ' style="width:100%;height:100%"' + 237 ' frameBorder="0"' + 238 // Support for custom document.domain in IE. 239 ( isCustomDomain ? 240 ' src="javascript:void((function(){' + 241 'document.open();' + 242 'document.domain=\'' + document.domain + '\';' + 243 'document.close();' + 244 '})())"' : '' ) + 245 ' tabIndex="-1"' + 246 ' allowTransparency="true"' + 247 '></iframe>' ); 262 248 249 // Register onLoad event for iframe element, which 250 // will fill it with content and set custom domain. 251 iframe.on( 'load', function( e ) 252 { 253 e.removeListener(); 254 var doc = iframe.getFrameDocument().$; 255 256 // Custom domain handling is needed after each document.open(). 257 doc.open(); 258 if ( isCustomDomain ) 259 doc.domain = document.domain; 260 doc.write( data ); 261 doc.close(); 262 } ); 263 263 264 var accTitle = editor.lang.editorTitle.replace( '%1', editor.name ); 264 265 265 266 if ( CKEDITOR.env.gecko ) … … 314 315 // enables editing, and makes some 315 316 var activationScript = 316 317 '<script id="cke_actscrpt" type="text/javascript">' + 317 'window.onload = function()' +318 '{' +319 318 // Call the temporary function for the editing 320 319 // boostrap. 321 320 'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' + 322 '}' +323 321 '</script>'; 324 322 325 323 // Editing area bootstrap code. … … 522 520 '</html>' + 523 521 activationScript; 524 522 525 window[ '_cke_htmlToLoad_' + editor.name ] = data;526 523 CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady; 527 createIFrame(); 528 529 // Opera must use the old method for loading contents. 530 if ( CKEDITOR.env.opera ) 531 { 532 var doc = iframe.$.contentWindow.document; 533 doc.open(); 534 doc.write( data ); 535 doc.close(); 536 } 524 createIFrame( data ); 537 525 }, 538 526 539 527 getData : function() -
_source/core/_bootstrap.js
12 12 // Check is High Contrast is active by creating a temporary element with a 13 13 // background image. 14 14 15 var testImage = ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) ? ( CKEDITOR.basePath + 'images/spacer.gif' ) : 'about:blank'; 15 var useSpacer = CKEDITOR.env.ie && CKEDITOR.env.version < 7 16 || CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900; 16 17 18 var testImage = useSpacer ? ( CKEDITOR.basePath + 'images/spacer.gif' ) : 'about:blank'; 19 17 20 var hcDetect = CKEDITOR.dom.element.createFromHtml( 18 21 '<div style="width:0px;height:0px;' + 19 22 'position:absolute;left:-10000px;' + -
CHANGES.html
47 47 <li><a href="http://dev.fckeditor.net/ticket/3898">#3898</a> : Added validation for URL presentance in Image dialog.</li> 48 48 <li><a href="http://dev.fckeditor.net/ticket/3528">#3528</a> : Fixed Context Menu issue when triggered using Shift+F10.</li> 49 49 <li><a href="http://dev.fckeditor.net/ticket/4028">#4028</a> : Maximize control's tool tip was wrong once it is maximized.</li> 50 <li><a href="http://dev.fckeditor.net/ticket/3905">#3905</a> : Fixed unauthenticated content warnings over SSL in FF 3.5.</li> 50 51 </ul> 51 52 <h3> 52 53 CKEditor 3.0</h3>