Skip to content
Permalink
Browse files

Merge pull request #565 from rwldrn/10601

Cleanup spacing. Fixes #10601
  • Loading branch information...
dmethvin committed Oct 27, 2011
2 parents c82dbf1 + 27d099d commit 736d4d770633720493afe1fefd6f135095c5b5f7
Showing with 50 additions and 50 deletions.
  1. +1 −1 src/ajax.js
  2. +8 −8 src/attributes.js
  3. +7 −7 src/core.js
  4. +2 −2 src/css.js
  5. +4 −4 src/effects.js
  6. +9 −9 src/event.js
  7. +4 −4 src/manipulation.js
  8. +5 −5 src/offset.js
  9. +1 −1 src/outro.js
  10. +2 −2 src/queue.js
  11. +5 −5 src/support.js
  12. +2 −2 src/traversing.js
@@ -681,7 +681,7 @@ jQuery.extend({
ret = s.url.replace( rts, "$1_=" + ts );

// if nothing was replaced, add timestamp to the end
s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
}
}

@@ -83,7 +83,7 @@ jQuery.fn.extend({
}

if ( (value && typeof value === "string") || value === undefined ) {
classNames = (value || "").split( rspace );
classNames = ( value || "" ).split( rspace );

for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
@@ -320,7 +320,7 @@ jQuery.extend({
// Grab necessary hook if one is defined
if ( notxml ) {
name = name.toLowerCase();
hooks = jQuery.attrHooks[ name ] || (rboolean.test( name ) ? boolHook : nodeHook);
hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
}

if ( value !== undefined ) {
@@ -356,7 +356,7 @@ jQuery.extend({
i = 0;

if ( elem.nodeType === 1 ) {
attrNames = (value || "").split( rspace );
attrNames = ( value || "" ).split( rspace );
l = attrNames.length;

for ( ; i < l; i++ ) {
@@ -452,7 +452,7 @@ jQuery.extend({
return ret;

} else {
return (elem[ name ] = value);
return ( elem[ name ] = value );
}

} else {
@@ -530,7 +530,7 @@ if ( !getSetAttribute ) {
get: function( elem, name ) {
var ret;
ret = elem.getAttributeNode( name );
return ret && (fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified) ?
return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
ret.nodeValue :
undefined;
},
@@ -541,7 +541,7 @@ if ( !getSetAttribute ) {
ret = document.createAttribute( name );
elem.setAttributeNode( ret );
}
return (ret.nodeValue = value + "");
return ( ret.nodeValue = value + "" );
}
};

@@ -595,7 +595,7 @@ if ( !jQuery.support.style ) {
return elem.style.cssText.toLowerCase() || undefined;
},
set: function( elem, value ) {
return (elem.style.cssText = "" + value);
return ( elem.style.cssText = "" + value );
}
};
}
@@ -640,7 +640,7 @@ jQuery.each([ "radio", "checkbox" ], function() {
jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
set: function( elem, value ) {
if ( jQuery.isArray( value ) ) {
return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
}
}
});
@@ -119,7 +119,7 @@ jQuery.fn = jQuery.prototype = {
// HANDLE: $(html) -> $(array)
if ( match[1] ) {
context = context instanceof jQuery ? context[0] : context;
doc = (context ? context.ownerDocument || context : document);
doc = ( context ? context.ownerDocument || context : document );

// If a single string is passed in and it's a single tag
// just do a createElement and skip the rest
@@ -136,7 +136,7 @@ jQuery.fn = jQuery.prototype = {

} else {
ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
}

return jQuery.merge( this, selector );
@@ -166,7 +166,7 @@ jQuery.fn = jQuery.prototype = {

// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
return (context || rootjQuery).find( selector );
return ( context || rootjQuery ).find( selector );

// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
@@ -180,7 +180,7 @@ jQuery.fn = jQuery.prototype = {
return rootjQuery.ready( selector );
}

if (selector.selector !== undefined) {
if ( selector.selector !== undefined ) {
this.selector = selector.selector;
this.context = selector.context;
}
@@ -237,7 +237,7 @@ jQuery.fn = jQuery.prototype = {
ret.context = this.context;

if ( name === "find" ) {
ret.selector = this.selector + (this.selector ? " " : "") + selector;
ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
} else if ( name ) {
ret.selector = this.selector + "." + name + "(" + selector + ")";
}
@@ -552,7 +552,7 @@ jQuery.extend({
.replace( rvalidtokens, "]" )
.replace( rvalidbraces, "")) ) {

return (new Function( "return " + data ))();
return ( new Function( "return " + data ) )();

}
jQuery.error( "Invalid JSON: " + data );
@@ -833,7 +833,7 @@ jQuery.extend({
},

now: function() {
return (new Date()).getTime();
return ( new Date() ).getTime();
},

// Use of jQuery.browser is frowned upon.
@@ -307,7 +307,7 @@ if ( document.documentElement.currentStyle ) {
if ( rsLeft ) {
elem.runtimeStyle.left = elem.currentStyle.left;
}
style.left = name === "fontSize" ? "1em" : (ret || 0);
style.left = name === "fontSize" ? "1em" : ( ret || 0 );
ret = style.pixelLeft + "px";

// Revert the changed values
@@ -375,7 +375,7 @@ if ( jQuery.expr && jQuery.expr.filters ) {
var width = elem.offsetWidth,
height = elem.offsetHeight;

return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
};

jQuery.expr.filters.visible = function( elem ) {
@@ -203,7 +203,7 @@ jQuery.fn.extend({

// Tracks whether to show or hide based on private
// data attached to the element
method = jQuery._data( this, "toggle" + p ) || (val === "toggle" ? hidden ? "show" : "hide" : 0);
method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
if ( method ) {
jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
e[ method ]();
@@ -222,7 +222,7 @@ jQuery.fn.extend({
// We need to compute starting value
if ( unit !== "px" ) {
jQuery.style( this, p, (end || 1) + unit);
start = ((end || 1) / e.cur()) * start;
start = ( (end || 1) / e.cur() ) * start;
jQuery.style( this, p, start + unit);
}

@@ -385,7 +385,7 @@ jQuery.extend({
return firstNum + diff * p;
},
swing: function( p, n, firstNum, diff ) {
return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
}
},

@@ -408,7 +408,7 @@ jQuery.fx.prototype = {
this.options.step.call( this.elem, this.now, this );
}

(jQuery.fx.step[ this.prop ] || jQuery.fx.step._default)( this );
( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
},

// Get the current size
@@ -81,7 +81,7 @@ jQuery.event = {

tns = rtypenamespace.exec( types[t] ) || [];
type = tns[1];
namespaces = (tns[2] || "").split( "." ).sort();
namespaces = ( tns[2] || "" ).split( "." ).sort();

// If event changes its type, use the special event handlers for the changed type
special = jQuery.event.special[ type ] || {};
@@ -166,7 +166,7 @@ jQuery.event = {
}

// Once for each type.namespace in types; type may be omitted
types = (types || "").replace( rhoverHack, "mouseover$1 mouseout$1" ).split(" ");
types = ( types || "" ).replace( rhoverHack, "mouseover$1 mouseout$1" ).split(" ");
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
type = tns[1];
@@ -347,7 +347,7 @@ jQuery.event = {
cur = eventPath[i][0];
event.type = eventPath[i][1];

handle = (jQuery._data( cur, "events" ) || {})[ event.type ] && jQuery._data( cur, "handle" );
handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
if ( handle ) {
handle.apply( cur, data );
}
@@ -401,7 +401,7 @@ jQuery.event = {
// Make a writable jQuery.Event from the native event object
event = jQuery.event.fix( event || window.event );

var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []),
var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
delegateCount = handlers.delegateCount,
args = [].slice.call( arguments, 0 ),
run_all = !event.exclusive && !event.namespace,
@@ -509,8 +509,8 @@ jQuery.event = {
doc = eventDoc.documentElement;
body = eventDoc.body;

event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
}

// Add relatedTarget, if necessary
@@ -932,9 +932,9 @@ jQuery.fn.extend({
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
var handleObj = types.handleObj;
jQuery( types.delegateTarget ).off(
handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
handleObj.selector,
jQuery( types.delegateTarget ).off(
handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
handleObj.selector,
handleObj.handler
);
return this;
@@ -346,7 +346,7 @@ jQuery.fn.extend({
// in certain situations (Bug #8070).
// Fragments from the fragment cache must always be cloned and never used
// in place.
results.cacheable || (l > 1 && i < lastIndex) ?
results.cacheable || ( l > 1 && i < lastIndex ) ?
jQuery.clone( fragment, true, true ) :
fragment
);
@@ -523,7 +523,7 @@ jQuery.each({

} else {
for ( var i = 0, l = insert.length; i < l; i++ ) {
var elems = (i > 0 ? this.clone(true) : this).get();
var elems = ( i > 0 ? this.clone(true) : this ).get();
jQuery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
@@ -553,7 +553,7 @@ function fixDefaultChecked( elem ) {
}
// Finds all inputs and passes them to fixDefaultChecked
function findInputs( elem ) {
var nodeName = (elem.nodeName || "").toLowerCase();
var nodeName = ( elem.nodeName || "" ).toLowerCase();
if ( nodeName === "input" ) {
fixDefaultChecked( elem );
// Skip scripts, get other children
@@ -645,7 +645,7 @@ jQuery.extend({
elem = elem.replace(rxhtmlTag, "<$1></$2>");

// Trim whitespace, otherwise indexOf won't work as expected
var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
wrap = wrapMap[ tag ] || wrapMap._default,
depth = wrap[0],
div = context.createElement("div");
@@ -154,7 +154,7 @@ jQuery.extend( jQuery.offset, {
curOffset = curElem.offset(),
curCSSTop = jQuery.css( elem, "top" ),
curCSSLeft = jQuery.css( elem, "left" ),
calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
props = {}, curPosition = {}, curTop, curLeft;

// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
@@ -171,11 +171,11 @@ jQuery.extend( jQuery.offset, {
options = options.call( elem, i, curOffset );
}

if (options.top != null) {
props.top = (options.top - curOffset.top) + curTop;
if ( options.top != null ) {
props.top = ( options.top - curOffset.top ) + curTop;
}
if (options.left != null) {
props.left = (options.left - curOffset.left) + curLeft;
if ( options.left != null ) {
props.left = ( options.left - curOffset.left ) + curLeft;
}

if ( "using" in options ) {
@@ -1,3 +1,3 @@
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
})(window);
})( window );
@@ -24,7 +24,7 @@ jQuery.extend({

_mark: function( elem, type ) {
if ( elem ) {
type = (type || "fx") + "mark";
type = ( type || "fx" ) + "mark";
jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
}
},
@@ -51,7 +51,7 @@ jQuery.extend({
queue: function( elem, type, data ) {
var q;
if ( elem ) {
type = (type || "fx") + "queue";
type = ( type || "fx" ) + "queue";
q = jQuery._data( elem, type );

// Speed up dequeue by getting out quickly if this is just a lookup
@@ -279,22 +279,22 @@ jQuery.support = (function() {
td = outer.nextSibling.firstChild.firstChild;

supports = {
doesNotAddBorder: (inner.offsetTop !== 5),
doesAddBorderForTableAndCells: (td.offsetTop === 5)
doesNotAddBorder: ( inner.offsetTop !== 5 ),
doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
};

inner.style.position = "fixed";
inner.style.top = "20px";

// safari subtracts parent border width here which is 5px
supports.supportsFixedPosition = (inner.offsetTop === 20 || inner.offsetTop === 15);
supports.supportsFixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
inner.style.position = inner.style.top = "";

outer.style.overflow = "hidden";
outer.style.position = "relative";

supports.subtractsBorderForOverflowNotVisible = (inner.offsetTop === -5);
supports.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
supports.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
supports.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== bodyMarginTop );

return supports;

@@ -306,7 +306,7 @@ function winnow( elements, qualifier, keep ) {

} else if ( qualifier.nodeType ) {
return jQuery.grep(elements, function( elem, i ) {
return (elem === qualifier) === keep;
return ( elem === qualifier ) === keep;
});

} else if ( typeof qualifier === "string" ) {
@@ -322,7 +322,7 @@ function winnow( elements, qualifier, keep ) {
}

return jQuery.grep(elements, function( elem, i ) {
return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
});
}

0 comments on commit 736d4d7

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