+ },\r
+\r
+ // The automatic colorbox should represent the real color (#6010)\r
+ onOpen : function()\r
+ {\r
+ var selection = editor.getSelection(),\r
+ block = selection && selection.getStartElement(),\r
+ path = new CKEDITOR.dom.elementPath( block ),\r
+ color;\r
+\r
+ // Find the closest block element.\r
+ block = path.block || path.blockLimit || editor.document.getBody();\r
+\r
+ // The background color might be transparent. In that case, look up the color in the DOM tree.\r
+ do\r
+ {\r
+ color = block && block.getComputedStyle( type == 'back' ? 'background-color' : 'color' ) || 'transparent';\r
+ }\r
+ while ( type == 'back' && color == 'transparent' && block && ( block = block.getParent() ) );\r
+\r
+ // The box should never be transparent.\r
+ if ( !color || color == 'transparent' )\r
+ color = '#ffffff';\r
+\r
+ this._.panel._.iframe.getFrameDocument().getById( colorBoxId ).setStyle( 'background-color', color );\r