IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
351 | 351 | { |
352 | 352 | var skipBogus = false, |
353 | 353 | bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true ), |
354 | | nbspRegExp = /^[\t\r\n ]*(?: |\xa0)$/; |
| 354 | isBogus = CKEDITOR.dom.walker.bogus(); |
355 | 355 | |
356 | 356 | return function( node ) |
357 | 357 | { |
… |
… |
|
359 | 359 | if ( bookmarkEvaluator( node ) ) |
360 | 360 | return true; |
361 | 361 | |
362 | | if ( node.type == CKEDITOR.NODE_TEXT ) |
| 362 | // Skip the bogus node at the end of block. |
| 363 | if ( isBogus( node ) && |
| 364 | !skipBogus ) |
363 | 365 | { |
364 | | // Skip the block filler NBSP. |
365 | | if ( CKEDITOR.env.ie && |
366 | | nbspRegExp.test( node.getText() ) && |
367 | | !skipBogus && |
368 | | !( isStart && node.getNext() ) ) |
369 | | { |
370 | | skipBogus = true; |
371 | | } |
372 | | // If there's any visible text, then we're not at the start. |
373 | | else if ( node.hasAscendant( 'pre' ) || CKEDITOR.tools.trim( node.getText() ).length ) |
374 | | return false; |
375 | | } |
376 | | else if ( node.type == CKEDITOR.NODE_ELEMENT ) |
377 | | { |
378 | | // If there are non-empty inline elements (e.g. <img />), then we're not |
379 | | // at the start. |
380 | | if ( !inlineChildReqElements[ node.getName() ] ) |
381 | | { |
382 | | // Skip the padding block br. |
383 | | if ( !CKEDITOR.env.ie && |
384 | | node.is( 'br' ) && |
385 | | !skipBogus && |
386 | | !( isStart && node.getNext() ) ) |
387 | | { |
388 | | skipBogus = true; |
389 | | } |
390 | | else |
391 | | return false; |
392 | | } |
393 | | } |
| 366 | skipBogus = true; |
| 367 | return true; |
| 368 | } |
| 369 | |
| 370 | // If there's any visible text, then we're not at the start. |
| 371 | if ( node.type == CKEDITOR.NODE_TEXT && |
| 372 | ( node.hasAscendant( 'pre' ) || |
| 373 | CKEDITOR.tools.trim( node.getText() ).length ) ) |
| 374 | return false; |
| 375 | |
| 376 | // If there are non-empty inline elements (e.g. <img />), then we're not |
| 377 | // at the start. |
| 378 | if ( node.type == CKEDITOR.NODE_ELEMENT && !inlineChildReqElements[ node.getName() ] ) |
| 379 | return false; |
| 380 | |
394 | 381 | return true; |
395 | 382 | }; |
396 | 383 | } |
… |
… |
|
415 | 402 | } |
416 | 403 | |
417 | 404 | var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(), |
418 | | bookmarkEval = new CKEDITOR.dom.walker.bookmark(); |
| 405 | bookmarkEval = new CKEDITOR.dom.walker.bookmark(), |
| 406 | nbspRegExp = /^[\t\r\n ]*(?: |\xa0)$/; |
419 | 407 | |
420 | 408 | function nonWhitespaceOrBookmarkEval( node ) |
421 | 409 | { |
… |
… |
|
1834 | 1822 | var startContainer = this.startContainer, |
1835 | 1823 | startOffset = this.startOffset; |
1836 | 1824 | |
1837 | | // If the starting node is a text node, and non-empty before the offset, |
1838 | | // then we're surely not at the start of block. |
1839 | | if ( startOffset && startContainer.type == CKEDITOR.NODE_TEXT ) |
| 1825 | // [IE] Special handling for range start in text with a leading NBSP, |
| 1826 | // we it to be isolated, for bogus check. |
| 1827 | if ( CKEDITOR.env.ie && startOffset && startContainer.type == CKEDITOR.NODE_TEXT ) |
1840 | 1828 | { |
1841 | 1829 | var textBefore = CKEDITOR.tools.ltrim( startContainer.substring( 0, startOffset ) ); |
1842 | | if ( textBefore.length ) |
1843 | | return false; |
| 1830 | if ( nbspRegExp.test( textBefore ) ) |
| 1831 | this.trim( 0, 1 ); |
1844 | 1832 | } |
1845 | 1833 | |
1846 | 1834 | // We need to grab the block element holding the start boundary, so |
… |
… |
|
1863 | 1851 | var endContainer = this.endContainer, |
1864 | 1852 | endOffset = this.endOffset; |
1865 | 1853 | |
1866 | | // If the ending node is a text node, and non-empty after the offset, |
1867 | | // then we're surely not at the end of block. |
1868 | | if ( endContainer.type == CKEDITOR.NODE_TEXT ) |
| 1854 | // [IE] Special handling for range end in text with a following NBSP, |
| 1855 | // we it to be isolated, for bogus check. |
| 1856 | if ( CKEDITOR.env.ie && endContainer.type == CKEDITOR.NODE_TEXT ) |
1869 | 1857 | { |
1870 | 1858 | var textAfter = CKEDITOR.tools.rtrim( endContainer.substring( endOffset ) ); |
1871 | | if ( textAfter.length ) |
1872 | | return false; |
| 1859 | if ( nbspRegExp.test( textAfter ) ) |
| 1860 | this.trim( 1, 0 ); |
1873 | 1861 | } |
1874 | 1862 | |
1875 | 1863 | // We need to grab the block element holding the start boundary, so |
… |
… |
|
1939 | 1927 | */ |
1940 | 1928 | moveToElementEditablePosition : function( el, isMoveToEnd ) |
1941 | 1929 | { |
1942 | | var nbspRegExp = /^[\t\r\n ]*(?: |\xa0)$/; |
1943 | | |
1944 | 1930 | function nextDFS( node, childOnly ) |
1945 | 1931 | { |
1946 | 1932 | var next; |