Index: _source/plugins/styles/plugin.js
===================================================================
--- _source/plugins/styles/plugin.js	(revision 4774)
+++ _source/plugins/styles/plugin.js	Wed Dec 23 16:04:08 CST 2009
@@ -278,6 +278,9 @@
 		return ( styleDefinition._ST = stylesText );
 	};
 
+
+	var notLineContent = CKEDITOR.dom.walker.lineContent( true, true );
+
 	function applyInlineStyle( range )
 	{
 		var document = range.document;
@@ -436,6 +439,18 @@
 			// Apply the style if we have something to which apply it.
 			if ( applyStyle && hasContents && styleRange && !styleRange.collapsed )
 			{
+				// Tails BRs in the range are never selected by the user,
+				// we shouldn't include them in the range which are either line-breaks
+				// or just block filler in non-IE. (#4886)
+				var walker = new CKEDITOR.dom.walker( styleRange );
+				walker.guard = notLineContent;
+				walker.evaluator = function( node )
+				{
+					if( node.type == CKEDITOR.NODE_ELEMENT && node.is( 'br' ) )
+						styleRange.setEndBefore( node );
+				};
+				walker.checkBackward();
+
 				// Build the style element, based on the style object definition.
 				var styleNode = getElement( this, document );
 
Index: _source/core/dom/walker.js
===================================================================
--- _source/core/dom/walker.js	(revision 4774)
+++ _source/core/dom/walker.js	Wed Dec 23 16:06:18 CST 2009
@@ -410,6 +410,23 @@
 	};
 
 	/**
+	 * Whether it's a non-empty text node or non-empty inline element.
+	 * @param {Boolean} ignoreBr Br should not be considered as line content.
+	 * @param {Boolean} isReject
+	 */
+	CKEDITOR.dom.walker.lineContent = function( ignoreBr, isReject )
+	{
+		return function( node )
+		{
+			var isLineContent = node.type == CKEDITOR.NODE_TEXT && !!CKEDITOR.tools.trim( node.getText() )
+								|| ( node.type == CKEDITOR.NODE_ELEMENT
+									 && !CKEDITOR.dtd.$removeEmpty[ node.getName() ]
+									 && ( !ignoreBr || !node.is( 'br' ) ) );
+			return !!( isReject ^ isLineContent );
+		};
+	};
+
+	/**
 	 * Whether the node is invisible in wysiwyg mode.
 	 * @param isReject
 	 */

