From 1c84a1fe92b2c1917321c19a110aa4e29feaa7f5 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Sat, 1 Jun 2013 09:16:11 +0000 Subject: [PATCH] Update to jQuery 1.10.1. fixes #24426. git-svn-id: http://core.svn.wordpress.org/trunk@24395 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/jquery/jquery.js | 33 ++++++++++++++++++++------------- wp-includes/script-loader.php | 4 ++-- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/wp-includes/js/jquery/jquery.js b/wp-includes/js/jquery/jquery.js index cc56918053..31f4472915 100644 --- a/wp-includes/js/jquery/jquery.js +++ b/wp-includes/js/jquery/jquery.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v1.10.0 + * jQuery JavaScript Library v1.10.1 * http://jquery.com/ * * Includes Sizzle.js @@ -9,7 +9,7 @@ * Released under the MIT license * http://jquery.org/license * - * Date: 2013-05-24T18:39Z + * Date: 2013-05-30T21:49Z */ (function( window, undefined ) { @@ -46,7 +46,7 @@ var // List of deleted data cache ids, so we can reuse them core_deletedIds = [], - core_version = "1.10.0", + core_version = "1.10.1", // Save a reference to some core methods core_concat = core_deletedIds.concat, @@ -1007,7 +1007,7 @@ rootjQuery = jQuery(document); * Released under the MIT license * http://jquery.org/license * - * Date: 2013-05-15 + * Date: 2013-05-27 */ (function( window, undefined ) { @@ -1492,7 +1492,8 @@ support = Sizzle.support = {}; * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc; + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.parentWindow; // If no document and documentElement is available, return if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { @@ -1506,6 +1507,15 @@ setDocument = Sizzle.setDocument = function( node ) { // Support tests documentIsHTML = !isXML( doc ); + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + if ( parent && parent.frameElement ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + /* Attributes ---------------------------------------------------------------------- */ @@ -3951,7 +3961,6 @@ jQuery.extend({ startLength--; } - hooks.cur = fn; if ( fn ) { // Add a progress sentinel to prevent the fx queue from being @@ -8864,8 +8873,8 @@ var fxNow, timerId, // Update tween properties if ( parts ) { + start = tween.start = +start || +target || 0; tween.unit = unit; - tween.start = +start || +target || 0; // If a +=/-= token was provided, we're doing a relative animation tween.end = parts[ 1 ] ? start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : @@ -9312,9 +9321,7 @@ jQuery.fn.extend({ doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - doAnimation.finish = function() { - anim.stop( true ); - }; + // Empty animations, or finishing resolves immediately if ( empty || jQuery._data( this, "finish" ) ) { anim.stop( true ); @@ -9394,8 +9401,8 @@ jQuery.fn.extend({ // empty the queue first jQuery.queue( this, type, [] ); - if ( hooks && hooks.cur && hooks.cur.finish ) { - hooks.cur.finish.call( this ); + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); } // look for any active animations, and finish them @@ -9775,7 +9782,7 @@ jQuery.fn.size = function() { jQuery.fn.andSelf = jQuery.fn.addBack; // })(); -if ( typeof module === "object" && typeof module.exports === "object" ) { +if ( typeof module === "object" && module && typeof module.exports === "object" ) { // Expose jQuery as module.exports in loaders that implement the Node // module pattern (including browserify). Do not create the global, since // the user will be storing it themselves locally, and globals are frowned diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 237ef0fc8a..48f463b424 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -132,8 +132,8 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop') ); // jQuery - $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.10.0' ); - $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.10.0' ); + $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.10.1' ); + $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.10.1' ); $scripts->add( 'jquery-migrate', '/wp-includes/js/jquery/jquery-migrate.js', array(), '1.2.1' ); // full jQuery UI