Index: /CKEditor/trunk/_source/plugins/styles/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 6274)
+++ /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 6275)
@@ -1,3 +1,3 @@
-/*
+﻿/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -93,4 +93,6 @@
 	var semicolonFixRegex = /\s*(?:;\s*|$)/;
 
+	var notBookmark = CKEDITOR.dom.walker.bookmark( 0, 1 );
+
 	CKEDITOR.style = function( styleDefinition, variablesValues )
 	{
@@ -515,6 +517,6 @@
 							// if this is the last node in its parent, we must also
 							// check if the parent itself can be added completelly
-							// to the range.
-							while ( !includedNode.$.nextSibling
+							// to the range, otherwise apply the style immediately.
+							while ( applyStyle = !includedNode.getNext( notBookmark )
 								&& ( parentNode = includedNode.getParent(), dtd[ parentNode.getName() ] )
 								&& ( parentNode.getPosition( firstNode ) | CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_FOLLOWING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
@@ -526,9 +528,4 @@
 							styleRange.setEndAfter( includedNode );
 
-							// If the included node still is the last node in its
-							// parent, it means that the parent can't be included
-							// in this style DTD, so apply the style immediately.
-							if ( !includedNode.$.nextSibling )
-								applyStyle = true;
 						}
 					}
