Ticket #2797: 2797.patch
File 2797.patch, 2.6 KB (added by , 16 years ago) |
---|
-
_source/core/dom/domwalker.js
219 219 { 220 220 return CKEDITOR.dom.domWalker.blockBoundary( { br : 1 } ); 221 221 }; 222 223 CKEDITOR.dom.domWalker.inlineElements = function( evt ) 224 { 225 if ( evt.data.type != 'up' ) 226 { 227 this.stop(); 228 evt.stop(); 229 return; 230 } 231 232 var to = evt.data.to; 233 if ( to.getComputedStyle( 'display' ) != 'inline' ) 234 { 235 this.stop(); 236 evt.stop(); 237 return; 238 } 239 } 222 240 })(); -
_source/core/dom/range.js
968 968 969 969 case CKEDITOR.ENLARGE_BLOCK_CONTENTS: 970 970 case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS: 971 case CKEDITOR.ENLARGE_INLINE_ELEMENTS: 971 972 // DFS backward to get the block/list item boundary at or before the start. 972 973 var boundaryNodes = getBoundaryNodes.apply( this ), 973 974 startNode = boundaryNodes.startNode, 974 975 endNode = boundaryNodes.endNode, 975 guardFunction = ( unit == CKEDITOR.ENLARGE_BLOCK_CONTENTS ? 976 CKEDITOR.dom.domWalker.blockBoundary() : 977 CKEDITOR.dom.domWalker.listItemBoundary() ), 978 walker = new CKEDITOR.dom.domWalker( startNode ), 976 guardFunction; 977 978 if ( unit == CKEDITOR.ENLARGE_BLOCK_CONTENTS ) 979 guardFunction = CKEDITOR.dom.domWalker.blockBoundary(); 980 else if ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) 981 guardFunction = CKEDITOR.dom.domWalker.listItemBoundary(); 982 else 983 guardFunction = CKEDITOR.dom.domWalker.inlineElements; 984 985 var walker = new CKEDITOR.dom.domWalker( startNode ), 979 986 data = walker.reverse( guardFunction ), 980 987 boundaryEvent = data.events.shift(); 981 988 … … 1304 1311 CKEDITOR.ENLARGE_ELEMENT = 1; 1305 1312 CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2; 1306 1313 CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3; 1314 CKEDITOR.ENLARGE_INLINE_ELEMENTS = 4; -
_source/plugins/styles/plugin.js
223 223 var bookmark = range.createBookmark(); 224 224 225 225 // Expand the range. 226 range.enlarge( CKEDITOR.ENLARGE_ ELEMENT);226 range.enlarge( CKEDITOR.ENLARGE_INLINE_ELEMENTS ); 227 227 range.trim(); 228 228 229 229 // Get the first node to be processed and the last, which concludes the