Commit 46d0a5cf authored by Rick Waldron's avatar Rick Waldron

Merge pull request #738 from rwldrn/fix-mangled-indents

Fix mangled indents
parents aabc0d85 6e0b3e8e
...@@ -314,8 +314,8 @@ jQuery.fn.extend({ ...@@ -314,8 +314,8 @@ jQuery.fn.extend({
if ( this[0] ) { if ( this[0] ) {
results = jQuery.buildFragment( args, this, scripts ); results = jQuery.buildFragment( args, this, scripts );
fragment = results.fragment; fragment = results.fragment;
first = fragment.firstChild;
first = fragment.firstChild;
if ( fragment.childNodes.length === 1 ) { if ( fragment.childNodes.length === 1 ) {
fragment = first; fragment = first;
} }
...@@ -499,16 +499,17 @@ jQuery.buildFragment = function( args, context, scripts ) { ...@@ -499,16 +499,17 @@ jQuery.buildFragment = function( args, context, scripts ) {
cacheable = true; cacheable = true;
fragment = jQuery.fragments[ first ]; fragment = jQuery.fragments[ first ];
cachehit = fragment !== undefined; cachehit = fragment !== undefined;
} }
if ( !fragment ) { if ( !fragment ) {
fragment = context.createDocumentFragment(); fragment = context.createDocumentFragment();
jQuery.clean( args, context, fragment, scripts ); jQuery.clean( args, context, fragment, scripts );
if ( cacheable ) {
// Update the cache, but only store false // Update the cache, but only store false
// unless this is a second parsing of the same content // unless this is a second parsing of the same content
if ( cacheable ) {
jQuery.fragments[ first ] = cachehit && fragment; jQuery.fragments[ first ] = cachehit && fragment;
} }
} }
return { fragment: fragment, cacheable: cacheable }; return { fragment: fragment, cacheable: cacheable };
...@@ -531,7 +532,6 @@ jQuery.each({ ...@@ -531,7 +532,6 @@ jQuery.each({
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] ); insert[ original ]( this[0] );
return this; return this;
} else { } else {
for ( var i = 0, l = insert.length; i < l; i++ ) { 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();
...@@ -630,7 +630,7 @@ jQuery.extend({ ...@@ -630,7 +630,7 @@ jQuery.extend({
clean: function( elems, context, fragment, scripts ) { clean: function( elems, context, fragment, scripts ) {
var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
i = 0, i = 0,
ret = []; ret = [];
// Ensure that context is a document // Ensure that context is a document
if ( !context || typeof context.createDocumentFragment === "undefined" ) { if ( !context || typeof context.createDocumentFragment === "undefined" ) {
...@@ -699,33 +699,33 @@ jQuery.extend({ ...@@ -699,33 +699,33 @@ jQuery.extend({
// Remember the top-level container for proper cleanup // Remember the top-level container for proper cleanup
div = safe.lastChild; div = safe.lastChild;
} }
} }
if ( elem.nodeType ) { if ( elem.nodeType ) {
ret.push( elem ); ret.push( elem );
} else { } else {
ret = jQuery.merge( ret, elem ); ret = jQuery.merge( ret, elem );
} }
} }
// Fix #11356: Clear elements from safeFragment // Fix #11356: Clear elements from safeFragment
if ( div ) { if ( div ) {
safe.removeChild( div ); safe.removeChild( div );
div = safe = null; div = safe = null;
} }
// Reset defaultChecked for any radios and checkboxes // Reset defaultChecked for any radios and checkboxes
// about to be appended to the DOM in IE 6/7 (#8060) // about to be appended to the DOM in IE 6/7 (#8060)
if ( !jQuery.support.appendChecked ) { if ( !jQuery.support.appendChecked ) {
for ( i = 0; (elem = ret[i]) != null; i++ ) { for ( i = 0; (elem = ret[i]) != null; i++ ) {
if ( jQuery.nodeName( elem, "input" ) ) { if ( jQuery.nodeName( elem, "input" ) ) {
fixDefaultChecked( elem ); fixDefaultChecked( elem );
} else if ( typeof elem.getElementsByTagName !== "undefined" ) { } else if ( typeof elem.getElementsByTagName !== "undefined" ) {
jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
}
} }
} }
}
// Append elements to a provided document fragment // Append elements to a provided document fragment
if ( fragment ) { if ( fragment ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment