Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5239)
+++ /CKEditor/trunk/CHANGES.html	(revision 5240)
@@ -43,4 +43,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/5150">#5150</a> : Allow names in the CKEDITOR.config.colorButton_colors setting.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4810">#4810</a> : Adding configuration option for image dialog preview area filling text.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/536">#536</a> : Object style now could be applied on any parent element of current selection.</li>
 	</ul>
 	<p>
Index: /CKEditor/trunk/_source/plugins/styles/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 5239)
+++ /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 5240)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -79,5 +79,5 @@
 {
 	var blockElements	= { address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 };
-	var objectElements	= { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,ul:1 };
+	var objectElements	= { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1};
 
 	var semicolonFixRegex = /\s*(?:;\s*|$)/;
@@ -128,4 +128,6 @@
 						: this.type == CKEDITOR.STYLE_BLOCK ?
 							applyBlockStyle
+						: this.type == CKEDITOR.STYLE_OBJECT ?
+							applyObjectStyle
 						: null ).call( this, range );
 		},
@@ -155,4 +157,5 @@
 					return this.checkElementRemovable( elementPath.block || elementPath.blockLimit, true );
 
+				case CKEDITOR.STYLE_OBJECT :
 				case CKEDITOR.STYLE_INLINE :
 
@@ -161,8 +164,13 @@
 					for ( var i = 0, element ; i < elements.length ; i++ )
 					{
-						element = elements[i];
-
-						if ( element == elementPath.block || element == elementPath.blockLimit )
+						element = elements[ i ];
+
+						if ( this.type == CKEDITOR.STYLE_INLINE
+							  && ( element == elementPath.block || element == elementPath.blockLimit ) )
 							continue;
+
+						if( this.type == CKEDITOR.STYLE_OBJECT
+							 && !( element.getName() in objectElements ) )
+								continue;
 
 						if ( this.checkElementRemovable( element, true ) )
@@ -171,4 +179,17 @@
 			}
 			return false;
+		},
+		
+		checkApplicable : function( elementPath )
+		{
+			switch ( this.type )
+			{
+				case CKEDITOR.STYLE_INLINE :
+				case CKEDITOR.STYLE_BLOCK :
+					return true;
+
+				case CKEDITOR.STYLE_OBJECT :
+					return elementPath.lastElement.getAscendant( this.element, true );
+			}
 		},
 
@@ -669,4 +690,11 @@
 }
 
+	function applyObjectStyle( range )
+	{
+		var root = range.getCommonAncestor( true, true ),
+				element = root.getAscendant( this.element, true );
+		element && setupElement( element, this );
+	}
+
 	function applyBlockStyle( range )
 	{
Index: /CKEditor/trunk/_source/plugins/stylescombo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/stylescombo/plugin.js	(revision 5239)
+++ /CKEditor/trunk/_source/plugins/stylescombo/plugin.js	(revision 5240)
@@ -109,13 +109,4 @@
 						var style = styles[ value ],
 							selection = editor.getSelection();
-
-						if ( style.type == CKEDITOR.STYLE_OBJECT )
-						{
-							var element = selection.getSelectedElement();
-							if ( element )
-								style.applyToObject( element );
-
-							return;
-						}
 
 						var elementPath = new CKEDITOR.dom.elementPath( selection.getStartElement() );
@@ -170,5 +161,4 @@
 
 						var element = selection.getSelectedElement(),
-							elementName = element && element.getName(),
 							elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() );
 
@@ -181,23 +171,13 @@
 								type = style.type;
 
-							if ( type == CKEDITOR.STYLE_OBJECT )
+							if ( style.checkActive( elementPath ) )
+								this.mark( name );
+							else if ( type == CKEDITOR.STYLE_OBJECT && !style.checkApplicable( elementPath ) )
 							{
-								if ( element && style.element == elementName )
-								{
-									if ( style.checkElementRemovable( element, true ) )
-										this.mark( name );
-
-									counter[ type ]++;
-								}
-								else
-									this.hideItem( name );
+								this.hideItem( name );
+								counter[ type ]--;
 							}
-							else
-							{
-								if ( style.checkActive( elementPath ) )
-									this.mark( name );
-
-								counter[ type ]++;
-							}
+
+							counter[ type ]++;
 						}
 
Index: /CKEditor/trunk/_source/plugins/stylescombo/styles/default.js
===================================================================
--- /CKEditor/trunk/_source/plugins/stylescombo/styles/default.js	(revision 5239)
+++ /CKEditor/trunk/_source/plugins/stylescombo/styles/default.js	(revision 5240)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -82,4 +82,7 @@
 			'align' : 'right'
 		}
-	}
+	},
+
+	{ name : 'Borderless Table', element : 'table', styles: { 'border-style': 'hidden', 'background-color' : '#E6E6FA' } },
+	{ name : 'Square Bulleted List', element : 'ul', styles : { 'list-style-type' : 'square' } }
 ]);
