docs: function( refDocument ) {
  			var x = 0,
  				y = 0,
  				doc = this.getDocument(),
  				body = doc.getBody(),
  				quirks = doc.$.compatMode == 'BackCompat';
  
  			if ( document.documentElement.getBoundingClientRect ) {
  				var box = this.$.getBoundingClientRect(),
  					$doc = doc.$,
  					$docElem = $doc.documentElement;
  
  				var clientTop = $docElem.clientTop || body.$.clientTop || 0,
  					clientLeft = $docElem.clientLeft || body.$.clientLeft || 0,
  					needAdjustScrollAndBorders = true;
  
  				// #3804: getBoundingClientRect() works differently on IE and non-IE
  				// browsers, regarding scroll positions.
  				//
  				// On IE, the top position of the <html> element is always 0, no matter
  				// how much you scrolled down.
  				//
  				// On other browsers, the top position of the <html> element is negative
  				// scrollTop.
  				if ( CKEDITOR.env.ie ) {
  					var inDocElem = doc.getDocumentElement().contains( this ),
  						inBody = doc.getBody().contains( this );
  
  					needAdjustScrollAndBorders = ( quirks && inBody ) || ( !quirks && inDocElem );
  				}
  
  				if ( needAdjustScrollAndBorders ) {
  					x = box.left + ( !quirks && $docElem.scrollLeft || body.$.scrollLeft );
  					x -= clientLeft;
  					y = box.top + ( !quirks && $docElem.scrollTop || body.$.scrollTop );
  					y -= clientTop;
  				}
  			} else {
  				var current = this,
  					previous = null,
  					offsetParent;
  				while ( current && !( current.getName() == 'body' || current.getName() == 'html' ) ) {
  					x += current.$.offsetLeft - current.$.scrollLeft;
  					y += current.$.offsetTop - current.$.scrollTop;
  
  					// Opera includes clientTop|Left into offsetTop|Left.
  					if ( !current.equals( this ) ) {
  						x += ( current.$.clientLeft || 0 );
  						y += ( current.$.clientTop || 0 );
  					}
  
  					var scrollElement = previous;
  					while ( scrollElement && !scrollElement.equals( current ) ) {
  						x -= scrollElement.$.scrollLeft;
  						y -= scrollElement.$.scrollTop;
  						scrollElement = scrollElement.getParent();
  					}
  
  					previous = current;
  					current = ( offsetParent = current.$.offsetParent ) ? new CKEDITOR.dom.element( offsetParent ) : null;
  				}
  			}
  
  			if ( refDocument ) {
  				var currentWindow = this.getWindow(),
  					refWindow = refDocument.getWindow();
  
  				if ( !currentWindow.equals( refWindow ) && currentWindow.$.frameElement ) {
  					var iframePosition = ( new CKEDITOR.dom.element( currentWindow.$.frameElement ) ).getDocumentPosition( refDocument );
  
  					x += iframePosition.x;
  					y += iframePosition.y;
  				}
  			}
  
  			if ( !document.documentElement.getBoundingClientRect ) {
  				// In Firefox, we'll endup one pixel before the element positions,
  				// so we must add it here.
  				if ( CKEDITOR.env.gecko && !quirks ) {
  					x += this.$.clientLeft ? 1 : 0;
  					y += this.$.clientTop ? 1 : 0;
  				}
  			}
  
  			return { x: x, y: y };
  		}