Index: /CKEditor/branches/features/fullpage/CHANGES.html
===================================================================
--- /CKEditor/branches/features/fullpage/CHANGES.html	(revision 4630)
+++ /CKEditor/branches/features/fullpage/CHANGES.html	(revision 4631)
@@ -48,4 +48,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4574">#4574</a> : Added the table merging tools and corresponding context menu options.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4340">#4340</a> : Added the email protection option for link dialog.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4210">#4210</a> : Added CKEditor plugin for jQuery.</li>
 	</ul>
 	<p>
@@ -63,5 +64,4 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4609">#4609</a> : Fixed flash object is lost when loading data from outside editor.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4625">#4625</a> : Fixed editor stay visible in a div with style 'visibility:hidden'.</li>
-		<li><a href="http://dev.fckeditor.net/ticket/4621">#4621</a> : Fixed clicking below table cause a empty table been generated.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3373">#3373</a> : Fixed empty context menu when there's no menu item at all.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4473">#4473</a> : Fixed setting rules on the same element tag name throw error.</li>
@@ -102,4 +102,6 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4594">#4594</a> : Fixed context menu goes off-screen when mouse is at right had side of screen.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4673">#4673</a> : Fixed undo not available straight away if shift key is used to enter first character.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4690">#4690</a> : Fixed the parsing of nested inline elements.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4621">#4621</a> : Fixed clicking below table cause a empty table been generated.</li>
 	</ul>
 	<h3>
@@ -110,5 +112,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4219">#4219</a> : Added fallback mechanism for config.language.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4194">#4194</a> : Added support for using multiple css style sheets within the editor.</li>
-		<li><a href="http://dev.fckeditor.net/ticket/4210">#4210</a> : Introducing the CKEditor plugin for jQuery (the jQuery adapter).</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4463">#4463</a> : Added inline CSS support in all places where custom stylesheet could apply.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4343">#4343</a> : Added config option 'browserContextMenuOnCtrl' for 'contextmenu' plugin.</li>
 	</ul>
Index: /CKEditor/branches/features/fullpage/_source/core/dom/document.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/core/dom/document.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/core/dom/document.js	(revision 4631)
@@ -53,4 +53,19 @@
 		},
 
+		appendStyleText : function( cssStyleText )
+		{
+			if ( this.$.createStyleSheet )
+			{
+				var styleSheet = this.$.createStyleSheet( "" );
+				styleSheet.cssText = cssStyleText ;
+			}
+			else
+			{
+				var style = new CKEDITOR.dom.element( 'style', this );
+				style.append( new CKEDITOR.dom.text( cssStyleText, this ) );
+				this.getHead().append( style );
+			}
+		},
+
 		createElement : function( name, attribsAndStyles )
 		{
Index: /CKEditor/branches/features/fullpage/_source/core/editor.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/core/editor.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/core/editor.js	(revision 4631)
@@ -125,5 +125,5 @@
 
 		// Load language file.
-		loadLang( editor );
+		loadSkin( editor );
 	};
 
@@ -247,5 +247,5 @@
 						// Load the editor skin.
 						editor.fire( 'pluginsLoaded' );
-						loadSkin( editor );
+						loadTheme( editor );
 					});
 			});
@@ -256,5 +256,5 @@
 		CKEDITOR.skins.load( editor, 'editor', function()
 			{
-				loadTheme( editor );
+				loadLang( editor );
 			});
 	};
Index: /CKEditor/branches/features/fullpage/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/core/htmlparser/fragment.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/core/htmlparser/fragment.js	(revision 4631)
@@ -267,6 +267,16 @@
 		parser.onTagClose = function( tagName )
 		{
-			var index = 0,
-				pendingAdd = [],
+			// Check if there is any pending tag to be closed.
+			for ( var i = pendingInline.length - 1 ; i >= 0 ; i-- )
+			{
+				// If found, just remove it from the list.
+				if ( tagName == pendingInline[ i ].name )
+				{
+					pendingInline.splice( i, 1 );
+					return;
+				}
+			}
+
+			var pendingAdd = [],
 				candidate = currentNode;
 
@@ -276,11 +286,5 @@
 				// it will continue after the closing tag.
 				if ( !candidate._.isBlockLike )
-				{
 					pendingInline.unshift( candidate );
-
-					// Increase the index, so it will not get checked again in
-					// the pending list check that follows.
-					index++;
-				}
 
 				// This node should be added to it's parent at this point. But,
@@ -312,24 +316,4 @@
 				if ( candidate == currentNode )
 					currentNode = currentNode.parent;
-			}
-			// The tag is not actually closing anything, thus we need invalidate
-			// the pending elements.(#3862)
-			else
-			{
-				pendingInline.splice( 0, index );
-				index = 0;
-			}
-
-			// Check if there is any pending tag to be closed.
-			for ( ; index < pendingInline.length ; index++ )
-			{
-				// If found, just remove it from the list.
-				if ( tagName == pendingInline[ index ].name )
-				{
-					pendingInline.splice( index, 1 );
-
-					// Decrease the index so we continue from the next one.
-					index--;
-				}
 			}
 
Index: /CKEditor/branches/features/fullpage/_source/core/resourcemanager.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/core/resourcemanager.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/core/resourcemanager.js	(revision 4631)
@@ -87,5 +87,6 @@
 			throw '[CKEDITOR.resourceManager.add] The resource name "' + name + '" is already registered.';
 
-		this.registered[ name ] = definition || {};
+		CKEDITOR.fire( name + CKEDITOR.tools.capitalize( this.fileName ) + 'Ready',
+				this.registered[ name ] = definition || {} );
 	},
 
Index: /CKEditor/branches/features/fullpage/_source/core/skins.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/core/skins.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/core/skins.js	(revision 4631)
@@ -21,5 +21,5 @@
 	var paths = {};
 
-	var loadedPart = function( skinName, part, callback )
+	var loadPart = function( skinName, part, callback )
 	{
 		// Get the skin definition.
@@ -34,4 +34,16 @@
 		};
 
+		function fixCSSTextRelativePath( cssStyleText, baseUrl )
+		{
+			return cssStyleText.replace( /url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,
+					function( match, opener, path, closer )
+					{
+						if ( /^\/|^\w?:/.test( path ) )
+							return match;
+						else
+							return 'url(' + baseUrl + opener +  path + closer + ')';
+					} );
+		}
+		
 		// Check if we need to preload images from it.
 		if ( !preloaded[ skinName ] )
@@ -44,5 +56,5 @@
 					{
 						preloaded[ skinName ] = 1;
-						loadedPart( skinName, part, callback );
+						loadPart( skinName, part, callback );
 					} );
 				return;
@@ -97,9 +109,22 @@
 			if ( !cssIsLoaded )
 			{
-				appendSkinPath( part.css );
-
-				for ( var c = 0 ; c < part.css.length ; c++ )
-					CKEDITOR.document.appendStyleSheet( part.css[ c ] );
-
+				var cssPart = part.css;
+
+				if ( CKEDITOR.tools.isArray( cssPart ) )
+				{
+					appendSkinPath( cssPart );
+					for ( var c = 0 ; c < cssPart.length ; c++ )
+						CKEDITOR.document.appendStyleSheet( cssPart[ c ] );
+				}
+				else
+				{
+					cssPart = fixCSSTextRelativePath(
+								cssPart, CKEDITOR.getUrl( paths[ skinName ] ) );
+					// Processing Inline CSS part.
+					CKEDITOR.document.appendStyleText( cssPart );
+				}
+
+				part.css = cssPart;
+				
 				cssIsLoaded = 1;
 			}
@@ -157,14 +182,5 @@
 
 			if ( loaded[ skinName ] )
-			{
-				loadedPart( skinName, skinPart, callback );
-
-				// Get the skin definition.
-				var skinDefinition = loaded[ skinName ];
-
-				// Trigger init function if any.
-				if ( skinDefinition.init )
-					skinDefinition.init( editor );
-			}
+				loadPart( skinName, skinPart, callback );
 			else
 			{
@@ -172,12 +188,12 @@
 				CKEDITOR.scriptLoader.load( skinPath + 'skin.js', function()
 						{
-							loadedPart( skinName, skinPart, callback );
-
 							// Get the skin definition.
-							var skinDefinition = loaded[ skinName ];
+							var skinDefinition = editor.skin = loaded[ skinName ];
 
 							// Trigger init function if any.
 							if ( skinDefinition.init )
 								skinDefinition.init( editor );
+
+							 loadPart( skinName, skinPart, callback );
 						});
 			}
Index: /CKEditor/branches/features/fullpage/_source/core/tools.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/core/tools.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/core/tools.js	(revision 4631)
@@ -99,4 +99,13 @@
 
 		/**
+		 * Turn the first letter of string to upper-case.
+		 * @param {String} str
+		 */
+		capitalize: function( str )
+		{
+			return str.charAt( 0 ).toUpperCase() + str.substring( 1 ).toLowerCase();
+		},
+
+		/**
 		 * Copy the properties from one object to another. By default, properties
 		 * already present in the target object <strong>are not</strong> overwritten.
@@ -230,4 +239,25 @@
 
 		/**
+		 * Build the HTML snippet of a set of <style>/<link>.
+		 * @param css {String|Array} Each of which are url (absolute) of a CSS file or
+		 * a trunk of style text.
+		 */
+		buildStyleHtml : function ( css )
+		{
+			css = [].concat( css );
+			var item, retval = [];
+			for ( var i = 0; i < css.length; i++ )
+			{
+				item = css[ i ];
+				// Is CSS style text ?
+				if ( /@import|[{}]/.test(item) )
+					retval.push('<style>' + item + '</style>');
+				else
+					retval.push('<link type="text/css" rel=stylesheet href="' + item + '">');
+			}
+			return retval.join( '' );
+		},
+
+		/**
 		 * Replace special HTML characters in a string with their relative HTML
 		 * entity values.
Index: /CKEditor/branches/features/fullpage/_source/plugins/colorbutton/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/colorbutton/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/colorbutton/plugin.js	(revision 4631)
@@ -32,5 +32,5 @@
 					panel :
 					{
-						css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ]
+						css : editor.skin.editor.css
 					},
 
Index: /CKEditor/branches/features/fullpage/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/dialog/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/dialog/plugin.js	(revision 4631)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -7,9 +7,4 @@
  * @fileOverview The floating dialog plugin.
  */
-
-CKEDITOR.plugins.add( 'dialog',
-	{
-		requires : [ 'dialogui' ]
-	});
 
 /**
@@ -73,7 +68,4 @@
 		return null;
 	}
-
-	// Stores dialog related data from skin definitions. e.g. margin sizes.
-	var skinData = {};
 
 	/**
@@ -90,9 +82,4 @@
 		// Load the dialog definition.
 		var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];
-		if ( !definition )
-		{
-			console.log( 'Error: The dialog "' + dialogName + '" is not defined.' );
-			return;
-		}
 
 		// Completes the definition with the default values.
@@ -1457,5 +1444,5 @@
 			editor = dialog.getParentEditor(),
 			magnetDistance = editor.config.dialog_magnetDistance,
-			margins = skinData[ editor.skinName ].margins || [ 0, 0, 0, 0 ];
+			margins = editor.skin.margins || [ 0, 0, 0, 0 ];
 
 		if ( typeof magnetDistance == 'undefined' )
@@ -1535,5 +1522,5 @@
 			minHeight = definition.minHeight || 0,
 			resizable = definition.resizable,
-			margins = skinData[ dialog.getParentEditor().skinName ].margins || [ 0, 0, 0, 0 ];
+			margins = dialog.getParentEditor().skin.margins || [ 0, 0, 0, 0 ];
 
 		function topSizer( coords, dy )
@@ -2692,15 +2679,4 @@
 		};
 	})();
-
-	// Grab the margin data from skin definition and store it away.
-	CKEDITOR.skins.add = ( function()
-	{
-		var original = CKEDITOR.skins.add;
-		return function( skinName, skinDefinition )
-		{
-			skinData[ skinName ] = { margins : skinDefinition.margins };
-			return original.apply( this, arguments );
-		};
-	} )();
 })();
 
@@ -2756,4 +2732,9 @@
 			return null;
 		}
+	});
+
+CKEDITOR.plugins.add( 'dialog',
+	{
+		requires : [ 'dialogui' ]
 	});
 
Index: /CKEditor/branches/features/fullpage/_source/plugins/font/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/font/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/font/plugin.js	(revision 4631)
@@ -37,5 +37,5 @@
 				panel :
 				{
-					css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ].concat( config.contentsCss ),
+					css : editor.skin.editor.css.concat( config.contentsCss ),
 					voiceLabel : lang.panelVoiceLabel
 				},
Index: /CKEditor/branches/features/fullpage/_source/plugins/format/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/format/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/format/plugin.js	(revision 4631)
@@ -34,5 +34,5 @@
 				panel :
 				{
-					css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ].concat( config.contentsCss ),
+					css : editor.skin.editor.css.concat( config.contentsCss ),
 					voiceLabel : lang.panelVoiceLabel
 				},
Index: /CKEditor/branches/features/fullpage/_source/plugins/menu/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/menu/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/menu/plugin.js	(revision 4631)
@@ -138,5 +138,5 @@
 					panel = this._.panel = new CKEDITOR.ui.floatPanel( this.editor, CKEDITOR.document.getBody(),
 						{
-							css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ],
+							css : editor.skin.editor.css,
 							level : this._.level - 1,
 							className : editor.skinClass + ' cke_contextmenu'
Index: /CKEditor/branches/features/fullpage/_source/plugins/panel/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/panel/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/panel/plugin.js	(revision 4631)
@@ -161,5 +161,5 @@
 						// after <body>, so it (body) becames immediatelly
 						// available. (#3031)
-						'<link type="text/css" rel=stylesheet href="' + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' +
+						CKEDITOR.tools.buildStyleHtml( this.css ) +
 					'<\/html>' );
 				doc.$.close();
Index: /CKEditor/branches/features/fullpage/_source/plugins/preview/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/preview/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/preview/plugin.js	(revision 4631)
@@ -44,7 +44,5 @@
 					baseTag +
 					'<title>' + editor.lang.preview + '</title>' +
-					'<link type="text/css" rel="stylesheet" href="' +
-					[].concat( editor.config.contentsCss ).join( '"><link type="text/css" rel="stylesheet" href="' ) +
-					'">' +
+					CKEDITOR.tools.buildStyleHtml( editor.config.contentsCss ) +
 					'</head>' + bodyHtml +
 					editor.getData() +
Index: /CKEditor/branches/features/fullpage/_source/plugins/stylescombo/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/stylescombo/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/stylescombo/plugin.js	(revision 4631)
@@ -27,5 +27,5 @@
 					panel :
 					{
-						css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ].concat( config.contentsCss ),
+						css : editor.skin.editor.css.concat( config.contentsCss ),
 						voiceLabel : lang.panelVoiceLabel
 					},
Index: /CKEditor/branches/features/fullpage/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/plugins/wysiwygarea/plugin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/plugins/wysiwygarea/plugin.js	(revision 4631)
@@ -588,10 +588,8 @@
 								// Build the additional stuff to be included into <head>.
 								var headExtra =
+									CKEDITOR.tools.buildStyleHtml( editor.config.contentsCss ) + 
 									'<style type="text/css" cke_temp="1">' +
 										editor._.styles.join( '\n' ) +
-									'</style>' +
-									'<link type="text/css" rel="stylesheet" href="' +
-									[].concat( editor.config.contentsCss ).join( '"><link type="text/css" rel="stylesheet" href="' ) +
-									'">';
+									'</style>';
 
 								var baseTag = config.baseHref ? '<base href="' + config.baseHref + '" cke_temp="1" />' : '';
Index: /CKEditor/branches/features/fullpage/_source/skins/kama/skin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/skins/kama/skin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/skins/kama/skin.js	(revision 4631)
@@ -204,5 +204,5 @@
 })() );
 
-if ( CKEDITOR.dialog )
+CKEDITOR.on( 'dialogPluginReady', function()
 {
 	CKEDITOR.dialog.on( 'resize', function( evt )
@@ -259,6 +259,6 @@
 				},
 				100 );
-		});
-}
+		} );
+} );
 
 /**
Index: /CKEditor/branches/features/fullpage/_source/skins/office2003/skin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/skins/office2003/skin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/skins/office2003/skin.js	(revision 4631)
@@ -24,5 +24,5 @@
 })() );
 
-if ( CKEDITOR.dialog )
+CKEDITOR.on( 'dialogPluginReady', function()
 {
 	CKEDITOR.dialog.on( 'resize', function( evt )
@@ -74,4 +74,4 @@
 			if ( evt.editor.lang.dir == 'rtl' )
 				setTimeout( fixSize, 1000 );
-		});
-}
+		} );
+} );
Index: /CKEditor/branches/features/fullpage/_source/skins/v2/skin.js
===================================================================
--- /CKEditor/branches/features/fullpage/_source/skins/v2/skin.js	(revision 4630)
+++ /CKEditor/branches/features/fullpage/_source/skins/v2/skin.js	(revision 4631)
@@ -24,5 +24,5 @@
 })() );
 
-if ( CKEDITOR.dialog )
+CKEDITOR.on( 'dialogPluginReady', function()
 {
 	CKEDITOR.dialog.on( 'resize', function( evt )
@@ -70,4 +70,4 @@
 				},
 				100 );
-		});
-}
+		} );
+} );
