Index: _source/plugins/htmlwriter/plugin.js
===================================================================
--- _source/plugins/htmlwriter/plugin.js	(revision 5336)
+++ _source/plugins/htmlwriter/plugin.js	(revision )
@@ -99,7 +99,8 @@
 		// Disable indentation on <pre>.
 		this.setRules( 'pre',
 			{
-			  indent: false
+			 	indent: false,
+			 	breakAfterOpen : false
 			});
 	},
 
Index: _source/plugins/wysiwygarea/plugin.js
===================================================================
--- _source/plugins/wysiwygarea/plugin.js	(revision 5548)
+++ _source/plugins/wysiwygarea/plugin.js	(revision )
@@ -719,6 +719,9 @@
 										'</html>';
 								}
 
+								// Compensate one leading line break for <pre> as browsers
+								// are ignoring the first line-break in front of it. (#5789)
+								data = data.replace( /(<pre>)(\r\n|\n)/g, '$1$2$2' );
 								data += activationScript;
 
 
Index: _source/plugins/htmldataprocessor/plugin.js
===================================================================
--- _source/plugins/htmldataprocessor/plugin.js	(revision 5548)
+++ _source/plugins/htmldataprocessor/plugin.js	(revision )
@@ -302,6 +302,11 @@
 		return html.replace( protectSelfClosingRegex, '<cke:$1$2></cke:$1>' );
 	}
 
+	function protectPreFormatted( html )
+	{
+		return html.replace( /(<pre>)(\r\n|\n)/g, '$1$2$2' );
+	}
+
 	function protectRealComments( html )
 	{
 		return html.replace( /<!--(?!{cke_protected})[\s\S]+?-->/g, function( match )
@@ -422,6 +427,10 @@
 			// protecting them into open-close. (#3591)
 			data = protectSelfClosingElements( data );
 
+			// Compensate one leading line break for <pre> as browsers
+			// are ignoring the first line-break in front of it. (#5789)
+			data = protectPreFormatted( data );
+
 			// Call the browser to help us fixing a possibly invalid HTML
 			// structure.
 			var div = new CKEDITOR.dom.element( 'div' );
