X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Fdom%2Felement.js;h=18c56e619886daf25120a4e3f5126200b4e1b110;hp=0243dea37764845c1b25ab6406f1d9de884f4869;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_source/core/dom/element.js b/_source/core/dom/element.js index 0243dea..18c56e6 100644 --- a/_source/core/dom/element.js +++ b/_source/core/dom/element.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -452,7 +452,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, } case 'hspace': - return this.$.hspace; + case 'value': + return this.$[ name ]; case 'style': // IE does not return inline styles via getAttribute(). See #2947. @@ -920,6 +921,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, } }, + /** + * @param {Boolean} [inlineOnly=true] Allow only inline elements to be merged. + */ mergeSiblings : ( function() { function mergeElements( element, sibling, isNext ) @@ -959,11 +963,14 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, } } - return function() + return function( inlineOnly ) { - // Merge empty links and anchors also. (#5567) - if ( !( CKEDITOR.dtd.$removeEmpty[ this.getName() ] || this.is( 'a' ) ) ) + if ( ! ( inlineOnly === false + || CKEDITOR.dtd.$removeEmpty[ this.getName() ] + || this.is( 'a' ) ) ) // Merge empty links and anchors also. (#5567) + { return; + } mergeElements( this, this.getNext(), true ); mergeElements( this, this.getPrevious() ); @@ -1560,6 +1567,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, this.removeAttribute( name ); else this.setAttribute( name, value ); + + return null; } });