Ticket #8348: 8348_2.patch

File 8348_2.patch, 1.3 KB (added by Frederico Caldeira Knabben, 8 years ago)
  • _source/themes/default/theme.js

     
    339339{
    340340        var container = this.container,
    341341                contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ),
     342                contentsFrame = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement,
    342343                outer = resizeInner ? container.getChild( 1 ) : container;
    343344
    344345        // Set as border box width. (#5353)
    345346        outer.setSize( 'width',  width, true );
    346347
     348        // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (#8348)
     349        contentsFrame && ( contentsFrame.style.width = '1%' );
     350
    347351        // Get the height delta between the outer table and the content area.
    348352        // If we're setting the content area's height, then we don't need the delta.
    349353        var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 );
    350354        contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' );
    351355
     356        // WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (#8348)
     357        contentsFrame && ( contentsFrame.style.width = '100%' );
     358
    352359        // Emit a resize event.
    353360        this.fire( 'resize' );
    354361};
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy