Ticket #3905: 3905_2.patch

File 3905_2.patch, 5.3 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    223223                                        var isCustomDomain = CKEDITOR.env.isCustomDomain();
    224224
    225225                                        // Creates the iframe that holds the editable document.
    226                                         var createIFrame = function()
     226                                        var createIFrame = function( data )
    227227                                        {
    228228                                                if ( iframe )
    229229                                                        iframe.remove();
     
    231231                                                        fieldset.remove();
    232232
    233233                                                frameLoaded = 0;
    234                                                 // The document domain must be set within the src
    235                                                 // attribute;
    236                                                 // Defer the script execution until iframe
    237                                                 // has been added to main window, this is needed for some
    238                                                 // browsers which will begin to load the frame content
    239                                                 // 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                                                                 + ' )';
    250234
    251                                                 // Loading via src attribute does not work in Opera.
    252                                                 if ( CKEDITOR.env.opera )
    253                                                         src = 'void(0);';
    254 
    255235                                                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>' );
    262248
     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
    263264                                                var accTitle = editor.lang.editorTitle.replace( '%1', editor.name );
    264265
    265266                                                if ( CKEDITOR.env.gecko )
     
    314315                                        // enables editing, and makes some
    315316                                        var activationScript =
    316317                                                '<script id="cke_actscrpt" type="text/javascript">' +
    317                                                         'window.onload = function()' +
    318                                                         '{' +
    319318                                                                // Call the temporary function for the editing
    320319                                                                // boostrap.
    321320                                                                'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' +
    322                                                         '}' +
    323321                                                '</script>';
    324322
    325323                                        // Editing area bootstrap code.
     
    522520                                                                        '</html>' +
    523521                                                                        activationScript;
    524522
    525                                                                 window[ '_cke_htmlToLoad_' + editor.name ] = data;
    526523                                                                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 );
    537525                                                        },
    538526
    539527                                                        getData : function()
  • _source/core/_bootstrap.js

     
    1212        // Check is High Contrast is active by creating a temporary element with a
    1313        // background image.
    1414
    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;
    1617
     18        var testImage = useSpacer ? ( CKEDITOR.basePath + 'images/spacer.gif' ) : 'about:blank';
     19
    1720        var hcDetect = CKEDITOR.dom.element.createFromHtml(
    1821                '<div style="width:0px;height:0px;' +
    1922                        'position:absolute;left:-10000px;' +
  • CHANGES.html

     
    4747                <li><a href="http://dev.fckeditor.net/ticket/3898">#3898</a> : Added validation for URL presentance in Image dialog.</li>
    4848                <li><a href="http://dev.fckeditor.net/ticket/3528">#3528</a> : Fixed Context Menu issue when triggered using Shift+F10.</li>
    4949                <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>
    5051        </ul>
    5152        <h3>
    5253                CKEditor 3.0</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy