Showing with 1,505 additions and 1,403 deletions.
  1. +75 −26 build/r.js
  2. +11 −0 build/tasks/build.js
  3. +33 −32 src/ajax/parseJSON.js
  4. +25 −23 src/ajax/parseXML.js
  5. +3 −2 src/attributes.js
  6. +3 −2 src/attributes/attr.js
  7. +3 −2 src/attributes/prop.js
  8. +13 −69 src/core.js
  9. +60 −0 src/core/access.js
  10. +32 −31 src/core/parseHTML.js
  11. +242 −233 src/css.js
  12. +18 −17 src/css/swap.js
  13. +0 −1 src/data.js
  14. +2 −0 src/deprecated.js
  15. +4 −2 src/dimensions.js
  16. +237 −234 src/effects.js
  17. +7 −5 src/effects/animatedSelector.js
  18. +14 −12 src/event.js
  19. +534 −526 src/manipulation.js
  20. +13 −11 src/manipulation/_evalUrl.js
  21. +49 −51 src/offset.js
  22. +53 −53 src/serialize.js
  23. +72 −71 src/traversing.js
  24. +1 −0 src/var/class2type.js
  25. +1 −0 src/wrap.js
@@ -1,5 +1,5 @@
/**
* @license r.js 2.1.8+ Tue, 13 Aug 2013 02:54:07 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* @license r.js 2.1.8+ Fri, 30 Aug 2013 03:19:39 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
@@ -20,7 +20,7 @@ var requirejs, require, define, xpcUtil;
(function (console, args, readFileFunc) {
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
version = '2.1.8+ Tue, 13 Aug 2013 02:54:07 GMT',
version = '2.1.8+ Fri, 30 Aug 2013 03:19:39 GMT',
jsSuffixRegExp = /\.js$/,
commandOption = '',
useLibLoaded = {},
@@ -2663,8 +2663,8 @@ define('lang', function () {
_mixin: function(dest, source, override){
var name;
for (name in source) {
if(source.hasOwnProperty(name)
&& (override || !dest.hasOwnProperty(name))) {
if(source.hasOwnProperty(name) &&
(override || !dest.hasOwnProperty(name))) {
dest[name] = source[name];
}
}
@@ -2692,6 +2692,42 @@ define('lang', function () {
return dest; // Object
},


/**
* Does a type of deep copy. Do not give it anything fancy, best
* for basic object copies of objects that also work well as
* JSON-serialized things, or has properties pointing to functions.
* For non-array/object values, just returns the same object.
* @param {Object} obj copy properties from this object
* @param {Object} [result] optional result object to use
* @return {Object}
*/
deeplikeCopy: function (obj) {
var type, result;

if (lang.isArray(obj)) {
result = [];
obj.forEach(function(value) {
result.push(lang.deeplikeCopy(value));
});
return result;
}

type = typeof obj;
if (obj === null || obj === undefined || type === 'boolean' ||
type === 'string' || type === 'number' || lang.isFunction(obj) ||
lang.isRegExp(obj)) {
return obj;
}

//Anything else is an object, hopefully.
result = {};
lang.eachProp(obj, function(value, key) {
result[key] = lang.deeplikeCopy(value);
});
return result;
},

delegate: (function () {
// boodman/crockford delegation w/ cornford optimization
function TMP() {}
@@ -24119,6 +24155,8 @@ define('build', function (require) {
if (config.optimizeCss && config.optimizeCss !== "none" && config.dir) {
buildFileContents += optimize.css(config.dir, config);
}
}).then(function() {
baseConfig = lang.deeplikeCopy(require.s.contexts._.config);
}).then(function () {
var actions = [];

@@ -24127,10 +24165,10 @@ define('build', function (require) {
return function () {
//Save off buildPath to module index in a hash for quicker
//lookup later.
config._buildPathToModuleIndex[module._buildPath] = i;
config._buildPathToModuleIndex[file.normalize(module._buildPath)] = i;

//Call require to calculate dependencies.
return build.traceDependencies(module, config)
return build.traceDependencies(module, config, baseConfig)
.then(function (layer) {
module.layer = layer;
});
@@ -24158,7 +24196,7 @@ define('build', function (require) {
if (found) {
module.excludeLayers[i] = found;
} else {
return build.traceDependencies({name: exclude}, config)
return build.traceDependencies({name: exclude}, config, baseConfig)
.then(function (layer) {
module.excludeLayers[i] = { layer: layer };
});
@@ -24241,9 +24279,16 @@ define('build', function (require) {
//Be sure not to remove other build layers.
if (config.removeCombined) {
module.layer.buildFilePaths.forEach(function (path) {
if (file.exists(path) && !modules.some(function (mod) {
var isLayer = modules.some(function (mod) {
return mod._buildPath === path;
})) {
}),
relPath = build.makeRelativeFilePath(config.dir, path);

if (file.exists(path) &&
// not a build layer target
!isLayer &&
// not outside the build directory
relPath.indexOf('..') !== 0) {
file.deleteFile(path);
}
});
@@ -25069,13 +25114,14 @@ define('build', function (require) {
* given module.
*
* @param {Object} module the module object from the build config info.
* @param {Object} the build config object.
* @param {Object} config the build config object.
* @param {Object} [baseLoaderConfig] the base loader config to use for env resets.
*
* @returns {Object} layer information about what paths and modules should
* be in the flattened module.
*/
build.traceDependencies = function (module, config) {
var include, override, layer, context, baseConfig, oldContext,
build.traceDependencies = function (module, config, baseLoaderConfig) {
var include, override, layer, context, oldContext,
rawTextByIds,
syncChecks = {
rhino: true,
@@ -25090,15 +25136,13 @@ define('build', function (require) {

//Grab the reset layer and context after the reset, but keep the
//old config to reuse in the new context.
baseConfig = oldContext.config;
layer = require._layer;
context = layer.context;

//Put back basic config, use a fresh object for it.
//WARNING: probably not robust for paths and packages/packagePaths,
//since those property's objects can be modified. But for basic
//config clone it works out.
require(lang.mixin({}, baseConfig, true));
if (baseLoaderConfig) {
require(lang.deeplikeCopy(baseLoaderConfig));
}

logger.trace("\nTracing dependencies for: " + (module.name || module.out));
include = module.name && !module.create ? [module.name] : [];
@@ -25108,8 +25152,11 @@ define('build', function (require) {

//If there are overrides to basic config, set that up now.;
if (module.override) {
override = lang.mixin({}, baseConfig, true);
lang.mixin(override, module.override, true);
if (baseLoaderConfig) {
override = build.createOverrideConfig(baseLoaderConfig, module.override);
} else {
override = lang.deeplikeCopy(module.override);
}
require(override);
}

@@ -25155,8 +25202,8 @@ define('build', function (require) {

return deferred.promise.then(function () {
//Reset config
if (module.override) {
require(baseConfig);
if (module.override && baseLoaderConfig) {
require(lang.deeplikeCopy(baseLoaderConfig));
}

build.checkForErrors(context);
@@ -25237,10 +25284,10 @@ define('build', function (require) {
};

build.createOverrideConfig = function (config, override) {
var cfg = {};
var cfg = lang.deeplikeCopy(config),
oride = lang.deeplikeCopy(override);

lang.mixin(cfg, config, true);
lang.eachProp(override, function (value, prop) {
lang.eachProp(oride, function (value, prop) {
if (hasProp(build.objProps, prop)) {
//An object property, merge keys. Start a new object
//so that source object in config does not get modified.
@@ -25251,6 +25298,7 @@ define('build', function (require) {
cfg[prop] = override[prop];
}
});

return cfg;
};

@@ -25570,7 +25618,8 @@ define('build', function (require) {
dir = dir.split('/');
dir.pop();
dir = dir.join('/');
exec("require({baseUrl: '" + dir + "'});");
//Make sure dir is JS-escaped, since it will be part of a JS string.
exec("require({baseUrl: '" + dir.replace(/[\\"']/g, '\\$&') + "'});");
}
}

@@ -25759,4 +25808,4 @@ function (args, quit, logger, build) {
(typeof Packages !== 'undefined' || (typeof window === 'undefined' &&
typeof Components !== 'undefined' && Components.interfaces) ?
Array.prototype.slice.call(arguments, 0) : []),
(typeof readFile !== 'undefined' ? readFile : undefined)));
(typeof readFile !== 'undefined' ? readFile : undefined)));
@@ -18,6 +18,9 @@ module.exports = function( grunt ) {
out: "dist/jquery.js",
// We have multiple minify steps
optimize: "none",
// Include dependencies loaded with require
findNestedDependencies: true,
// Avoid breaking semicolons inserted by r.js
skipSemiColonInsertion: true,
wrap: {
startFile: "src/intro.js",
@@ -62,6 +65,14 @@ module.exports = function( grunt ) {
.replace( /define\([^{]*?{/, "" )
.replace( rdefineEnd, "" );

// Remove CommonJS-style require calls
// Keep an ending semicolon
contents = contents
.replace( /(\s+\w+ = )?\s*require\(\s*(")[\w\.\/]+\2\s*\)([,;])/g,
function( all, isVar, quote, commaSemicolon ) {
return isVar && commaSemicolon === ";" ? ";" : "";
});

// Remove empty definitions
contents = contents
.replace( /define\(\[[^\]]+\]\)[\W\n]+$/, "" );
@@ -2,40 +2,41 @@ define([
"../core"
], function( jQuery ) {

var rvalidchars = /^[\],:{}\s]*$/,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;

jQuery.parseJSON = function( data ) {
// Attempt to parse using the native JSON parser first
if ( window.JSON && window.JSON.parse ) {
return window.JSON.parse( data );
}

if ( data === null ) {
return data;
}

if ( typeof data === "string" ) {

// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = jQuery.trim( data );

if ( data ) {
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
.replace( rvalidtokens, "]" )
.replace( rvalidbraces, "")) ) {

return ( new Function( "return " + data ) )();
}
var rvalidchars = /^[\],:{}\s]*$/,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;

jQuery.parseJSON = function( data ) {
// Attempt to parse using the native JSON parser first
if ( window.JSON && window.JSON.parse ) {
return window.JSON.parse( data );
}

if ( data === null ) {
return data;
}

if ( typeof data === "string" ) {

// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = jQuery.trim( data );

if ( data ) {
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
.replace( rvalidtokens, "]" )
.replace( rvalidbraces, "")) ) {

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

jQuery.error( "Invalid JSON: " + data );
};

jQuery.error( "Invalid JSON: " + data );
};
return jQuery.parseJSON;

return jQuery.parseJSON;
});
@@ -1,29 +1,31 @@
define([
"../core"
], function( jQuery ) {
// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
var xml, tmp;
if ( !data || typeof data !== "string" ) {
return null;
}
try {
if ( window.DOMParser ) { // Standard
tmp = new DOMParser();
xml = tmp.parseFromString( data , "text/xml" );
} else { // IE
xml = new ActiveXObject( "Microsoft.XMLDOM" );
xml.async = "false";
xml.loadXML( data );
}
} catch( e ) {
xml = undefined;
}
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
jQuery.error( "Invalid XML: " + data );

// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
var xml, tmp;
if ( !data || typeof data !== "string" ) {
return null;
}
try {
if ( window.DOMParser ) { // Standard
tmp = new DOMParser();
xml = tmp.parseFromString( data , "text/xml" );
} else { // IE
xml = new ActiveXObject( "Microsoft.XMLDOM" );
xml.async = "false";
xml.loadXML( data );
}
return xml;
};
} catch( e ) {
xml = undefined;
}
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
jQuery.error( "Invalid XML: " + data );
}
return xml;
};

return jQuery.parseXML;

return jQuery.parseXML;
});
@@ -5,6 +5,7 @@ define([
"./attributes/prop",
"./attributes/classes"
], function( jQuery ) {
// Return jQuery for attributes-only inclusion
return jQuery;

// Return jQuery for attributes-only inclusion
return jQuery;
});