/*\r
-Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
* @type Object\r
* @example\r
*/\r
- this.attributes = attributes || ( attributes = {} );\r
+ this.attributes = attributes || {};\r
\r
/**\r
* The nodes that are direct children of this element.\r
*/\r
this.children = [];\r
\r
- var tagName = attributes[ 'data-cke-real-element-type' ] || name || '';\r
+ // Reveal the real semantic of our internal custom tag name (#6639),\r
+ // when resolving whether it's block like.\r
+ var realName = name || '',\r
+ prefixed = realName.match( /^cke:(.*)/ );\r
+ prefixed && ( realName = prefixed[ 1 ] );\r
\r
- // Reveal the real semantic of our internal custom tag name (#6639).\r
- var internalTag = tagName.match( /^cke:(.*)/ );\r
- internalTag && ( tagName = internalTag[ 1 ] );\r
+ var isBlockLike = !!( CKEDITOR.dtd.$nonBodyContent[ realName ]\r
+ || CKEDITOR.dtd.$block[ realName ]\r
+ || CKEDITOR.dtd.$listItem[ realName ]\r
+ || CKEDITOR.dtd.$tableContent[ realName ]\r
+ || CKEDITOR.dtd.$nonEditable[ realName ]\r
+ || realName == 'br' );\r
\r
- var dtd = CKEDITOR.dtd,\r
- isBlockLike = !!( dtd.$nonBodyContent[ tagName ]\r
- || dtd.$block[ tagName ]\r
- || dtd.$listItem[ tagName ]\r
- || dtd.$tableContent[ tagName ]\r
- || dtd.$nonEditable[ tagName ]\r
- || tagName == 'br' ),\r
- isEmpty = !!dtd.$empty[ name ];\r
-\r
- this.isEmpty = isEmpty;\r
- this.isUnknown = !dtd[ name ];\r
+ this.isEmpty = !!CKEDITOR.dtd.$empty[ name ];\r
+ this.isUnknown = !CKEDITOR.dtd[ name ];\r
\r
/** @private */\r
this._ =\r
{\r
isBlockLike : isBlockLike,\r
- hasInlineStarted : isEmpty || !isBlockLike\r
+ hasInlineStarted : this.isEmpty || !isBlockLike\r
};\r
};\r
\r