Permalink
Browse files

Merge remote-tracking branch 'build/master'

  • Loading branch information...
2 parents 55a9ced + e014093 commit b88bd61b73aee3c519edf23dbb399fb853cf407b @derek derek committed Oct 12, 2012
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3615,7 +3615,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3733,10 +3733,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.
@@ -17480,9 +17481,9 @@ IO.prototype = {
use;
if (alt === 'native') {
- // Non-IE can use XHR level 2 and not rely on an
+ // Non-IE and IE >= 10 can use XHR level 2 and not rely on an
// external transport.
- alt = Y.UA.ie ? 'xdr' : null;
+ alt = Y.UA.ie && !SUPPORTS_CORS ? 'xdr' : null;
// Prevent "pre-flight" OPTIONS request by removing the
// `X-Requested-With` HTTP header from CORS requests. This header
@@ -18072,10 +18073,8 @@ IO.prototype = {
// Will work only in browsers that implement the
// Cross-Origin Resource Sharing draft.
- if (config.xdr && config.xdr.credentials) {
- if (!Y.UA.ie) {
- transaction.c.withCredentials = true;
- }
+ if (config.xdr && config.xdr.credentials && SUPPORTS_CORS) {
+ transaction.c.withCredentials = true;
}
// Using "null" with HTTP POST will result in a request
@@ -18273,7 +18272,11 @@ Y.IO = IO;
Y.io._map = {};
var XHR = win && win.XMLHttpRequest,
XDR = win && win.XDomainRequest,
- AX = win && win.ActiveXObject;
+ AX = win && win.ActiveXObject,
+
+ // Checks for the presence of the `withCredentials` in an XHR instance
+ // object, which will be present if the environment supports CORS.
+ SUPPORTS_CORS = XHR && 'withCredentials' in (new XMLHttpRequest());
Y.mix(Y.IO, {

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3596,7 +3596,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3714,10 +3714,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.
@@ -17388,9 +17389,9 @@ IO.prototype = {
use;
if (alt === 'native') {
- // Non-IE can use XHR level 2 and not rely on an
+ // Non-IE and IE >= 10 can use XHR level 2 and not rely on an
// external transport.
- alt = Y.UA.ie ? 'xdr' : null;
+ alt = Y.UA.ie && !SUPPORTS_CORS ? 'xdr' : null;
// Prevent "pre-flight" OPTIONS request by removing the
// `X-Requested-With` HTTP header from CORS requests. This header
@@ -17979,10 +17980,8 @@ IO.prototype = {
// Will work only in browsers that implement the
// Cross-Origin Resource Sharing draft.
- if (config.xdr && config.xdr.credentials) {
- if (!Y.UA.ie) {
- transaction.c.withCredentials = true;
- }
+ if (config.xdr && config.xdr.credentials && SUPPORTS_CORS) {
+ transaction.c.withCredentials = true;
}
// Using "null" with HTTP POST will result in a request
@@ -18179,7 +18178,11 @@ Y.IO = IO;
Y.io._map = {};
var XHR = win && win.XMLHttpRequest,
XDR = win && win.XDomainRequest,
- AX = win && win.ActiveXObject;
+ AX = win && win.ActiveXObject,
+
+ // Checks for the presence of the `withCredentials` in an XHR instance
+ // object, which will be present if the environment supports CORS.
+ SUPPORTS_CORS = XHR && 'withCredentials' in (new XMLHttpRequest());
Y.mix(Y.IO, {

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3615,7 +3615,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3733,10 +3733,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3596,7 +3596,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3714,10 +3714,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3615,7 +3615,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3733,10 +3733,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3596,7 +3596,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3714,10 +3714,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3615,7 +3615,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3733,10 +3733,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3596,7 +3596,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3714,10 +3714,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -3615,7 +3615,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3733,10 +3733,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -3596,7 +3596,7 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
-
+
if (/PhantomJS/.test(ua)) {
m = ua.match(/PhantomJS\/([^\s]*)/);
if (m && m[1]) {
@@ -3714,10 +3714,11 @@ YUI.Env.parseUA = function(subUA) {
}
}
}
-
- //Check for known properties to tell if touch/mspointer events are enabled on this device
+
+ //Check for known properties to tell if touch events are enabled on this device or if
+ //the number of MSPointer touchpoints on this device is greater than 0.
if (win && nav && !(o.chrome && o.chrome < 6)) {
- o.touchEnabled = (("ontouchstart" in win) || ("msPointerEnabled" in nav));
+ o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
}
//It was a parsed UA, do not assign the global value.
Oops, something went wrong.

0 comments on commit b88bd61

Please sign in to comment.