Index: /CKEditor/branches/prototype/_source/plugins/elementspath/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/elementspath/plugin.js	(revision 2262)
+++ /CKEditor/branches/prototype/_source/plugins/elementspath/plugin.js	(revision 2263)
@@ -29,10 +29,57 @@
 	init : function( editor, pluginPath )
 	{
+		var spaceId = 'cke_path_' + editor.name;
+		var spaceElement;
+		var getSpaceElement = function()
+		{
+			if ( !spaceElement )
+				spaceElement = CKEDITOR.document.getById( spaceId );
+			return spaceElement;
+		};
+
 		editor.on( 'themeSpace', function( event )
 			{
 				if ( event.data.space == 'bottom' )
-					event.data.html +=
-						'<div>Elements Path!</div>';
+					event.data.html += '<div id="' + spaceId + '" class="cke_path"><br></div>';
+			});
+
+		editor.on( 'selectionChange', function()
+			{
+				var element = this.getSelection().getStartElement(),
+					html = [],
+					elementsList = this._.elementsPathList = [];
+
+				while ( element )
+				{
+					var index = elementsList.push( element ) - 1;
+					var name = element.getName();
+					html.unshift( '<a href="element:', name, '" onclick="CKEDITOR._.elementsPathClick( \'', this.name, '\',', index, ');return false;">', name, '</a>' );
+
+					if ( name == 'body' )
+						break;
+
+					element = element.getParent();
+				}
+
+				getSpaceElement().setHtml( html.join('') );
+			});
+
+		editor.on( 'contentDomUnload', function()
+			{
+				getSpaceElement().setHtml( '<br>' );
 			});
 	}
 });
+
+/**
+ * Handles the click on an element in the element path.
+ * @private
+ */
+CKEDITOR._.elementsPathClick = function( instanceName, elementIndex )
+{
+	var editor = CKEDITOR.instances[ instanceName ];
+	editor.focus();
+
+	var element = editor._.elementsPathList[ elementIndex ];
+	editor.getSelection().selectElement( element );
+};
Index: /CKEditor/branches/prototype/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/selection/plugin.js	(revision 2262)
+++ /CKEditor/branches/prototype/_source/plugins/selection/plugin.js	(revision 2263)
@@ -60,10 +60,35 @@
 
 	var checkSelectionChangeTimer;
+	var checkSelectionChangeTimeoutPending;
 	var checkSelectionChangeTimeout = function()
 	{
+		// Firing the "OnSelectionChange" event on every key press started to
+		// be too slow. This function guarantees that there will be at least
+		// 200ms delay between selection checks.
+
+		checkSelectionChangeTimeoutPending = true;
+
 		if ( checkSelectionChangeTimer )
-			window.clearTimeout( checkSelectionChangeTimer );
-
-		checkSelectionChangeTimer = CKEDITOR.tools.setTimeout( checkSelectionChange, 100, this );
+			return;
+
+		checkSelectionChangeTimeoutExec.call( this );
+
+		checkSelectionChangeTimer = CKEDITOR.tools.setTimeout( checkSelectionChangeTimeoutExec, 200, this );
+	};
+
+	var checkSelectionChangeTimeoutExec = function()
+	{
+		checkSelectionChangeTimer = null;
+
+		if ( checkSelectionChangeTimeoutPending )
+		{
+			// Call this with a timeout so the browser properly moves the
+			// selection after the mouseup. It happened that the selection was
+			// being moved after the mouseup when clicking inside selected text
+			// with Firefox.
+			CKEDITOR.tools.setTimeout( checkSelectionChange, 0, this );
+
+			checkSelectionChangeTimeoutPending = false;
+		}
 	};
 
@@ -80,5 +105,5 @@
 						// IE is the only to provide the "selectionchange"
 						// event.
-						editor.document.on( 'selectionchange', checkSelectionChange, editor );
+						editor.document.on( 'selectionchange', checkSelectionChangeTimeout, editor );
 					}
 					else
@@ -88,10 +113,5 @@
 						// press.
 
-						editor.document.on( 'mouseup', checkSelectionChange, editor );
-
-						// Firing the "OnSelectionChange" event on every key
-						// press started to be too slow. So, a timer has been
-						// implemented to solve performance issues when typing
-						// to quickly.
+						editor.document.on( 'mouseup', checkSelectionChangeTimeout, editor );
 						editor.document.on( 'keyup', checkSelectionChangeTimeout, editor );
 					}
@@ -333,5 +353,46 @@
 
 			return ( node ? new CKEDITOR.dom.element( node ) : null );
-		}
+		},
+
+		selectElement : (function()
+		{
+			if ( CKEDITOR.env.ie )
+			{
+				return function( element )
+					{
+						this.getNative().empty() ;
+
+						var range ;
+						try
+						{
+							// Try to select the node as a control.
+							range = this.document.$.body.createControlRange() ;
+							range.addElement( element.$ ) ;
+						}
+						catch(e)
+						{
+							// If failed, select it as a text range.
+							range = this.document.$.body.createTextRange() ;
+							range.moveToElementText( element.$ ) ;
+						}
+
+						range.select() ;
+					};
+			}
+			else
+			{
+				return function( element )
+					{
+						// Create the range for the element.
+						var range = this.document.$.createRange() ;
+						range.selectNode( element.$ ) ;
+
+						// Select the range.
+						var sel = this.getNative() ;
+						sel.removeAllRanges() ;
+						sel.addRange( range ) ;
+					};
+			}
+		})()
 	};
 })();
Index: /CKEditor/branches/prototype/_source/skins/default/mainui.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/mainui.css	(revision 2262)
+++ /CKEditor/branches/prototype/_source/skins/default/mainui.css	(revision 2263)
@@ -43,2 +43,14 @@
 	background-color: #fff;
 }
+
+.cke_skin_default .cke_path a
+{
+	padding-left: 5px;
+	padding-right: 5px;
+	cursor: pointer;
+}
+
+.cke_skin_default .cke_path a:hover
+{
+	text-decoration: underline;
+}
