Index: /CKEditor/branches/prototype/_source/core/config.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/config.js	(revision 2797)
+++ /CKEditor/branches/prototype/_source/core/config.js	(revision 2798)
@@ -110,4 +110,7 @@
 	defaultLanguage : 'en',
 
+	enterMode : 'p',
+	shiftEnterMode : 'br',
+
 	/**
 	 * A comma separated list of plugins that are not related to editor
Index: /CKEditor/branches/prototype/_source/core/dom/node.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/dom/node.js	(revision 2797)
+++ /CKEditor/branches/prototype/_source/core/dom/node.js	(revision 2798)
@@ -259,4 +259,29 @@
 			if ( nodeType && nodeType != node.nodeType )
 				return arguments.callee.call( { $ : node }, false, nodeType );
+
+			return new CKEDITOR.dom.node( node );
+		},
+
+		getPreviousSourceNode : function( startFromSibling, nodeType )
+		{
+			var $ = startFromSibling ? this.$.previousSibling : this.$,
+				node = null;
+
+			if ( !$ )
+				return null;
+			
+			if ( ( node = $.previousSibling ) )
+			{
+				while ( node.lastChild )
+					node = node.lastChild;
+			}
+			else
+				node = $.parentNode;
+
+			if ( !node )
+				return null;
+
+			if ( nodeType && node.nodeType != nodeType )
+				return arguments.callee.apply( { $ : node }, false, nodeType );
 
 			return new CKEDITOR.dom.node( node );
Index: /CKEditor/branches/prototype/_source/core/dom/range.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/dom/range.js	(revision 2797)
+++ /CKEditor/branches/prototype/_source/core/dom/range.js	(revision 2798)
@@ -535,5 +535,5 @@
 		},
 
-		enlarge : function( unit )
+		enlarge : function( unit, editor )
 		{
 			switch ( unit )
@@ -889,4 +889,44 @@
 						this.setEndAfter( commonAncestor );
 					}
+					break;
+
+				case CKEDITOR.ENLARGE_BLOCK_CONTENTS:
+				case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:
+					var startNode = this.startContainer,
+						endNode = this.endContainer,
+						startOffset = this.startOffset,
+						endOffset = this.endOffset;
+
+					if ( startNode.type == CKEDITOR.NODE_ELEMENT )
+						startNode = startNode.getChild( startOffset );
+					if ( endNode.type == CKEDITOR.NODE_ELEMENT )
+					{
+						var childCount = endNode.getChildCount();
+						if ( childCount > endOffset )
+							endNode = endNode.getChild( endOffset ).getPreviousSourceNode();
+						else if ( childCount < 1 )
+							endNode = endNode.getPreviousSourceNode();
+						else
+						{
+							while ( endNode.lastChild )
+								endNode = endNode.lastChild;
+						}
+					}
+
+					var guardFunction = ( unit == CKEDITOR.ENLARGE_BLOCK_CONTENTS ? 
+							CKEDITOR.domWalker.blockBoundary( editor ) :
+							CKEDITOR.domWalker.listItemBoundary() ),
+						walker = new CKEDITOR.domWalker( startNode ),
+						data = walker.reverse( guardFunction),
+						boundaryEvent = data.events.pop();
+
+					this.setStartBefore( boundaryEvent.from );
+
+					walker.setNode( endNode );
+					data = walker.forward( guardFunction );
+					boundaryEvent = data.events.shift();
+
+					this.setEndAfter( boundaryEvent.from );
+					break;
 			}
 		},
@@ -1062,2 +1102,4 @@
 
 CKEDITOR.ENLARGE_ELEMENT = 1;
+CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2;
+CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3;
Index: /CKEditor/branches/prototype/_source/plugins/domwalker/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/domwalker/plugin.js	(revision 2797)
+++ /CKEditor/branches/prototype/_source/plugins/domwalker/plugin.js	(revision 2798)
@@ -142,10 +142,10 @@
 
 			// The default behavior is top stop once the end of document is reached.
-			guardFunc = guardFunc || function( evt ) { if ( !evt.data.to ) this.stop(); };
+			guardFunc = guardFunc || function( evt ) {};
 
 			this.on( 'sibling', guardFunc );
 			this.on( 'up', guardFunc );
 			this.on( 'down', guardFunc );
-			while( !this._.stopFlag )
+			while( ( !retval || retval.node ) && !this._.stopFlag )
 				retval = this.next();
 			this.removeListener( 'sibling', guardFunc );
@@ -161,10 +161,10 @@
 
 			// The default behavior is top stop once the start of document is reached.
-			guardFunc = guardFunc || function( evt ) { if ( !evt.data.to ) this.stop(); };
+			guardFunc = guardFunc || function( evt ) {};
 
 			this.on( 'sibling', guardFunc );
 			this.on( 'up', guardFunc );
 			this.on( 'down', guardFunc );
-			while( !this._.stopFlag )
+			while( ( !retval || retval.node ) && !this._.stopFlag )
 				retval = this.back();
 			this.removeListener( 'sibling', guardFunc );
@@ -177,5 +177,46 @@
 		{
 			this._.stopFlag = true;
+			return this;
+		},
+
+		setNode : function( node )
+		{
+			this._.currentNode = node;
+			return this;
 		}
 	};
+
+	CKEDITOR.domWalker.blockBoundary = function( editor )
+	{
+		return function( evt )
+		{
+			/*
+			 * 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 displayMatches = { 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 },
+				nodeNameMatches = { hr : 1, br : editor && editor.config.enterMode == 'br' },
+				to = evt.data.to,
+				from = evt.data.from;
+			if ( to && to.type == CKEDITOR.NODE_ELEMENT )
+			{
+				if ( displayMatches[ to.getComputedStyle( 'display' ) ] || nodeNameMatches[ to.getName() ] )
+					this.stop();
+			}
+			if ( ( evt.data.type == 'up' || evt.data.type == 'sibling' ) && from && from.type == CKEDITOR.NODE_ELEMENT )
+			{
+				if ( displayMatches[ from.getComputedStyle( 'display' ) ] || nodeNameMatches[ from.getName() ] )
+					this.stop();
+			}
+		};
+	};
+
+	CKEDITOR.domWalker.listItemBoundary = function()
+	{
+		return CKEDITOR.domWalker.blockBoundary( { config : { enterMode : 'br' } } );
+	};
 })();
Index: /CKEditor/branches/prototype/_source/plugins/table/dialogs/table.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/table/dialogs/table.js	(revision 2797)
+++ /CKEditor/branches/prototype/_source/plugins/table/dialogs/table.js	(revision 2798)
@@ -271,4 +271,5 @@
 												widths : [ '0%','100%' ],
 												label : '',
+												'default' : 'pixels',
 												items :
 												[
