Skip to content
Permalink
Browse files

Merge branch 't/9662'

  • Loading branch information...
Reinmar committed Nov 20, 2012
2 parents 0e06bd1 + 89e9c80 commit 502aba705f9749c72bcae01ffb8e3ea2fa120adf
Showing with 9 additions and 9 deletions.
  1. +6 −6 core/dom/range.js
  2. +3 −3 core/dom/walker.js
@@ -2055,12 +2055,12 @@ CKEDITOR.dom.range = function( root ) {
return null;

var walker = new CKEDITOR.dom.walker( walkerRange ),
isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ),
isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
evaluator = function( node ) {
return isNotWhitespaces( node ) && isNotBookmarks( node );
};
walkerRange.evaluator = evaluator;
isNotBookmarks = CKEDITOR.dom.walker.bookmark( false, true ),
isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true );

walker.evaluator = function( node ) {
return isNotWhitespaces( node ) && isNotBookmarks( node );
};
var node = walker.next();
walker.reset();
return node && node.equals( walker.previous() ) ? node : null;
@@ -336,8 +336,8 @@
* Whether the to-be-evaluated node is a bookmark node OR bookmark node
* inner contents.
*
* @statick
* @param {Boolean} [contentOnly=false] Whether only test againt the text content of
* @static
* @param {Boolean} [contentOnly=false] Whether only test against the text content of
* bookmark node instead of the element itself (default).
* @param {Boolean} [isReject=false] Whether should return `false` for the bookmark
* node instead of `true` (default).
@@ -351,7 +351,7 @@
return function( node ) {
var isBookmark, parent;
// Is bookmark inner text node?
isBookmark = ( node && !node.getName && ( parent = node.getParent() ) && isBookmarkNode( parent ) );
isBookmark = ( node && node.type != CKEDITOR.NODE_ELEMENT && ( parent = node.getParent() ) && isBookmarkNode( parent ) );
// Is bookmark node?
isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode( node );
return !!( isReject ^ isBookmark );

0 comments on commit 502aba7

Please sign in to comment.
You can’t perform that action at this time.