Ticket #8087: 8087.patch
File 8087.patch, 2.3 KB (added by , 13 years ago) |
---|
-
_source/core/dom/element.js
1599 1599 this.getComputedStyle( 'direction' ) 1600 1600 // Webkit: offline element returns empty direction (#8053). 1601 1601 || this.getDirection() 1602 || this.getDocument().$.dir1603 || this.getDocument().getBody().getDirection( 1 )1604 1602 : this.getStyle( 'direction' ) || this.getAttribute( 'dir' ); 1605 1603 }, 1606 1604 -
_source/plugins/list/plugin.js
107 107 108 108 if ( orgDir != rootNode.getDirection( 1 ) ) 109 109 currentListItem.setAttribute( 'dir', orgDir ); 110 else111 currentListItem.removeAttribute( 'dir' );112 110 113 111 for ( var i = 0 ; i < item.contents.length ; i++ ) 114 112 currentListItem.append( item.contents[i].clone( 1, 1 ) ); … … 155 153 { 156 154 if ( item.grandparent.getDirection( 1 ) != orgDir ) 157 155 currentListItem.setAttribute( 'dir', orgDir ); 158 else159 currentListItem.removeAttribute( 'dir' );160 156 } 161 157 162 158 for ( i = 0 ; i < item.contents.length ; i++ ) … … 208 204 break; 209 205 } 210 206 211 // Clear marker attributes for the new list tree made of cloned nodes, if any.212 207 if ( database ) 213 208 { 214 var currentNode = retval.getFirst(); 209 var currentNode = retval.getFirst(), 210 itemDir, 211 listRoot = listArray[ 0 ].parent; 212 215 213 while ( currentNode ) 216 214 { 217 215 if ( currentNode.type == CKEDITOR.NODE_ELEMENT ) 216 { 217 // Clear marker attributes for the new list tree made of cloned nodes, if any. 218 218 CKEDITOR.dom.element.clearMarkers( database, currentNode ); 219 220 // Clear redundant direction attribute. 221 if ( currentNode.is( 'li' ) && ( itemDir = currentNode.getDirection() ) ) 222 { 223 var listNode = currentNode.getParent(); 224 if ( itemDir == ( listNode && listNode.getDirection( 1 ) || listRoot.getDirection( 1 ) ) ) 225 currentNode.removeAttribute( 'dir' ); 226 } 227 } 228 219 229 currentNode = currentNode.getNextSourceNode(); 220 230 } 221 231 }