Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5966)
+++ /CKEditor/trunk/CHANGES.html	(revision 5967)
@@ -78,4 +78,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/4023">#4023</a> : [Opera] Maximize plugin.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/6416">#6416</a> : [IE9] Unable to make text selection with mouse in source area.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/6099">#6099</a> : BIDI: when we apply explicit language direction to Numbered/Bulleted List the corresponding BIDI Tool bar icon is not highlighted in the Toolbar.</li>c
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/6427">#6427</a> : Ukrainian;</li>
Index: /CKEditor/trunk/_source/plugins/bidi/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/bidi/plugin.js	(revision 5966)
+++ /CKEditor/trunk/_source/plugins/bidi/plugin.js	(revision 5967)
@@ -7,8 +7,17 @@
 {
 	var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 },
-		directSelectionGuardElements = {};
+		directSelectionGuardElements = {},
+		// All guard elements which can have a direction applied on them.
+		allGuardElements = {};
 	CKEDITOR.tools.extend( directSelectionGuardElements, guardElements, { tr:1, p:1, div:1, li:1 } );
-
-	function onSelectionChange( evt )
+	CKEDITOR.tools.extend( allGuardElements, directSelectionGuardElements, { td:1 } );
+
+	function onSelectionChange( e )
+	{
+		setToolbarStates( e );
+		handleMixedDirContent( e );
+	}
+
+	function setToolbarStates( evt )
 	{
 		var editor = evt.editor,
@@ -19,17 +28,7 @@
 		useComputedState = useComputedState === undefined || useComputedState;
 
-		if ( useComputedState )
-		{
-			var selection = editor.getSelection(),
-				ranges = selection.getRanges();
-
-			selectedElement = ranges && ranges[ 0 ].getEnclosedNode();
-
-			// If this is not our element of interest, apply to fully selected elements from guardElements.
-			if ( !selectedElement || selectedElement
-					&& !( selectedElement.type == CKEDITOR.NODE_ELEMENT && selectedElement.getName() in directSelectionGuardElements )
-				)
-				selectedElement = getFullySelected( selection, guardElements );
-		}
+		// We can use computedState provided by the browser or traverse parents manually.
+		if ( !useComputedState )
+			selectedElement = getElementForDirection( path.lastElement );
 
 		selectedElement = selectedElement || path.block || path.blockLimit;
@@ -44,11 +43,34 @@
 		editor.getCommand( 'bidirtl' ).setState( selectionDir == 'rtl' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
 		editor.getCommand( 'bidiltr' ).setState( selectionDir == 'ltr' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
-
-		var chromeRoot = editor.container.getChild( 1 );
-
-		if ( selectionDir != editor.lang.dir )
+	}
+
+	function handleMixedDirContent( evt )
+	{
+		var editor = evt.editor,
+			chromeRoot = editor.container.getChild( 1 ),
+			directionNode = getElementForDirection( evt.data.path.lastElement );
+		
+		if ( directionNode && editor.lang.dir != directionNode.getComputedStyle( 'direction' ) )
 			chromeRoot.addClass( 'cke_mixed_dir_content' );
 		else
 			chromeRoot.removeClass( 'cke_mixed_dir_content' );
+	}
+
+	/**
+	 * Returns element with possibility of applying the direction.
+	 * @param node
+	 */
+	function getElementForDirection( node )
+	{
+		while ( node && !( node.getName() in allGuardElements || node.is( 'body' ) ) )
+		{
+			var parent = node.getParent();
+			if ( !parent )
+				break;
+
+			node = parent;
+		}
+
+		return node;
 	}
 
