Index: _source/tests/core/dom/range.html
===================================================================
--- _source/tests/core/dom/range.html	(revision 3733)
+++ _source/tests/core/dom/range.html	Thu Jul 30 17:52:30 CST 2009
@@ -1059,6 +1059,20 @@
 			assert.isTrue( range.collapsed, 'range.collapsed' );
 		},
 
+		/**
+		 * Test enlarge list when there's no nodes between
+		 * range start and the block boundary.
+		 */
+		test_enlarge_block6 : function()
+		{
+			var range = getRange( 'S11', null );
+			range.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS );
+
+			assert.areSame( document.getElementById( '_EnlargeP17' ),
+				range.startContainer.$, 'range.startContainer' );
+			assert.areSame( 0, range.startOffset, 'range.startOffset' );
+		},
+
 		test_deleteContents_W3C_1 : function()
 		{
 			// W3C DOM Range Specs - Section 2.6 - Example 1
@@ -2384,6 +2398,7 @@
 		<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>
+		<p id="_EnlargeP17"><span><span id="S11"></span>Test Block Enlarge<span id="E11"></span></span></p>
 		<p id="_trim_ct">Test trim</p>
 	</div>
 	<script type="text/javascript">
Index: _source/tests/plugins/domiterator/domiterator.html
===================================================================
--- _source/tests/plugins/domiterator/domiterator.html	(revision 4020)
+++ _source/tests/plugins/domiterator/domiterator.html	Thu Jul 30 17:52:30 CST 2009
@@ -25,7 +25,7 @@
 {
 	return CKEDITOR.document.getById( id ).getValue().replace(/\r/gi,'');
 }
-
+var testcases;
 CKEDITOR.test.addTestCase( (function()
 {
 
@@ -99,7 +99,7 @@
 		arrayAssert.itemsAreEqual( expectedTagList, blockList );
 	}
 
-	return {
+	return testcases = {
 
 		/**
 		 * Test iterating over table cells.
@@ -165,10 +165,10 @@
 		test_iterator_establish_paragraph: function()
 		{
 			var range = new CKEDITOR.dom.range(doc);
-			range.setStartAt(doc.getById('iterTarget9'), CKEDITOR.POSITION_AFTER_START);
+			range.setStartAt( doc.getById('iterTarget9'), CKEDITOR.POSITION_AFTER_START );
-			range.setEndAt(doc.getById('iterTarget9'), CKEDITOR.POSITION_BEFORE_END);
+			range.setEndAt( doc.getById('iterTarget9'), CKEDITOR.POSITION_BEFORE_END );
-			assumeIterationSameAs(range, null, ['p']);
+			assumeIterationSameAs( range, null, ['p'] );
-			assumeElementContentAreSame( 'iterContainer9', 'iterResult9');
+			assumeElementContentAreSame( 'iterContainer9', 'iterResult9' );
 		},
 
 		/**
@@ -185,7 +185,7 @@
 		name : document.title
 	};
 })() );
-
+//window.onload = testcases.test_iterator_establish_paragraph;
 	//]]>
 	</script>
 </head>
Index: _source/core/dom/range.js
===================================================================
--- _source/core/dom/range.js	(revision 4014)
+++ _source/core/dom/range.js	Thu Jul 30 17:46:50 CST 2009
@@ -129,7 +129,7 @@
 
 			// For Extract and Clone, we must clone this level.
 			if ( clone && !levelStartNode.equals( startNode ) )		// action = 0 = Delete
-				levelClone = clone.append( levelStartNode.clone( false, action == 1 ) );
+				levelClone = clone.append( levelStartNode.clone() );
 
 			currentNode = levelStartNode.getNext();
 
@@ -173,7 +173,7 @@
 
 			// For Extract and Clone, we must clone this level.
 			if ( action > 0 && !levelStartNode.equals( endNode ) )		// action = 0 = Delete
-				levelClone = clone.append( levelStartNode.clone( false, action == 1 ) );
+				levelClone = clone.append( levelStartNode.clone() );
 
 			// The processing of siblings may have already been done by the parent.
 			if ( !startParents[ k ] || levelStartNode.$.parentNode != startParents[ k ].$.parentNode )
@@ -1174,19 +1174,18 @@
 					walker.guard = boundaryGuard;
 
 
-					if ( ( enlargeable = walker.lastBackward() ) )
-					{
-						// It's the body which stop the enlaring if no block boundary found.
+					enlargeable = walker.lastBackward()
+					// It's the body which stop the enlarging if no block boundary found.
-						blockBoundary = blockBoundary || body;
+					blockBoundary = blockBoundary || body;
 
-						// Start the range at different position by comparing
-						// the document position of it with 'enlargeable' node.
-						this.setStartAt(
-								blockBoundary,
+					// Start the range at different position by comparing
+					// the document position of it with 'enlargeable' node.
+					this.setStartAt(
+							blockBoundary,
-								blockBoundary.contains( enlargeable ) ?
+							!blockBoundary.is( 'br' ) &&
+							( !enlargeable || blockBoundary.contains( enlargeable ) ) ?
-									CKEDITOR.POSITION_AFTER_START :
-									CKEDITOR.POSITION_AFTER_END );
+								CKEDITOR.POSITION_AFTER_START :
+								CKEDITOR.POSITION_AFTER_END );
-					}
 
 					// Enlarging the end boundary.
 					walkerRange = this.clone();
@@ -1200,19 +1199,18 @@
 					blockBoundary = null;
 					// End the range right before the block boundary node.
 
-					if ( ( enlargeable = walker.lastForward() ) )
-					{
-						// It's the body which stop the enlaring if no block boundary found.
+					enlargeable = walker.lastForward()
+					// It's the body which stop the enlarging if no block boundary found.
-						blockBoundary = blockBoundary || body;
+					blockBoundary = blockBoundary || body;
 
-						// Start the range at different position by comparing
-						// the document position of it with 'enlargeable' node.
-						this.setEndAt(
-								blockBoundary,
+					// Start the range at different position by comparing
+					// the document position of it with 'enlargeable' node.
+					this.setEndAt(
+							blockBoundary,
-								blockBoundary.contains( enlargeable ) ?
+							!blockBoundary.is( 'br' ) &&
+							( !enlargeable || blockBoundary.contains( enlargeable ) ) ?
-									CKEDITOR.POSITION_BEFORE_END :
-									CKEDITOR.POSITION_BEFORE_START );
+								CKEDITOR.POSITION_BEFORE_END :
+								CKEDITOR.POSITION_BEFORE_START );
-					}
 					// We must include the <br> at the end of range if there's
 					// one and we're expanding list item contents
 					if ( tailBr )
