Skip to content

Commit ae88b39

Browse files
committed
Release: fix revert artefacts
1 parent 0a98623 commit ae88b39

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

src/core.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,19 @@ jQuery.extend( {
269269
code = jQuery.trim( code );
270270

271271
if ( code ) {
272+
272273
// If the code includes a valid, prologue position
273274
// strict mode pragma, execute code by injecting a
274275
// script tag into the document.
275-
if ( code.indexOf("use strict") === 1 ) {
276-
script = document.createElement("script");
276+
if ( code.indexOf( "use strict" ) === 1 ) {
277+
script = document.createElement( "script" );
277278
script.text = code;
278279
document.head.appendChild( script ).parentNode.removeChild( script );
279280
} else {
280-
// Otherwise, avoid the DOM node creation, insertion
281-
// and removal by using an indirect global eval
281+
282+
// Otherwise, avoid the DOM node creation, insertion
283+
// and removal by using an indirect global eval
284+
282285
indirect( code );
283286
}
284287
}

src/css.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,19 @@ jQuery.each( [ "height", "width" ], function( i, name ) {
415415
};
416416
} );
417417

418+
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
419+
function( elem, computed ) {
420+
if ( computed ) {
421+
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
422+
elem.getBoundingClientRect().left -
423+
swap( elem, { marginLeft: 0 }, function() {
424+
return elem.getBoundingClientRect().left;
425+
} )
426+
) + "px";
427+
}
428+
}
429+
);
430+
418431
// These hooks are used by animate to expand properties
419432
jQuery.each( {
420433
margin: "",

src/effects.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,9 @@ jQuery.speed = function( speed, easing, fn ) {
401401
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
402402
};
403403

404-
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
405-
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
404+
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?
405+
opt.duration : opt.duration in jQuery.fx.speeds ?
406+
jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
406407

407408
// Normalize opt.queue - true/undefined/null -> "fx"
408409
if ( opt.queue == null || opt.queue === true ) {

test/unit/ajax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,10 +1628,10 @@ if ( typeof window.ArrayBuffer === "undefined" || typeof new XMLHttpRequest().re
16281628
// Global events get confused by the exception
16291629
global: false,
16301630
success: function() {
1631-
ok( false, "Success." );
1631+
assert.ok( false, "Success." );
16321632
},
16331633
error: function() {
1634-
ok( false, "Error." );
1634+
assert.ok( false, "Error." );
16351635
}
16361636
});
16371637
});

test/unit/manipulation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@ QUnit.test( "html() - script exceptions bubble (#11743)", function( assert ) {
22972297
if ( jQuery.ajax ) {
22982298
var onerror = window.onerror;
22992299
window.onerror = function() {
2300-
ok( true, "Exception thrown in remote script" );
2300+
assert.ok( true, "Exception thrown in remote script" );
23012301
};
23022302

23032303
jQuery("#qunit-fixture").html("<script src='data/badcall.js'></script>");

0 commit comments

Comments
 (0)