Index: /CKEditor/branches/features/paste/_source/plugins/pastefromword/filter/default.js =================================================================== --- /CKEditor/branches/features/paste/_source/plugins/pastefromword/filter/default.js (revision 4766) +++ /CKEditor/branches/features/paste/_source/plugins/pastefromword/filter/default.js (revision 4767) @@ -238,22 +238,24 @@ }, - convertToPx : function( cssLength ) + // Convert various length units to 'px' in ignorance of DPI. + convertToPx : ( function () { - // Convert to 'px' in ignorance of DPI. - if( cssLengthRelativeUnit.test( cssLength ) ) - { - var val, - calculator = CKEDITOR.dom.element.createFromHtml( - '
' ); - CKEDITOR.document.getBody().append( calculator ); - val = calculator.$.clientWidth; - calculator.remove(); - return val + 'px'; - } - return cssLength; - }, + var calculator = CKEDITOR.dom.element.createFromHtml( + '', CKEDITOR.document ); + CKEDITOR.document.getBody().append( calculator ); + + return function( cssLength ) + { + if( cssLength.indexOf( '%' ) == -1 ) + { + calculator.setStyle( 'width', cssLength ); + return calculator.$.clientWidth + 'px'; + } + + return cssLength; + }; + } )(), listDtdParents : CKEDITOR.dtd.parentOf( 'ol' ) @@ -1026,5 +1028,7 @@ editor.fire( 'beforeCleanWord', { filter : dataFilter } ); + console.time( 'word clean' ); data = dataProcessor.toHtml( data, false ); + console.timeEnd( 'word clean' ); /* Below post processing those things that are unable to delivered by filter rules. */