docs: function( parent, alignToTop, hscroll ) {
  			!parent && ( parent = this.getWindow() );
  
  			var doc = parent.getDocument();
  			var isQuirks = doc.$.compatMode == 'BackCompat';
  
  			// On window <html> is scrolled while quirks scrolls <body>.
  			if ( parent instanceof CKEDITOR.dom.window )
  				parent = isQuirks ? doc.getBody() : doc.getDocumentElement();
  
  			// Scroll the parent by the specified amount.
  			function scrollBy( x, y ) {
  				// Webkit doesn't support "scrollTop/scrollLeft"
  				// on documentElement/body element.
  				if ( /body|html/.test( parent.getName() ) )
  					parent.getWindow().$.scrollBy( x, y );
  				else {
  					parent.$.scrollLeft += x;
  					parent.$.scrollTop += y;
  				}
  			}
  
  			// Figure out the element position relative to the specified window.
  			function screenPos( element, refWin ) {
  				var pos = { x: 0, y: 0 };
  
  				if ( !( element.is( isQuirks ? 'body' : 'html' ) ) ) {
  					var box = element.$.getBoundingClientRect();
  					pos.x = box.left, pos.y = box.top;
  				}
  
  				var win = element.getWindow();
  				if ( !win.equals( refWin ) ) {
  					var outerPos = screenPos( CKEDITOR.dom.element.get( win.$.frameElement ), refWin );
  					pos.x += outerPos.x, pos.y += outerPos.y;
  				}
  
  				return pos;
  			}
  
  			// calculated margin size.
  			function margin( element, side ) {
  				return parseInt( element.getComputedStyle( 'margin-' + side ) || 0, 10 ) || 0;
  			}
  
  			var win = parent.getWindow();
  
  			var thisPos = screenPos( this, win ),
  				parentPos = screenPos( parent, win ),
  				eh = this.$.offsetHeight,
  				ew = this.$.offsetWidth,
  				ch = parent.$.clientHeight,
  				cw = parent.$.clientWidth,
  				lt, br;
  
  			// Left-top margins.
  			lt = {
  				x: thisPos.x - margin( this, 'left' ) - parentPos.x || 0,
  				y: thisPos.y - margin( this, 'top' ) - parentPos.y || 0
  			};
  
  			// Bottom-right margins.
  			br = {
  				x: thisPos.x + ew + margin( this, 'right' ) - ( ( parentPos.x ) + cw ) || 0,
  				y: thisPos.y + eh + margin( this, 'bottom' ) - ( ( parentPos.y ) + ch ) || 0
  			};
  
  			// 1. Do the specified alignment as much as possible;
  			// 2. Otherwise be smart to scroll only the minimum amount;
  			// 3. Never cut at the top;
  			// 4. DO NOT scroll when already visible.
  			if ( lt.y < 0 || br.y > 0 )
  				scrollBy( 0, alignToTop === true ? lt.y : alignToTop === false ? br.y : lt.y < 0 ? lt.y : br.y );
  
  			if ( hscroll && ( lt.x < 0 || br.x > 0 ) )
  				scrollBy( lt.x < 0 ? lt.x : br.x, 0 );
  		}