Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

changed comments about some still needed in 2.0 oldIE workarounds; refs tickets #5866, #9217, #13553 #1195

Closed
wants to merge 4 commits into from

5 participants

@mzgol
Collaborator

No description provided.

@mzgol
Collaborator

Ah, crap. I mistook IE10 for IE9; IE9 still needs the scroll hooks. :/ I'll update the pull request with a proper comment and I'll restore the code...

@mzgol
Collaborator

Maybe at least the #5866 backout can be kept. Bug description claims it works even on IE8. This modification saves 34 bytes in the minified code.

src/ajax.js
((5 lines not shown))
// Handle falsy url in the settings object (#10093: consistency with old signature)
// We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" );
@jaubourg Collaborator
jaubourg added a note

Prefilters expect a fully qualified URL in the internal options object. It's a departure in behaviour between 1.x and 2.x.

@mzgol Collaborator
mzgol added a note

So I guess neither of these changes can be backed out? Any links to API description detailing this behavior change?

Anyway, the comment about IE7 should be changed to a more appropriate one in jQuery 2.0.

@jaubourg Collaborator
jaubourg added a note

Well, it was more of a side effect of the fix but since it happened in 1.5rc1 (if memory serves), It's been there since the inception of prefilters. Also, the code controlling for cross-domain assumes the protocol is actually there.

You're right that we should make this clear in the comments.

If you wanna remove something from ajax, it's the logic pertaining to isLocal. It is completly unnecessary now that we listen to XHRs through onsuccess and onerror. I've been meaning to do so for a while but didn't find the time.

@dmethvin Owner
dmethvin added a note

It seems like a bad idea to change this, since prefilters might expect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mzgol
Collaborator

This pull request is now completely changed - I corrected two comments, cleaned up a little code and removed isLocal. @jaubourg, you said sth about a logic around isLocal but I don't see anything actually using it at the moment; is that it?

@timmywil timmywil closed this in 79992d7
@jaubourg
Collaborator

Only remaining logic was in the main ajax file, hence the need for removal, so you did it right (tm) :)

@mzgol
Collaborator

Thanks for adding me to AUTHORS! However, I'd ask for my mail to be changed to m.goleb@gmail.com instead of the current one (the current one is my work e-mail and I did all the work in my free time).

@scottgonzalez

This is a mistake on two people's part. @mzgol You should change your git settings to use the email address that matches the one you used to sign the CLA. Let us know if you need any help with that. @timmywil You should always make sure that the name and email address match the CLA before committing. The best course of action at this point is to add an entry in the mailmap. Ping me if you need info about how to use the mailmap.

@mzgol
Collaborator

Ah, now I see it, sorry for the mess. I guess these commits can't now be changed retrospectively (commit ids would break etc.). I'll obviously change the e-mail data in gitconfig; is there anything else I can do to help correct this mistake?

@scottgonzalez

You could send a PR that updates the mailmap and AUTHORS.txt if you want, or just wait for it to get fixed.

@scottgonzalez

Hmm... @dmethvin looks like you never committed the mailmap. Do you want me to make one?

@mzgol mzgol deleted the branch
@mzgol
Collaborator

@scottgonzalez I submitted a pull request:
#1201

@mzgol
Collaborator

(I've also amended all my other current pull requests so that their author entries for all commits are OK. Too bad this one has been already merged.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  build/release.js
@@ -181,7 +181,7 @@ function uploadToCDN( next ) {
});
});
cmds.push( next );
-
+
steps.apply( this, cmds );
}
View
2  speed/benchmark.js
@@ -4,7 +4,7 @@ function benchmark(fn, times, name){
var s = fn.indexOf('{')+1,
e = fn.lastIndexOf('}');
fn = fn.substring(s,e);
-
+
return benchmarkString(fn, times, name);
}
View
2  speed/event.html
@@ -8,7 +8,7 @@
<script src="../dist/jquery.js"></script>
<script>
jQuery(function(){
-
+
});
var events = [], num = 400, exec = false;
View
26 speed/slice.vs.concat.html
@@ -6,42 +6,42 @@
var SIZE = 1e4,
LOOPS = 500;
-
+
var arr = new Array(SIZE);
- for ( var i=arr.length-1; i >= 0; --i )
+ for ( var i = arr.length - 1; i >= 0; --i )
arr[i] = 0;
var t = new Date;
- for ( i=0; i < LOOPS; i++ )
+ for ( i = 0; i < LOOPS; i++ )
arr.slice(0);
var tslice = new Date - t;
-
+
t = new Date;
- for ( i=0; i < LOOPS; i++ )
+ for ( i = 0; i < LOOPS; i++ )
arr.concat();
var tconcat = new Date - t;
-
+
// clone() is just to see how fast built-ins are
t = new Date;
- for ( i=0; i < LOOPS; i++ )
+ for ( i = 0; i < LOOPS; i++ )
clone(arr);
var tclone = new Date - t;
-
+
alert([
'slice:'+tslice,
'concat:'+tconcat,
'clone:'+tclone
].join('\n'));
-
-
+
+
function clone(arr){
var i = arr.length,
copy = new Array(i);
-
+
while (i--)
copy[i] = arr[i];
-
+
return copy;
}
})();
-</script>
View
10 src/ajax.js
@@ -2,15 +2,13 @@ var
// Document location
ajaxLocParts,
ajaxLocation,
-
+
ajax_nonce = jQuery.now(),
ajax_rquery = /\?/,
rhash = /#.*$/,
rts = /([?&])_=[^&]*/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
@@ -225,7 +223,6 @@ jQuery.extend({
ajaxSettings: {
url: ajaxLocation,
type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
global: true,
processData: true,
async: true,
@@ -427,10 +424,11 @@ jQuery.extend({
jqXHR.error = jqXHR.fail;
// Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // Add protocol if not provided (prefilters might expect it)
// Handle falsy url in the settings object (#10093: consistency with old signature)
// We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
+ .replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
// Alias method option to type as per ticket #12004
s.type = options.method || options.type || s.method || s.type;
View
4 src/dimensions.js
@@ -20,8 +20,8 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
if ( elem.nodeType === 9 ) {
doc = elem.documentElement;
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+ // whichever is greatest
return Math.max(
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
elem.body[ "offset" + name ], doc[ "offset" + name ],
View
4 src/effects.js
@@ -440,8 +440,8 @@ Tween.propHooks = {
}
};
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
+// Support: IE9
+// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function( tween ) {
View
2  src/event.js
@@ -66,7 +66,7 @@ jQuery.event = {
tmp = rtypenamespace.exec( types[t] ) || [];
type = origType = tmp[1];
namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
+
// There *must* be a type, no attaching namespace-only handlers
if ( !type ) {
continue;
View
2  test/unit/ajax.js
@@ -1468,7 +1468,7 @@ module( "ajax", {
strictEqual( ajaxXML.find("tab").length, 3, "Parsed node was added properly" );
}
});
-
+
ajaxTest( "#13292 - jQuery.ajax() - converter is bypassed for 204 requests", 3, {
url: "data/nocontent.php",
dataType: "testing",
View
2  test/unit/attributes.js
@@ -446,7 +446,7 @@ test( "attr(String, Object)", function() {
// Setting attributes on svg elements (bug #3116)
var $svg = jQuery(
- "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' baseProfile='full' width='200' height='200'>" +
+ "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' baseProfile='full' width='200' height='200'>" +
"<circle cx='200' cy='200' r='150' />" +
"</svg>"
Something went wrong with that request. Please try again.