Index: CKEditor/trunk/_source/core/dom/range.js
===================================================================
--- CKEditor/trunk/_source/core/dom/range.js	(revision 3470)
+++ CKEditor/trunk/_source/core/dom/range.js	(revision 3471)
@@ -264,8 +264,7 @@
 	function getCheckStartEndBlockEvalFunction( isStart )
 	{
+		var hadBr = false;
 		return function( node )
 		{
-			var hadBr = false;
-
 			if ( node.type == CKEDITOR.NODE_TEXT )
 			{
@@ -280,6 +279,7 @@
 				if ( !inlineChildReqElements[ node.getName() ] )
 				{
-					// If we're working at the end-of-block, forgive the first <br />.
-					if ( !isStart && node.getName() == 'br' && !hadBr )
+					// If we're working at the end-of-block, forgive the first <br /> in non-IE
+					// browsers.
+					if ( !isStart && !CKEDITOR.env.ie && node.getName() == 'br' && !hadBr )
 						hadBr = true;
 					else
@@ -1088,51 +1088,43 @@
 				case CKEDITOR.ENLARGE_BLOCK_CONTENTS:
 				case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:
-					// DFS backward to get the block/list item boundary at or before the start.
-
-					// Get the boundaries nodes.
-					var startNode = this.getTouchedStartNode(),
-						endNode = this.getTouchedEndNode();
-
-					if ( startNode.type == CKEDITOR.NODE_ELEMENT && startNode.isBlockBoundary() )
-					{
-						this.setStartAt( startNode,
-							CKEDITOR.dtd.$empty[ startNode.getName() ] ?
-								CKEDITOR.POSITION_AFTER_END :
-								CKEDITOR.POSITION_AFTER_START );
-					}
-					else
-					{
-						// Get the function used to check the enlaarging limits.
-						var guardFunction = ( unit == CKEDITOR.ENLARGE_BLOCK_CONTENTS ?
-								CKEDITOR.dom.domWalker.blockBoundary() :
-								CKEDITOR.dom.domWalker.listItemBoundary() );
-
-						// Create the DOM walker, which will traverse the DOM.
-						var walker = new CKEDITOR.dom.domWalker( startNode );
-
-						// Go walk in reverse sense.
-						var data = walker.reverse( guardFunction );
-
-						var boundaryEvent = data.events.shift();
-
-						this.setStartBefore( boundaryEvent.from );
-					}
-
-					if ( endNode.type == CKEDITOR.NODE_ELEMENT && endNode.isBlockBoundary() )
-					{
-						this.setEndAt( endNode,
-							CKEDITOR.dtd.$empty[ endNode.getName() ] ?
-								CKEDITOR.POSITION_BEFORE_START :
-								CKEDITOR.POSITION_BEFORE_END );
-					}
-					else
-					{
-						// DFS forward to get the block/list item boundary at or before the end.
-						walker.setNode( endNode );
-						data = walker.forward( guardFunction );
-						boundaryEvent = data.events.shift();
-
-						this.setEndAfter( boundaryEvent.from );
-					}
+
+					// Enlarging the start boundary.
+					var walkerRange = new CKEDITOR.dom.range( this.document );
+					walkerRange.setStartAt(
+						this.document.getBody(), CKEDITOR.POSITION_AFTER_START );
+					walkerRange.setEnd( this.startContainer, this.startOffset );
+					var walker = new CKEDITOR.dom.walker( walkerRange ),
+						
+						guard = CKEDITOR.dom.walker.blockBoundary( 
+								( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ),
+						tailBr, 
+						listGuard = function( node )
+						{
+							var result = guard( node );
+							if ( !result && node.is && node.is( 'br' ) )
+								tailBr = node;
+							return result;
+						},
+						enlargeable;
+					walker.guard = guard;
+						
+					if ( ( enlargeable = walker.lastBackward() ) )
+						this.setStartAt(
+							enlargeable, CKEDITOR.POSITION_BEFORE_START );
+
+					// Enlarging the end boundary.
+					walkerRange = this.clone();
+					walkerRange.collapse();
+					walkerRange.setEndAt(
+						this.document.getBody(), CKEDITOR.POSITION_BEFORE_END );
+					walker = new CKEDITOR.dom.walker( walkerRange );
+					walker.guard = ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ?
+						 listGuard : guard;
+					if ( ( enlargeable = walker.lastForward() ) )
+							this.setEndAfter( enlargeable );
+					// We must include the <br> at the end of range if there's
+					// one and we're expanding list item contents
+					if ( tailBr )
+						this.setEndAfter( tailBr );
 			}
 		},
@@ -1519,5 +1511,5 @@
 				return container ;
 
-			return container.getChild[ this.endOffset - 1 ] || container ;
+			return container.getChild( this.endOffset - 1 ) || container ;
 		}
 	};
Index: CKEditor/trunk/_source/core/dom/walker.js
===================================================================
--- CKEditor/trunk/_source/core/dom/walker.js	(revision 3470)
+++ CKEditor/trunk/_source/core/dom/walker.js	(revision 3471)
@@ -102,5 +102,6 @@
 				}
 				else
-					node = node.getPreviousSourceNode( true, type, guard );
+					node = ( guard ( node ) === false ) ?
+						null : node.getPreviousSourceNode( true, type, guard );
 			}
 			else
@@ -115,5 +116,6 @@
 				}
 				else
-					node = range.startContainer.getNextSourceNode( true, type, guard );
+					node = ( guard ( range.startContainer ) === false ) ?
+						null : range.startContainer.getNextSourceNode( true, type, guard ) ;
 			}
 		}
@@ -124,5 +126,8 @@
 
 			if ( !this.evaluator || this.evaluator( node ) !== false )
-				return node;
+			{
+				if ( !breakOnFalse )
+					return node;
+			}
 			else if ( breakOnFalse && this.evaluator )
 				return false;
@@ -135,13 +140,13 @@
 	}
 
-//	function iterateToLast( rtl )
-//	{
-//		var node, last = null;
-
-//		while ( node = iterate.call( this, rtl ) )
-//			last = node;
-
-//		return last;
-//	}
+	function iterateToLast( rtl )
+	{
+		var node, last = null;
+
+		while ( node = iterate.call( this, rtl ) )
+			last = node;
+
+		return last;
+	}
 
 	CKEDITOR.dom.walker = CKEDITOR.tools.createClass(
@@ -178,5 +183,5 @@
 			 * matched nodes are considered good.
 			 * If the function returns "false" the node is ignored.
-			 * @name CKEDITOR.pluginDefinition.prototype.evaluator
+			 * @name CKEDITOR.dom.walker.prototype.evaluator
 			 * @property
 			 * @type Function
@@ -190,5 +195,5 @@
 			 * If this function returns "false", the walking ends and no more
 			 * nodes are evaluated.
-			 * @name CKEDITOR.pluginDefinition.prototype.guard
+			 * @name CKEDITOR.dom.walker.prototype.guard
 			 * @property
 			 * @type Function
@@ -215,15 +220,18 @@
 //			{
 //				var range = new CKEDITOR.dom.range();
-//				range.setStartAt( startNode, startInclusive ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_END ) ;
-
+//				if ( startNode )
+//					range.setStartAt( startNode, startInclusive ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_END ) ;
+//				else
+//					range.setStartAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_AFTER_START ) ;
+//
 //				if ( endNode )
 //					range.setEndAt( endNode, endInclusive ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START ) ;
 //				else
 //					range.setEndAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_BEFORE_END ) ;
-
+//
 //				return new CKEDITOR.dom.walker( range );
 //			}
 //		},
-
+//
 		proto :
 		{
@@ -275,31 +283,75 @@
 			{
 				return iterate.call( this, true, true ) !== false;
-			}
-
-// The following features have been originally included in the implementation,
-// but they are not used anywhere in the code, so they got commented out.
-
-//			/**
-//			 * Executes a full walk forward (to the right), until no more nodes
-//			 * are available, returning the last valid node.
-//			 * @returns {CKEDITOR.dom.node} The last node at the right or null
-//			 *		if no valid nodes are available.
-//			 */
-//			lastForward : function()
-//			{
-//				return iterateToLast.call( this );
-//			},
-
-//			/**
-//			 * Executes a full walk backwards (to the left), until no more nodes
-//			 * are available, returning the last valid node.
-//			 * @returns {CKEDITOR.dom.node} The last node at the left or null
-//			 *		if no valid nodes are available.
-//			 */
-//			lastBackward : function()
-//			{
-//				return iterateToLast.call( this, true );
-//			}
+			},
+
+			/**
+			 * Executes a full walk forward (to the right), until no more nodes
+			 * are available, returning the last valid node.
+			 * @returns {CKEDITOR.dom.node} The last node at the right or null
+			 *		if no valid nodes are available.
+			 */
+			lastForward : function()
+			{
+				return iterateToLast.call( this );
+			},
+
+			/**
+			 * Executes a full walk backwards (to the left), until no more nodes
+			 * are available, returning the last valid node.
+			 * @returns {CKEDITOR.dom.node} The last node at the left or null
+			 *		if no valid nodes are available.
+			 */
+			lastBackward : function()
+			{
+				return iterateToLast.call( this, true );
+			}
+
 		}
 	});
+
+	/*
+	 * Anything whose display computed style is block, list-item, table,
+	 * table-row-group, table-header-group, table-footer-group, table-row,
+	 * table-column-group, table-column, table-cell, table-caption, or whose node
+	 * name is hr, br (when enterMode is br only) is a block boundary.
+	 */
+	var blockBoundaryDisplayMatch =
+	{
+		block : 1,
+		'list-item' : 1,
+		table : 1,
+		'table-row-group' : 1,
+		'table-header-group' : 1,
+		'table-footer-group' : 1,
+		'table-row' : 1,
+		'table-column-group' : 1,
+		'table-column' : 1,
+		'table-cell' : 1,
+		'table-caption' : 1
+	},
+	blockBoundaryNodeNameMatch = { hr : 1 };
+
+	CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames )
+	{
+		var nodeNameMatches = CKEDITOR.tools.extend( {},
+													blockBoundaryNodeNameMatch, customNodeNames || {} );
+
+		return blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] ||
+			nodeNameMatches[ this.getName() ];
+	};
+
+	CKEDITOR.dom.walker.blockBoundary = function( customNodeNames )
+	{
+		return function( node , type )
+		{
+			return ! ( node.type == CKEDITOR.NODE_ELEMENT
+						&& node.isBlockBoundary( customNodeNames ) );
+		};
+	};
+	
+	CKEDITOR.dom.walker.listItemBoundary = function()
+	{
+			return this.blockBoundary( { br : 1 } );
+	};
+
 })();
Index: CKEditor/trunk/_source/plugins/domiterator/plugin.js
===================================================================
--- CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 3470)
+++ CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 3471)
@@ -315,6 +315,8 @@
 			// next interation.
 			if ( !this._.nextNode )
+			{
 				this._.nextNode = ( isLast || block.equals( lastNode ) ) ? null : 
 					getNextSourceNode( block, lastNode, true );
+			}
 
 			return block;
Index: CKEditor/trunk/_source/plugins/find/dialogs/find.js
===================================================================
--- CKEditor/trunk/_source/plugins/find/dialogs/find.js	(revision 3470)
+++ CKEditor/trunk/_source/plugins/find/dialogs/find.js	(revision 3471)
@@ -6,19 +6,18 @@
 (function()
 {
-	// Element tag names which prevent characters counting.
-	var characterBoundaryElementsEnum =
+	function guardDomWalkerNonEmptyTextNode( node )
 	{
-		address :1, blockquote :1, dl :1, h1 :1, h2 :1, h3 :1,
-		h4 :1, h5 :1, h6 :1, p :1, pre :1, li :1, dt :1, de :1, div :1, td:1, th:1
-	};
-
-	var guardDomWalkerNonEmptyTextNode = function( evt )
+		return ( node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 )
+	}
+
+	/**
+	 * Elements which break characters been considered as sequence.
+	*/
+	function checkCharactersBoundary ( node )
 	{
-		if ( evt.data.to && evt.data.to.type == CKEDITOR.NODE_TEXT
-			&& evt.data.to.$.length > 0 )
-			this.stop();
-		CKEDITOR.dom.domWalker.blockBoundary( { br : 1 } ).call( this, evt );
-	};
-
+		var dtd = CKEDITOR.dtd;
+		return node.isBlockBoundary(
+			CKEDITOR.tools.extend( {}, dtd.$empty, dtd.$nonEditable ) );
+	}
 
 	/**
@@ -31,5 +30,6 @@
 			textNode : this.textNode,
 			offset : this.offset,
-			character : this.textNode ? this.textNode.getText().charAt( this.offset ) : null,
+			character : this.textNode ?
+				this.textNode.getText().charAt( this.offset ) : null,
 			hitMatchBoundary : this._.matchBoundary
 		};
@@ -76,12 +76,17 @@
 		 * @param {Object} start
 		 * @param {Number} offset
+		 * @param {Boolean} isStrict 
 		 */
-		var characterWalker = function( start, offset )
-		{
-			var isCursor = typeof( start.textNode ) !== 'undefined';
-			this.textNode = isCursor ? start.textNode : start;
-			this.offset = isCursor ? start.offset : offset;
+		var characterWalker = function( range , matchWord )
+		{
+			var walker =
+				new CKEDITOR.dom.walker( range );
+			walker[ matchWord ? 'guard' : 'evaluator' ] =
+				guardDomWalkerNonEmptyTextNode;
+			walker.breakOnFalse = true;
+
 			this._ = {
-				walker : new CKEDITOR.dom.domWalker( this.textNode ),
+				matchWord : matchWord,
+				walker : walker,
 				matchBoundary : false
 			};
@@ -91,67 +96,67 @@
 			next : function()
 			{
+				return this.move();	
+			},
+			
+			back : function()
+			{
+				return this.move( true );
+			},
+			
+			move : function( rtl )
+			{
+				var currentTextNode = this.textNode;
 				// Already at the end of document, no more character available.
-				if( !this.textNode )
+				if(  currentTextNode === null )
 					return cursorStep.call( this );
 
 				this._.matchBoundary = false;
 
-				// If there are more characters in the text node, get it and
-				// raise an event.
-				if( this.textNode.type == CKEDITOR.NODE_TEXT
-					&& this.offset < this.textNode.getLength() - 1 )
+				// There are more characters in the text node, step forward.
+				if( currentTextNode
+				    && rtl
+					&& this.offset > 0 )
+				{
+					this.offset--;
+					return cursorStep.call( this );
+				}
+				else if( currentTextNode
+					&& this.offset < currentTextNode.getLength() - 1 )
 				{
 					this.offset++;
 					return cursorStep.call( this );
 				}
-
-				// If we are at the end of the text node, use dom walker to get
-				// the next text node.
-				var data = null;
-				while ( !data || ( data.node && data.node.type !=
-					CKEDITOR.NODE_TEXT ) )
-				{
-					data = this._.walker.forward(
-						guardDomWalkerNonEmptyTextNode );
-
-					// Block boundary? BR? Document boundary?
-					if ( !data.node
-						|| ( data.node.type !== CKEDITOR.NODE_TEXT
-							&& data.node.getName() in
-							characterBoundaryElementsEnum ) )
-						this._.matchBoundary = true;
-				}
-				this.textNode = data.node;
-				this.offset = 0;
-				return cursorStep.call( this );
-			},
-
-			back : function()
-			{
-				this._.matchBoundary = false;
-
-				// More characters -> decrement offset and return.
-				if ( this.textNode.type == CKEDITOR.NODE_TEXT && this.offset > 0 )
-				{
-					this.offset--;
-					return cursorStep.call( this );
-				}
-
-				// Start of text node -> use dom walker to get the previous text node.
-				var data = null;
-				while ( !data
-				|| ( data.node && data.node.type != CKEDITOR.NODE_TEXT ) )
-				{
-					data = this._.walker.reverse( guardDomWalkerNonEmptyTextNode );
-
-					// Block boundary? BR? Document boundary?
-					if ( !data.node || ( data.node.type !== CKEDITOR.NODE_TEXT &&
-					data.node.getName() in characterBoundaryElementsEnum ) )
-						this._.matchBoundary = true;
-				}
-				this.textNode = data.node;
-				this.offset = data.node.length - 1;
+				else
+				{
+					currentTextNode = null;
+					// At the end of the text node, walking foward for the next.
+					while ( !currentTextNode )
+					{
+						currentTextNode =
+							this._.walker[ rtl ? 'previous' : 'next' ].call( this._.walker );
+
+						// Stop searching if we're need full word match OR
+						// already reach document end.
+						if ( this._.matchWord && !currentTextNode
+							 ||this._.walker._.end )
+							break;
+
+						// Marking as match character boundaries.
+						if( !currentTextNode
+						   && checkCharactersBoundary( this._.walker.current ) )
+							this._.matchBoundary = true;
+	
+					}
+					// Found a fresh text node.
+					this.textNode = currentTextNode;
+					if ( currentTextNode )
+						this.offset = rtl ? currentTextNode.getLength() - 1 : 0;
+					else
+						this.offset = 0;
+				}
+
 				return cursorStep.call( this );
 			}
+
 		};
 
@@ -219,5 +224,7 @@
 				if ( endNode.getLength() < 1 )
 				{
-					while ( ( endNode = endNode.getPreviousSourceNode() ) && !( endNode.type == CKEDITOR.NODE_TEXT && endNode.getLength() > 0 ) )
+					while ( ( endNode = endNode.getPreviousSourceNode() )
+						   && !( endNode.type == CKEDITOR.NODE_TEXT
+									&& endNode.getLength() > 0 ) )
 					{ /*jsl:pass*/ }
 
@@ -225,17 +232,18 @@
 				}
 
-				var cursor = new characterWalker( startNode, startIndex );
-				this._.cursors = [ cursor ];
-				if ( !( cursor.textNode.equals( endNode ) && cursor.offset == endIndex - 1 ) )
-				{
-					do
-					{
-						cursor = new characterWalker( cursor );
-						cursor.next();
-						this._.cursors.push( cursor );
-					}
-					while ( !( cursor.textNode.equals( endNode ) && cursor.offset == endIndex - 1 ) );
-				}
-
+				// Rebuild the character range.
+				var cursor,
+						walker = new characterWalker(
+								getRangeAfterCursor(
+													( { textNode: startNode, offset : startIndex } ),
+													true ) );
+				this._.cursors = [];
+				do
+				{
+					cursor = walker.next();
+					this._.cursors.push( cursor );
+				}
+				while ( !( cursor.textNode.equals( endNode )
+							 && cursor.offset == endIndex - 1 ) );
 				this._.rangeLength = this._.cursors.length;
 			},
@@ -339,14 +347,16 @@
 			},
 
-			getNextRange : function( maxLength )
-			{
-				var cursors = this._.cursors;
-				if ( cursors.length < 1 )
+			getNextCharacterRange : function( maxLength )
+			{
+				var lastCursor,
+						cursors = this._.cursors;
+				if ( !( lastCursor = cursors[ cursors.length - 1 ] ) )
 					return null;
-
-				var next = new characterWalker( cursors[ cursors.length - 1 ] );
-				return new characterRange( next, maxLength );
-			},
-
+				return new characterRange(
+										new characterWalker(
+											getRangeAfterCursor( lastCursor ) ),
+										maxLength );
+			},
+			
 			getCursors : function()
 			{
@@ -355,4 +365,26 @@
 		};
 
+		
+		// The remaining document range after the character cursor.
+		function getRangeAfterCursor( cursor , inclusive )
+		{
+			var range = new CKEDITOR.dom.range();
+			range.setStart( cursor.textNode,
+						   ( inclusive ? cursor.offset : cursor.offset + 1 ) );
+			range.setEndAt( editor.document.getBody(),
+							CKEDITOR.POSITION_BEFORE_END );
+			return range;
+		}
+
+		// The document range before the character cursor.
+		function getRangeBeforeCursor( cursor )
+		{
+			var range = new CKEDITOR.dom.range();
+			range.setStartAt( editor.document.getBody(),
+							CKEDITOR.POSITION_AFTER_START );
+			range.setEnd( cursor.textNode, cursor.offset );
+			return range;
+		}
+		
 		var KMP_NOMATCH = 0,
 			KMP_ADVANCED = 1,
@@ -431,14 +463,17 @@
 
 		var finder = {
-			startCursor : null,
-			range : null,
+			searchRange : null, 
+			matchRange : null, 
 			find : function( pattern, matchCase, matchWord, matchCyclic )
 			{
-				if( !this.range )
-					this.range = new characterRange( new characterWalker( this.startCursor ), pattern.length );
+				if( !this.matchRange )
+					this.matchRange =
+						new characterRange(
+							new characterWalker( this.searchRange ),
+							pattern.length );
 				else
 				{
-					this.range.removeHighlight();
-					this.range = this.range.getNextRange( pattern.length );
+					this.matchRange.removeHighlight();
+					this.matchRange = this.matchRange.getNextCharacterRange( pattern.length );
 				}
 
@@ -449,11 +484,11 @@
 				while ( character !== null )
 				{
-					this.range.moveNext();
-					while ( ( character = this.range.getEndCharacter() ) )
+					this.matchRange.moveNext();
+					while ( ( character = this.matchRange.getEndCharacter() ) )
 					{
 						matchState = matcher.feedCharacter( character );
 						if ( matchState == KMP_MATCHED )
 							break;
-						if ( this.range.moveNext().hitMatchBoundary )
+						if ( this.matchRange.moveNext().hitMatchBoundary )
 							matcher.reset();
 					}
@@ -463,10 +498,15 @@
 						if ( matchWord )
 						{
-							var cursors = this.range.getCursors(),
+							var cursors = this.matchRange.getCursors(),
 								tail = cursors[ cursors.length - 1 ],
-								head = cursors[ 0 ],
-								headWalker = new characterWalker( head ),
-								tailWalker = new characterWalker( tail );
-
+								head = cursors[ 0 ];
+								headWalker =
+									new characterWalker(
+										getRangeBeforeCursor( head ),
+									true ),
+								tailWalker =
+									new characterWalker(
+										getRangeAfterCursor( tail ),
+									true );
 							if ( ! ( isWordSeparator(
 										headWalker.back().character )
@@ -476,16 +516,17 @@
 						}
 
-						this.range.setMatched();
+						this.matchRange.setMatched();
 						return true;
 					}
 				}
 
-				this.range.clearMatched();
-
-				// clear current session and restart from beginning
+				this.matchRange.clearMatched();
+				this.matchRange.removeHighlight();
+				// Clear current session and restart with the default search
+				// range.
 				if ( matchCyclic )
 				{
-					this.startCursor = getDefaultStartCursor();
-					this.range = null;
+					this.searchRange = getSearchRange( true );
+					this.matchRange = null;
 				}
 
@@ -531,22 +572,24 @@
 
 		/**
-		 * Get cursor that indicate search begin with, receive from user
+		 * The range in which find/replace happened, receive from user
 		 * selection prior.
 		 */
-		function getStartCursor()
-		{
-			var sel = editor.getSelection();
-			if ( sel )
-			{
-				var lastRange = sel.getRanges()[ sel.getRanges().length - 1 ];
-				return {
-					textNode : lastRange.getBoundaryNodes().endNode,
-					offset : lastRange.endContainer.type ===
-						CKEDITOR.NODE_ELEMENT ?
-						0	: lastRange.endOffset
-				};
+		function getSearchRange( isDefault )
+		{
+			var searchRange,
+				sel = editor.getSelection(),
+				body = editor.document.getBody();
+			if ( sel && !isDefault )
+			{
+				searchRange = sel.getRanges()[ 0 ].clone();
+				searchRange.collapse( true );
 			}
 			else
-				return getDefaultStartCursor();
+			{
+				searchRange = new CKEDITOR.dom.range();
+				searchRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START );
+			}
+			searchRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END );
+			return searchRange;
 		}
 
@@ -786,5 +829,5 @@
 			{
 				// Establish initial searching start position.
-				finder.startCursor = getStartCursor.call( this );
+				finder.searchRange = getSearchRange();
 
 				if ( startupPage == 'replace' )
@@ -795,14 +838,14 @@
 			onHide : function()
 			{
-				if ( finder.range && finder.range.isMatched() )
-				{
-					finder.range.removeHighlight();
+				if ( finder.matchRange && finder.matchRange.isMatched() )
+				{
+					finder.matchRange.removeHighlight();
 					editor.focus();
 					editor.getSelection().selectRanges(
-						[ finder.range.toDomRange() ] );
+						[ finder.matchRange.toDomRange() ] );
 				}
 
 				// Clear current session before dialog close
-				delete finder.range;
+				delete finder.matchRange;
 			}
 		};
Index: CKEditor/trunk/_source/tests/core/dom/range.html
===================================================================
--- CKEditor/trunk/_source/tests/core/dom/range.html	(revision 3470)
+++ CKEditor/trunk/_source/tests/core/dom/range.html	(revision 3471)
@@ -22,4 +22,11 @@
 	var doc = new CKEDITOR.dom.document( document );
 
+	var getRange = function( startId, endId )
+	{
+		var range = new CKEDITOR.dom.range( CKEDITOR.document );
+		range.moveToBookmark( { startNode : startId, endNode : endId, serializable : true } );
+		return range;
+	};
+
 	return tests = {
 		test__constructor : function()
@@ -929,4 +936,126 @@
 			assert.areSame( 0, range.endOffset, 'range.endOffset' );
 			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+
+		test_enlarge_list1 : function()
+		{
+			var range = getRange( 'S1', null );
+			range.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP7' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP7' ), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 3, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+
+		test_enlarge_list2 : function()
+		{
+			var range = getRange( 'S2', 'E2' );
+			range.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP8' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP8' ), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 4, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+
+		test_enlarge_list3 : function()
+		{
+			var range = getRange( 'S3', null );
+			range.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP9' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 2, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP9' ), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 3, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+
+		test_enlarge_list4 : function()
+		{
+			var range = getRange( 'S4', null );
+			range.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP10' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 3, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP10' ), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 5, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+
+		test_enlarge_list5 : function()
+		{
+			var range = getRange( 'S9', null );
+			var bookmark = range.createBookmark();
+			range.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP15' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP15' ), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 4, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+			range.moveToBookmark( bookmark );
+		},
+
+		test_enlarge_block1 : function()
+		{
+			var range = getRange( 'S5', null );
+			range.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP11' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP11'), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 5, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+
+		test_enlarge_block2 : function()
+		{
+			var range = getRange( 'S10', null );
+			var bookmark = range.createBookmark();
+			range.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP16' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP16'), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 5, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+			range.moveToBookmark( bookmark );
+		},
+
+		test_enlarge_block3 : function()
+		{
+			var range = getRange( 'S6', null );
+			range.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP12' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP12'), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 2, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+		
+		test_enlarge_block4 : function()
+		{
+			var range = getRange( 'S7', null );
+			range.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP13' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.areSame( document.getElementById( '_EnlargeP13'), range.endContainer.$, 'range.endContainer' );
+			assert.areSame( 2, range.endOffset, 'range.endOffset' );
+			assert.isFalse( range.collapsed, 'range.collapsed' );
+		},
+
+		test_enlarge_block5 : function()
+		{
+			var range = getRange( 'S8', null );
+			range.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP14' ), range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+			assert.isTrue( range.collapsed, 'range.collapsed' );
 		},
 
@@ -1971,4 +2100,14 @@
 		<p id="_EnlargeP5">Test <i id="_EnlargeI5">Enlarge</i></p>
 		<p id="_EnlargeP6">Test <i id="_EnlargeI6"><b></b>Enlarge</i></p>
+		<p id="_EnlargeP7">Test <span id="S1"></span>List<br/ >Item Enlarge</p>
+		<p id="_EnlargeP8">Test <span id="S2"></span>List<span id="E2"></span> <br /><br />Item Enlarge</p>
+		<p id="_EnlargeP9">Test List <br /><span id="S3"></span><br />Item Enlarge</p>
+		<p id="_EnlargeP10">Test List <br /><br />Item<span id="S4"></span> Enlarge</p>
+		<p id="_EnlargeP11">Test <strong>Block<span id="S5"></span></strong><br /><br />Enlarge</p>
+		<div id="_EnlargeP12">Test<span id="S6"></span> Block <div>Enlarge</div></div>
+		<div>Test <div id="_EnlargeP13">Blo<span id="S7"></span>ck</div> Enlarge</div>
+		<p id="_EnlargeP14"><span id="S8"></span></p>
+		<p id="_EnlargeP15">Test <span id="S9"></span>List<br/ >Item Enlarge</p>
+		<p id="_EnlargeP16">Test <strong>Block<span id="S10"></span></strong><br /><br />Enlarge</p>
 	</div>
 	<script type="text/javascript">
