Changeset 6113


Ignore:
Timestamp:
11/24/10 10:43:30 (4 years ago)
Author:
garry.yao
Message:

#6297: isBlockBoundary now resolves float elements from their dtd.

Location:
CKEditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r6112 r6113  
    5858                <li><a href="http://dev.ckeditor.com/ticket/6640">#6640</a> : Floating panels are now being closed when switching modes.</li> 
    5959                <li><a href="http://dev.ckeditor.com/ticket/4790">#4790</a> : Remove list with multiple items in enterBr doesn't preserve line-breaks.</li> 
     60                <li><a href="http://dev.ckeditor.com/ticket/6297">#6297</a> : Floated inline elements are no anymore acting in behavior of blocks.</li> 
    6061        </ul> 
    6162        <h3> 
  • CKEditor/trunk/_source/core/dom/walker.js

    r6031 r6113  
    335335                'table-cell' : 1, 
    336336                'table-caption' : 1 
    337         }, 
    338         blockBoundaryNodeNameMatch = { hr : 1 }; 
     337        }; 
    339338 
    340339        CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) 
    341340        { 
    342                 var nodeNameMatches = CKEDITOR.tools.extend( {}, 
    343                                                                                                         blockBoundaryNodeNameMatch, customNodeNames || {} ); 
    344  
    345                 return blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] || 
    346                         nodeNameMatches[ this.getName() ]; 
     341                var nodeNameMatches = CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$block, customNodeNames || {} ); 
     342 
     343                // Don't consider floated formatting as block boundary, fall back to dtd check in that case. (#6297)   
     344                return this.getComputedStyle( 'float' ) == 'none' && blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] 
     345                                || nodeNameMatches[ this.getName() ]; 
    347346        }; 
    348347 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy