aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2015-11-13 20:03:14 +0300
committerOleg Gaidarenko <markelog@gmail.com>2015-11-13 22:25:29 +0300
commitae88b3971c38e0d32a8b927d597426bb50263c6f (patch)
tree09688269d518b95fa20bcd37745286f69c81f4e0
parent0a98623abb85bdce079b400ed3bf3d87ddc6b1da (diff)
downloadjquery-ae88b3971c38e0d32a8b927d597426bb50263c6f.tar.gz
jquery-ae88b3971c38e0d32a8b927d597426bb50263c6f.zip
Release: fix revert artefacts
-rw-r--r--src/core.js11
-rw-r--r--src/css.js13
-rw-r--r--src/effects.js5
-rw-r--r--test/unit/ajax.js4
-rw-r--r--test/unit/manipulation.js2
5 files changed, 26 insertions, 9 deletions
diff --git a/src/core.js b/src/core.js
index d3c08c636..ab172bb4f 100644
--- a/src/core.js
+++ b/src/core.js
@@ -269,16 +269,19 @@ jQuery.extend( {
code = jQuery.trim( code );
if ( code ) {
+
// If the code includes a valid, prologue position
// strict mode pragma, execute code by injecting a
// script tag into the document.
- if ( code.indexOf("use strict") === 1 ) {
- script = document.createElement("script");
+ if ( code.indexOf( "use strict" ) === 1 ) {
+ script = document.createElement( "script" );
script.text = code;
document.head.appendChild( script ).parentNode.removeChild( script );
} else {
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
+
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+
indirect( code );
}
}
diff --git a/src/css.js b/src/css.js
index 7f085560e..7bff81440 100644
--- a/src/css.js
+++ b/src/css.js
@@ -415,6 +415,19 @@ jQuery.each( [ "height", "width" ], function( i, name ) {
};
} );
+jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
+ function( elem, computed ) {
+ if ( computed ) {
+ return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
+ elem.getBoundingClientRect().left -
+ swap( elem, { marginLeft: 0 }, function() {
+ return elem.getBoundingClientRect().left;
+ } )
+ ) + "px";
+ }
+ }
+);
+
// These hooks are used by animate to expand properties
jQuery.each( {
margin: "",
diff --git a/src/effects.js b/src/effects.js
index d8997f4be..178fa42f0 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -401,8 +401,9 @@ jQuery.speed = function( speed, easing, fn ) {
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
};
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?
+ opt.duration : opt.duration in jQuery.fx.speeds ?
+ jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
// Normalize opt.queue - true/undefined/null -> "fx"
if ( opt.queue == null || opt.queue === true ) {
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 3d3bfb9aa..69eae3211 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -1628,10 +1628,10 @@ if ( typeof window.ArrayBuffer === "undefined" || typeof new XMLHttpRequest().re
// Global events get confused by the exception
global: false,
success: function() {
- ok( false, "Success." );
+ assert.ok( false, "Success." );
},
error: function() {
- ok( false, "Error." );
+ assert.ok( false, "Error." );
}
});
});
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 050853bf5..e5c65e32a 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -2297,7 +2297,7 @@ QUnit.test( "html() - script exceptions bubble (#11743)", function( assert ) {
if ( jQuery.ajax ) {
var onerror = window.onerror;
window.onerror = function() {
- ok( true, "Exception thrown in remote script" );
+ assert.ok( true, "Exception thrown in remote script" );
};
jQuery("#qunit-fixture").html("<script src='data/badcall.js'></script>");