/*\r
-Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
\r
if ( block.autoSize )\r
{\r
- // We must adjust first the width or IE6 could include extra lines in the height computation\r
- var widthNode = block.element.$;\r
+ var panelDoc = block.element.getDocument();\r
+ var width = ( CKEDITOR.env.webkit? block.element : panelDoc.getBody() )[ '$' ].scrollWidth;\r
\r
- if ( CKEDITOR.env.gecko || CKEDITOR.env.opera )\r
- widthNode = widthNode.parentNode;\r
-\r
- if ( CKEDITOR.env.ie )\r
- widthNode = widthNode.document.body;\r
-\r
- var width = widthNode.scrollWidth;\r
// Account for extra height needed due to IE quirks box model bug:\r
// http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug\r
// (#3426)\r