JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / core / dom / walker.js
index 1bf0eab..ae9dfec 100644 (file)
@@ -261,7 +261,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                         */\r
                        previous : function()\r
                        {\r
-                               return iterate.call( this, true );\r
+                               return iterate.call( this, 1 );\r
                        },\r
 \r
                        /**\r
@@ -271,7 +271,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                         */\r
                        checkForward : function()\r
                        {\r
-                               return iterate.call( this, false, true ) !== false;\r
+                               return iterate.call( this, 0, 1 ) !== false;\r
                        },\r
 \r
                        /**\r
@@ -281,7 +281,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                         */\r
                        checkBackward : function()\r
                        {\r
-                               return iterate.call( this, true, true ) !== false;\r
+                               return iterate.call( this, 1, 1 ) !== false;\r
                        },\r
 \r
                        /**\r
@@ -303,7 +303,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                         */\r
                        lastBackward : function()\r
                        {\r
-                               return iterateToLast.call( this, true );\r
+                               return iterateToLast.call( this, 1 );\r
                        },\r
 \r
                        reset : function()\r
@@ -374,7 +374,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                {\r
                        return ( node && node.getName\r
                                        && node.getName() == 'span'\r
-                                       && node.hasAttribute('_cke_bookmark') );\r
+                                       && node.hasAttribute( '_cke_bookmark' ) );\r
                }\r
 \r
                return function( node )\r
@@ -385,7 +385,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                && isBookmarkNode( parent ) );\r
                        // Is bookmark node?\r
                        isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode( node );\r
-                       return isReject ^ isBookmark;\r
+                       return !! ( isReject ^ isBookmark );\r
                };\r
        };\r
 \r
@@ -399,7 +399,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                {\r
                        var isWhitespace = node && ( node.type == CKEDITOR.NODE_TEXT )\r
                                                        && !CKEDITOR.tools.trim( node.getText() );\r
-                       return isReject ^ isWhitespace;\r
+                       return !! ( isReject ^ isWhitespace );\r
                };\r
        };\r
 \r
@@ -418,20 +418,20 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        // 'offsetHeight' instead of 'offsetWidth' for properly excluding\r
                        // all sorts of empty paragraph, e.g. <br />.\r
                        var isInvisible = whitespace( node ) || node.is && !node.$.offsetHeight;\r
-                       return isReject ^ isInvisible;\r
+                       return !! ( isReject ^ isInvisible );\r
                };\r
        };\r
 \r
        var tailNbspRegex = /^[\t\r\n ]*(?:&nbsp;|\xa0)$/,\r
-               isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),\r
-               isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true ),\r
+               isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( 1 ),\r
+               isNotBookmark = CKEDITOR.dom.walker.bookmark( 0, 1 ),\r
                fillerEvaluator = function( element )\r
                {\r
                        return isNotBookmark( element ) && isNotWhitespaces( element );\r
                };\r
 \r
        // Check if there's a filler node at the end of an element, and return it.\r
-       CKEDITOR.dom.element.prototype.getBogus = function ()\r
+       CKEDITOR.dom.element.prototype.getBogus = function()\r
        {\r
                var tail = this.getLast( fillerEvaluator );\r
                if ( tail && ( !CKEDITOR.env.ie ? tail.is && tail.is( 'br' )\r