speed: committing a failing experiment of concat vs slice
[jquery.git] / src / selector.js
index a7d94c3..fb33246 100644 (file)
@@ -661,7 +661,7 @@ for ( var type in Expr.match ) {
 }
 
 var makeArray = function(array, results) {
-       array = Array.prototype.slice.call( array );
+       array = Array.prototype.slice.call( array, 0 );
 
        if ( results ) {
                results.push.apply( results, array );
@@ -674,7 +674,7 @@ var makeArray = function(array, results) {
 // Perform a simple check to determine if the browser is capable of
 // converting a NodeList to an array using builtin methods.
 try {
-       Array.prototype.slice.call( document.documentElement.childNodes );
+       Array.prototype.slice.call( document.documentElement.childNodes, 0 );
 
 // Provide a fallback method if it does not work
 } catch(e){
@@ -978,7 +978,7 @@ jQuery.expr[":"] = jQuery.expr.filters;
 
 Sizzle.selectors.filters.hidden = function(elem){
        var width = elem.offsetWidth, height = elem.offsetHeight,
-                force = /^tr$/i.test( elem.tagName ); // ticket #4512
+                force = /^tr$/i.test( elem.nodeName ); // ticket #4512
        return ( width === 0 && height === 0 && !force ) ?
                true :
                        ( width !== 0 && height !== 0 && !force ) ?