From 1f37a5abfe7eeeb9ca81f79b22f9ac4ad519d332 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Tue, 10 Jun 2014 15:14:43 +0800 Subject: [PATCH] fix #563 for display none iframe --- build/kissy-nodejs-min.js | 170 +++++++------- build/kissy-nodejs.js | 31 +-- build/seed-min.js | 166 +++++++------- build/seed.js | 31 +-- src/seed/coverage/src/features.js | 354 +++++++++++++++--------------- src/seed/src/features.js | 19 +- 6 files changed, 397 insertions(+), 374 deletions(-) diff --git a/build/kissy-nodejs-min.js b/build/kissy-nodejs-min.js index 123945f823..38158d7aca 100644 --- a/build/kissy-nodejs-min.js +++ b/build/kissy-nodejs-min.js @@ -1,92 +1,92 @@ /* Copyright 2014, KISSY v1.44 MIT Licensed -build time: May 22 12:30 +build time: Jun 10 15:14 */ -var KISSY=function(a){function f(a){var e={},f;for(f in h)(function(b,d){b[d]=function(b){return i.log(b,d,a)}})(e,f);return e}var i,j=0,h={debug:10,info:20,warn:30,error:40};i={__BUILD_TIME:"20140522123037",Env:{host:this},Config:{debug:"",fns:{}},version:'1.44',config:function(c,e){var f,b,d=this,k,g=i.Config,q=g.fns;i.isObject(c)?i.each(c,function(a,b){(k=q[b])?k.call(d,a):g[b]=a}):(f=q[c],e===a?b=f?f.call(d):g[c]:f?b=f.call(d,e):g[c]=e);return b},log:function(){return a},getLogger:function(a){return f(a)}, -error:function(){},guid:function(a){return(a||"")+j++},Logger:{}};i.Logger.Level={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};return i}(); -(function(a,f){function i(){}function j(d,l,b,g,k,e){if(!l||!d)return d;var r,p,u,o;l[c]=d;e.push(l);u=a.keys(l);o=u.length;for(r=0;r=e)throw new TypeError;}while(1)}for(;l","<":"<","`":"`","/":"/",""":'"',"'":"'"},n={},b,d,k=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;(function(){for(var a in e)n[e[a]]=a})();a.mix(a,{urlEncode:function(a){return encodeURIComponent(""+ -a)},urlDecode:function(a){return decodeURIComponent(a.replace(/\+/g," "))},fromUnicode:function(a){return a.replace(/\\u([a-f\d]{4})/ig,function(a,b){return String.fromCharCode(parseInt(b,16))})},escapeHtml:function(a){return(a+"").replace(j(),function(a){return n[a]})},escapeRegExp:function(a){return a.replace(k,"\\$&")},unEscapeHtml:function(a){return a.replace(h(),function(a,b){return e[a]||String.fromCharCode(+b)})},param:function(b,d,l,m){d=d||"&";l=l||"=";m===f&&(m=!0);var e=[],k,h,r,p,u,o= -a.urlEncode;for(k in b)if(u=b[k],k=o(k),i(u))e.push(k),u!==f&&e.push(l,o(u+c)),e.push(d);else if(a.isArray(u)&&u.length){h=0;for(p=u.length;hj&&(c=e,f.apply(h||this,arguments))}},buffer:function(f,j,h){function c(){c.stop();e=a.later(f,j,0,h||this,arguments)}j=j||150;if(-1===j)return function(){f.apply(h||this,arguments)};var e=null;c.stop=function(){e&&(e.cancel(),e=0)};return c}})})(KISSY); -(function(a,f){function i(b,d,k){var g=b,f,l,m,h;if(!b)return g;if(b[e])return k[b[e]].destination;if("object"===typeof b){h=b.constructor;if(a.inArray(h,[Boolean,String,Number,Date,RegExp]))g=new h(b.valueOf());else if(f=a.isArray(b))g=d?a.filter(b,d):b.concat();else if(l=a.isPlainObject(b))g={};b[e]=h=a.guid("c");k[h]={destination:g,input:b}}if(f)for(b=0;b".replace("{{version}}",e),07)},isTransitionSupported:function(){return g!==f},isTransformSupported:function(){return q!==f},isTransform3dSupported:function(){return l},isClassListSupported:function(){return s},isQuerySelectorSupported:function(){return!a.config("dom/selector")&&v},isIELessThan:function(a){return!!(p&&p=q},!0))?c.push(h[f[0]].exports):c.push(null)):c.push(void 0)});return c},attachModsRecursively:function(a,b){var d,c=a.length;for(d=0;d=k?e[a]=!0:f!==g?e[a]=!1:m.checkModsLoadRecursively(h.getNormalizedRequires(),b,d,c,e)?(h.status=k,e[a]=!0):e[a]=!1},attachModRecursively:function(a,b){var d=b.Env.mods[a];d.status>=q||(d.status=q,d.cjs||m.attachModsRecursively(d.getNormalizedRequires(), +var KISSY=function(a){function f(a){var g={},f;for(f in h)(function(b,d){b[d]=function(b){return i.log(b,d,a)}})(g,f);return g}var i,k=0,h={debug:10,info:20,warn:30,error:40};i={__BUILD_TIME:"20140610151400",Env:{host:this},Config:{debug:"",fns:{}},version:"1.44",config:function(c,g){var f,b,d=this,j,e=i.Config,o=e.fns;i.isObject(c)?i.each(c,function(a,b){(j=o[b])?j.call(d,a):e[b]=a}):(f=o[c],g===a?b=f?f.call(d):e[c]:f?b=f.call(d,g):e[c]=g);return b},log:function(){return a},getLogger:function(a){return f(a)}, +error:function(){},guid:function(a){return(a||"")+k++},Logger:{}};i.Logger.Level={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};return i}(); +(function(a,f){function i(){}function k(d,l,b,e,j,g){if(!l||!d)return d;var q,p,s,x;l[c]=d;g.push(l);s=a.keys(l);x=s.length;for(q=0;q=o)throw new TypeError;}while(1)}for(;l","<":"<","`":"`","/":"/",""":'"',"'":"'"},n={},b,d,j=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;(function(){for(var a in g)n[g[a]]=a})();a.mix(a,{urlEncode:function(a){return encodeURIComponent(""+ +a)},urlDecode:function(a){return decodeURIComponent(a.replace(/\+/g," "))},fromUnicode:function(a){return a.replace(/\\u([a-f\d]{4})/ig,function(a,b){return String.fromCharCode(parseInt(b,16))})},escapeHtml:function(a){return(a+"").replace(k(),function(a){return n[a]})},escapeRegExp:function(a){return a.replace(j,"\\$&")},unEscapeHtml:function(a){return a.replace(h(),function(a,b){return g[a]||String.fromCharCode(+b)})},param:function(b,d,l,m){d=d||"&";l=l||"=";m===f&&(m=!0);var j=[],g,h,q,p,s,x= +a.urlEncode;for(g in b)if(s=b[g],g=x(g),i(s))j.push(g),s!==f&&j.push(l,x(s+c)),j.push(d);else if(a.isArray(s)&&s.length){h=0;for(p=s.length;hk&&(c=g,f.apply(h||this,arguments))}},buffer:function(f,k,h){function c(){c.stop();g=a.later(f,k,0,h||this,arguments)}k=k||150;if(-1===k)return function(){f.apply(h||this,arguments)};var g=null;c.stop=function(){g&&(g.cancel(),g=0)};return c}})})(KISSY); +(function(a,f){function i(b,d,j){var e=b,f,l,m,h;if(!b)return e;if(b[g])return j[b[g]].destination;if("object"===typeof b){h=b.constructor;if(a.inArray(h,[Boolean,String,Number,Date,RegExp]))e=new h(b.valueOf());else if(f=a.isArray(b))e=d?a.filter(b,d):b.concat();else if(l=a.isPlainObject(b))e={};b[g]=h=a.guid("c");j[h]={destination:e,input:b}}if(f)for(b=0;b".replace("{{version}}",e),0=o},!0))?c.push(h[f[0]].exports):c.push(null)):c.push(void 0)});return c},attachModsRecursively:function(a,b){var d,c=a.length;for(d=0;d=j?f[a]=!0:g!==e?f[a]=!1:m.checkModsLoadRecursively(h.getNormalizedRequires(),b,d,c,f)?(h.status=j,f[a]=!0):f[a]=!1},attachModRecursively:function(a,b){var d=b.Env.mods[a];d.status>=o||(d.status=o,d.cjs||m.attachModsRecursively(d.getNormalizedRequires(), b),m.attachMod(b,d))},attachMod:function(b,c){var e=c.factory;if("function"===typeof e){var f;c.requires&&c.requires.length&&(f=a.bind(c.require,c));e=e.apply(c,c.cjs?[b,f,c.exports,c]:m.getModules(b,c.getRequiresWithAlias()));void 0!==e&&(c.exports=e)}else c.exports=e;c.status=d},getModNamesAsArray:function(a){"string"===typeof a&&(a=a.replace(/\s+/g,"").split(","));return a},normalizeModNames:function(a,b,d){return m.unalias(a,m.normalizeModNamesWithAlias(a,b,d))},unalias:function(a,b){for(var d= -[].concat(b),c,e,g,k=0,h,i=a.Env.mods;!k;){k=1;for(c=d.length-1;0<=c;c--)if((e=i[d[c]])&&"alias"in e){k=0;g=e.alias;"string"===typeof g&&(g=[g]);for(h=g.length-1;0<=h;h--)g[h]||g.splice(h,1);d.splice.apply(d,[c,1].concat(f(g)))}}return d},normalizeModNamesWithAlias:function(a,b,d){var c=[],e,g;if(b){e=0;for(g=b.length;ec.length&&(c=e); -b=this.packageInfo=b[c]||n}return b},getTag:function(){return this.tag||this.getPackage().getTag()},getCharset:function(){return this.charset||this.getPackage().getCharset()},getRequiresWithAlias:function(){var a=this.requiresWithAlias,d=this.requires;if(!d||0===d.length)return d||[];a||(this.requiresWithAlias=a=e.normalizeModNamesWithAlias(this.runtime,d,this.name));return a},getRequiredMods:function(){var b=this.runtime;return a.map(this.getNormalizedRequires(),function(a){return e.createModuleInfo(b, -a)})},getNormalizedRequires:function(){var a,d=this.normalizedRequiresStatus,c=this.status,f=this.requires;if(!f||0===f.length)return f||[];if((a=this.normalizedRequires)&&d===c)return a;this.normalizedRequiresStatus=c;return this.normalizedRequires=e.normalizeModNames(this.runtime,f,this.name)}};h.Module=j;var n=new i({name:"",runtime:a})})(KISSY); -(function(a){function f(a){var d=0;if(h.webkit)a.sheet&&(d=1);else if(a.sheet)try{a.sheet.cssRules&&(d=1)}catch(c){"NS_ERROR_DOM_SECURITY_ERR"===c.name&&(d=1)}return d}function i(){for(var b in n){var d=n[b],c=d.node;f(c,b)&&(d.callback&&d.callback.call(c),delete n[b])}e=a.isEmptyObject(n)?0:setTimeout(i,j)}var j=30,h=a.UA,c=a.Loader.Utils,e=0,n={};c.pollCss=function(a,d){var c;c=n[a.href]={};c.node=a;c.callback=d;e||i()};c.isCssLoaded=f})(KISSY); -(function(a){var f=require("fs"),i=require("vm");a.getScript=function(j,h,c){var e;a.isPlainObject(h)&&(c=h.charset,e=h.error,h=h.success);if(a.startsWith(a.Path.extname(j).toLowerCase(),".css"))h&&h();else{var n=(new a.Uri(j)).getPath();try{var b=f.readFileSync(n,c);i.runInThisContext("(function(KISSY,requireNode){"+b+"})",j)(a,require);h&&h()}catch(d){e&&e(d)}}}})(KISSY); -(function(a,f){function i(b){b=b.replace(/\\/g,"/");"/"!==b.charAt(b.length-1)&&(b+="/");e?b=e.resolve(b):(a.startsWith(b,"file:")||(b="file:"+b),b=new a.Uri(b));return b}var j=a.Loader,h=j.Utils,c=a.Env.host.location,e,n,b=a.Config.fns;if(!a.UA.nodejs&&c&&(n=c.href))e=new a.Uri(n);a.Config.loadModsFn=function(b,c){a.getScript(b.fullpath,c)};b.packages=function(b){var c,e=this.Config,h=e.packages=e.packages||{};return b?(a.each(b,function(b,d){c=b.name||d;var e=i(b.base||b.path);b.name=c;b.base=e.toString(); -b.baseUri=e;b.runtime=a;delete b.path;h[c]?h[c].reset(b):h[c]=new j.Package(b)}),f):!1===b?(e.packages={},f):h};b.modules=function(b){var c=this;b&&a.each(b,function(b,d){var e=h.createModuleInfo(c,d,b);e.status===j.Status.INIT&&a.mix(e,b)})};b.base=function(a){var b=this.Config;if(!a)return b.base;a=i(a);b.base=a.toString();b.baseUri=a;return f}})(KISSY); -(function(a,f){function i(b,c,g,h,k){var i=c&&c.length,j=[],l=[];a.each(c,function(c){var p,m={timeout:k,success:function(){l.push(c);p&&s&&(d.registerModule(b,p.name,s.factory,s.config),s=f);--i||g(l,j)},error:function(){j.push(c);--i||g(l,j)},charset:h};c.combine||(p=c.mods[0],"css"===p.getType()?p=f:e&&(v=p.name,a.now(),m.attrs={"data-mod-name":p.name}));a.Config.loadModsFn(c,m)})}function j(b,c){a.mix(this,{runtime:b,waitingModules:c})}function h(a,b){if(!a&&"function"===typeof b&&1a.UA.ieMode,n=a.Loader,b=n.Status,d=n.Utils,k=d.getHash,g=b.LOADING,q=b.LOADED,l=b.READY_TO_ATTACH,m=b.ERROR,t=a.now();j.groupTag=t;var s,v;j.add=function(b,c,g,k,i){if(3===i&&a.isArray(c))var j=c,c=g,g={requires:j,cjs:1};if("function"===typeof b|| -1===i)if(g=c,c=b,g=h(g,c),e){for(var b=a.Env.host.document.getElementsByTagName("script"),l,i=b.length-1;0<=i;i--)if(j=b[i],"interactive"===j.readyState){l=j;break}b=l?l.getAttribute("data-mod-name"):v;d.registerModule(k,b,c,g);v=null}else s={factory:c,config:g};else e?v=null:s=f,g=h(g,c),d.registerModule(k,b,c,g)};a.augment(j,{use:function(b){var c=a.Config.timeout,e=this.runtime,b=a.keys(this.calculate(b));d.createModulesInfo(e,b);b=this.getComboUrls(b);a.each(b.css,function(b){i(e,b,function(b, -c){a.each(b,function(b){a.each(b.mods,function(b){d.registerModule(e,b.name,a.noop);b.notifyAll()})});a.each(c,function(b){a.each(b.mods,function(a){a.status=m;a.notifyAll()})})},b.charset,c)});a.each(b.js,function(b){i(e,b,function(){a.each(b,function(b){a.each(b.mods,function(a){a.factory||(a.status=m);a.notifyAll()})})},b.charset,c)})},calculate:function(a,b,c){var e,f,h,i,k=this.waitingModules,j=this.runtime,c=c||{},b=b||{};for(e=0;e=l||(i!==q&&!k.contains(f)&&(i!==g&&(h.status=g,c[f]=1),h.wait(function(a){k.remove(a.name);k.notifyAll()}),k.add(f)),this.calculate(h.getNormalizedRequires(),b,c)));return c},getComboMods:function(b,e){for(var f={},g,h=this.runtime,i=0,k=b.length,j,l,m,n,v,q,s,F,H;ie||q+j.join(d).length+n>b)j.pop(),l.pop(),I(),j=[],l=[],B--}else z.push({combine:0,fullpath:C,mods:[A]})}j.length&& -I()}}return g}});n.ComboLoader=j})(KISSY); -(function(a,f){function i(b){a.mix(this,{fn:b,waitMods:{}})}var j=a.Loader,h=a.Env,c=j.Utils,e=a.setImmediate,n=j.ComboLoader;i.prototype={constructor:i,notifyAll:function(){var b=this.fn;b&&a.isEmptyObject(this.waitMods)&&(this.fn=null,b())},add:function(a){this.waitMods[a]=1},remove:function(a){delete this.waitMods[a]},contains:function(a){return this.waitMods[a]}};j.WaitingModules=i;a.mix(a,{add:function(b,c,e){n.add(b,c,e,a,arguments.length)},use:function(b,d){function h(){++t;var b=[];a.now(); -c.checkModsLoadRecursively(g,a,f,b)?(c.attachModsRecursively(g,a),d&&(m?s():e(s))):b.length?l&&(m?l.apply(a,b):e(function(){l.apply(a,b)})):(v.fn=h,j.use(g))}var g,j,l,m,t=0,s,v=new i(h);a.isPlainObject(d)&&(m=d.sync,l=d.error,d=d.success);s=function(){d.apply(a,c.getModules(a,b))};b=c.getModNamesAsArray(b);b=c.normalizeModNamesWithAlias(a,b);g=c.unalias(a,b);j=new n(a,v);m?v.notifyAll():e(function(){v.notifyAll()});return a},require:function(b,d){if(b){var e=c.unalias(a,c.normalizeModNamesWithAlias(a, -[b],d));c.attachModsRecursively(e,a);return c.getModules(a,e)[1]}}});h.mods={}})(KISSY); -(function(a){function f(f){var g=f.src||"";if(!g.match(d))return 0;var f=(f=f.getAttribute("data-config"))?(new Function("return "+f))():{},i=f.comboPrefix||e,j=f.comboSep||n,m,t=g.indexOf(i);-1===t?m=g.replace(b,"$1"):(m=g.substring(0,t),"/"!==m.charAt(m.length-1)&&(m+="/"),i=g.substring(t+i.length).split(j),a.each(i,function(a){if(a.match(d))return m+=a.replace(b,"$1"),!1}));"tag"in f||(i=g.lastIndexOf("?t="),-1!==i&&(g=g.substring(i+1),f.tag=h.getHash(c+g)));f.base=f.base||m;return f}function i(){var a= -j.getElementsByTagName("script"),b,c;for(b=a.length-1;0<=b;b--)if(c=f(a[b]))return c;return null}var j=a.Env.host&&a.Env.host.document,h=a.Loader.Utils,c="20140522123037",e="??",n=",",b=/^(.*)(seed|kissy)(?:-min)?\.js[^/]*/i,d=/(seed|kissy)(?:-min)?\.js/i;a.config({comboPrefix:e,comboSep:n,charset:"utf-8",lang:"zh-cn"});a.UA.nodejs?a.config({charset:"utf-8",base:__dirname.replace(/\\/g,"/").replace(/\/$/,"")+"/"}):j&&j.getElementsByTagName&&a.config(a.mix({comboMaxUrlLength:2E3,comboMaxFileNum:40},i()))})(KISSY); +[].concat(b),c,e,j,g=0,h,i=a.Env.mods;!g;){g=1;for(c=d.length-1;0<=c;c--)if((e=i[d[c]])&&"alias"in e){g=0;j=e.alias;"string"===typeof j&&(j=[j]);for(h=j.length-1;0<=h;h--)j[h]||j.splice(h,1);d.splice.apply(d,[c,1].concat(f(j)))}}return d},normalizeModNamesWithAlias:function(a,b,d){var c=[],e,j;if(b){e=0;for(j=b.length;ec.length&&(c=e); +b=this.packageInfo=b[c]||n}return b},getTag:function(){return this.tag||this.getPackage().getTag()},getCharset:function(){return this.charset||this.getPackage().getCharset()},getRequiresWithAlias:function(){var a=this.requiresWithAlias,d=this.requires;if(!d||0===d.length)return d||[];a||(this.requiresWithAlias=a=g.normalizeModNamesWithAlias(this.runtime,d,this.name));return a},getRequiredMods:function(){var b=this.runtime;return a.map(this.getNormalizedRequires(),function(a){return g.createModuleInfo(b, +a)})},getNormalizedRequires:function(){var a,d=this.normalizedRequiresStatus,c=this.status,e=this.requires;if(!e||0===e.length)return e||[];if((a=this.normalizedRequires)&&d===c)return a;this.normalizedRequiresStatus=c;return this.normalizedRequires=g.normalizeModNames(this.runtime,e,this.name)}};h.Module=k;var n=new i({name:"",runtime:a})})(KISSY); +(function(a){function f(a){var d=0;if(h.webkit)a.sheet&&(d=1);else if(a.sheet)try{a.sheet.cssRules&&(d=1)}catch(c){"NS_ERROR_DOM_SECURITY_ERR"===c.name&&(d=1)}return d}function i(){for(var b in n){var d=n[b],c=d.node;f(c,b)&&(d.callback&&d.callback.call(c),delete n[b])}g=a.isEmptyObject(n)?0:setTimeout(i,k)}var k=30,h=a.UA,c=a.Loader.Utils,g=0,n={};c.pollCss=function(a,d){var c;c=n[a.href]={};c.node=a;c.callback=d;g||i()};c.isCssLoaded=f})(KISSY); +(function(a){var f=require("fs"),i=require("vm");a.getScript=function(k,h,c){var g;a.isPlainObject(h)&&(c=h.charset,g=h.error,h=h.success);if(a.startsWith(a.Path.extname(k).toLowerCase(),".css"))h&&h();else{var n=(new a.Uri(k)).getPath();try{var b=f.readFileSync(n,c);i.runInThisContext("(function(KISSY,requireNode){"+b+"})",k)(a,require);h&&h()}catch(d){g&&g(d)}}}})(KISSY); +(function(a,f){function i(b){b=b.replace(/\\/g,"/");"/"!==b.charAt(b.length-1)&&(b+="/");g?b=g.resolve(b):(a.startsWith(b,"file:")||(b="file:"+b),b=new a.Uri(b));return b}var k=a.Loader,h=k.Utils,c=a.Env.host.location,g,n,b=a.Config.fns;if(!a.UA.nodejs&&c&&(n=c.href))g=new a.Uri(n);a.Config.loadModsFn=function(b,c){a.getScript(b.fullpath,c)};b.packages=function(b){var c,e=this.Config,g=e.packages=e.packages||{};return b?(a.each(b,function(b,d){c=b.name||d;var e=i(b.base||b.path);b.name=c;b.base=e.toString(); +b.baseUri=e;b.runtime=a;delete b.path;g[c]?g[c].reset(b):g[c]=new k.Package(b)}),f):!1===b?(e.packages={},f):g};b.modules=function(b){var c=this;b&&a.each(b,function(b,d){var f=h.createModuleInfo(c,d,b);f.status===k.Status.INIT&&a.mix(f,b)})};b.base=function(a){var b=this.Config;if(!a)return b.base;a=i(a);b.base=a.toString();b.baseUri=a;return f}})(KISSY); +(function(a,f){function i(b,c,e,j,h){var i=c&&c.length,k=[],l=[];a.each(c,function(c){var p,m={timeout:h,success:function(){l.push(c);p&&r&&(d.registerModule(b,p.name,r.factory,r.config),r=f);--i||e(l,k)},error:function(){k.push(c);--i||e(l,k)},charset:j};c.combine||(p=c.mods[0],"css"===p.getType()?p=f:g&&(u=p.name,a.now(),m.attrs={"data-mod-name":p.name}));a.Config.loadModsFn(c,m)})}function k(b,c){a.mix(this,{runtime:b,waitingModules:c})}function h(a,b){if(!a&&"function"===typeof b&&1a.UA.ieMode,n=a.Loader,b=n.Status,d=n.Utils,j=d.getHash,e=b.LOADING,o=b.LOADED,l=b.READY_TO_ATTACH,m=b.ERROR,t=a.now();k.groupTag=t;var r,u;k.add=function(b,c,e,j,i){if(3===i&&a.isArray(c))var k=c,c=e,e={requires:k,cjs:1};if("function"===typeof b|| +1===i)if(e=c,c=b,e=h(e,c),g){for(var b=a.Env.host.document.getElementsByTagName("script"),l,i=b.length-1;0<=i;i--)if(k=b[i],"interactive"===k.readyState){l=k;break}b=l?l.getAttribute("data-mod-name"):u;d.registerModule(j,b,c,e);u=null}else r={factory:c,config:e};else g?u=null:r=f,e=h(e,c),d.registerModule(j,b,c,e)};a.augment(k,{use:function(b){var c=a.Config.timeout,e=this.runtime,b=a.keys(this.calculate(b));d.createModulesInfo(e,b);b=this.getComboUrls(b);a.each(b.css,function(b){i(e,b,function(b, +c){a.each(b,function(b){a.each(b.mods,function(b){d.registerModule(e,b.name,a.noop);b.notifyAll()})});a.each(c,function(b){a.each(b.mods,function(a){a.status=m;a.notifyAll()})})},b.charset,c)});a.each(b.js,function(b){i(e,b,function(){a.each(b,function(b){a.each(b.mods,function(a){a.factory||(a.status=m);a.notifyAll()})})},b.charset,c)})},calculate:function(a,b,c){var f,g,j,h,i=this.waitingModules,k=this.runtime,c=c||{},b=b||{};for(f=0;f=l||(h!==o&&!i.contains(g)&&(h!==e&&(j.status=e,c[g]=1),j.wait(function(a){i.remove(a.name);i.notifyAll()}),i.add(g)),this.calculate(j.getNormalizedRequires(),b,c)));return c},getComboMods:function(b,e){for(var f={},g,j=this.runtime,h=0,i=b.length,k,l,m,n,o,u,r,G,I;he||u+k.join(d).length+n>b)k.pop(),l.pop(),J(),k=[],l=[],C--}else A.push({combine:0,fullpath:D,mods:[B]})}k.length&& +J()}}return g}});n.ComboLoader=k})(KISSY); +(function(a,f){function i(b){a.mix(this,{fn:b,waitMods:{}})}var k=a.Loader,h=a.Env,c=k.Utils,g=a.setImmediate,n=k.ComboLoader;i.prototype={constructor:i,notifyAll:function(){var b=this.fn;b&&a.isEmptyObject(this.waitMods)&&(this.fn=null,b())},add:function(a){this.waitMods[a]=1},remove:function(a){delete this.waitMods[a]},contains:function(a){return this.waitMods[a]}};k.WaitingModules=i;a.mix(a,{add:function(b,c,f){n.add(b,c,f,a,arguments.length)},use:function(b,d){function h(){++t;var b=[];a.now(); +c.checkModsLoadRecursively(e,a,f,b)?(c.attachModsRecursively(e,a),d&&(m?r():g(r))):b.length?l&&(m?l.apply(a,b):g(function(){l.apply(a,b)})):(u.fn=h,k.use(e))}var e,k,l,m,t=0,r,u=new i(h);a.isPlainObject(d)&&(m=d.sync,l=d.error,d=d.success);r=function(){d.apply(a,c.getModules(a,b))};b=c.getModNamesAsArray(b);b=c.normalizeModNamesWithAlias(a,b);e=c.unalias(a,b);k=new n(a,u);m?u.notifyAll():g(function(){u.notifyAll()});return a},require:function(b,d){if(b){var f=c.unalias(a,c.normalizeModNamesWithAlias(a, +[b],d));c.attachModsRecursively(f,a);return c.getModules(a,f)[1]}}});h.mods={}})(KISSY); +(function(a){function f(f){var e=f.src||"";if(!e.match(d))return 0;var f=(f=f.getAttribute("data-config"))?(new Function("return "+f))():{},i=f.comboPrefix||g,k=f.comboSep||n,m,t=e.indexOf(i);-1===t?m=e.replace(b,"$1"):(m=e.substring(0,t),"/"!==m.charAt(m.length-1)&&(m+="/"),i=e.substring(t+i.length).split(k),a.each(i,function(a){if(a.match(d))return m+=a.replace(b,"$1"),!1}));"tag"in f||(i=e.lastIndexOf("?t="),-1!==i&&(e=e.substring(i+1),f.tag=h.getHash(c+e)));f.base=f.base||m;return f}function i(){var a= +k.getElementsByTagName("script"),b,c;for(b=a.length-1;0<=b;b--)if(c=f(a[b]))return c;return null}var k=a.Env.host&&a.Env.host.document,h=a.Loader.Utils,c="20140610151400",g="??",n=",",b=/^(.*)(seed|kissy)(?:-min)?\.js[^/]*/i,d=/(seed|kissy)(?:-min)?\.js/i;a.config({comboPrefix:g,comboSep:n,charset:"utf-8",lang:"zh-cn"});a.UA.nodejs?a.config({charset:"utf-8",base:__dirname.replace(/\\/g,"/").replace(/\/$/,"")+"/"}):k&&k.getElementsByTagName&&a.config(a.mix({comboMaxUrlLength:2E3,comboMaxFileNum:40},i()))})(KISSY); KISSY.add("i18n",{alias:function(a,f){return f+"/i18n/"+a.Config.lang}}); -(function(a,f){function i(){if(!b){c&&!h.nodejs&&t(j,l,i);b=1;for(var e=0;ef.ieMode&&(j=null);if(j)a.add("json",function(){return a.JSON=j}),a.parseJson=function(a){return j.parse(a)};else{var h=/^[\],:{}\s]*$/,c=/(?:^|:|,)(?:\s*\[)+/g,e=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,n=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;a.parseJson=function(b){return null=== -b?b:"string"===typeof b&&(b=a.trim(b))&&h.test(b.replace(e,"@").replace(n,"]").replace(c,""))?(new Function("return "+b))():a.error("Invalid Json: "+b)}}a.UA.nodejs&&(a.KISSY=a,module.exports=a)})(KISSY); +(function(a){a.add("ua",function(){return a.UA});a.add("uri",function(){return a.Uri});a.add("path",function(){return a.Path});var f=a.UA,i=a.Env.host,k=(f.nodejs&&"object"===typeof global?global:i).JSON;9>f.ieMode&&(k=null);if(k)a.add("json",function(){return a.JSON=k}),a.parseJson=function(a){return k.parse(a)};else{var h=/^[\],:{}\s]*$/,c=/(?:^|:|,)(?:\s*\[)+/g,g=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,n=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;a.parseJson=function(b){return null=== +b?b:"string"===typeof b&&(b=a.trim(b))&&h.test(b.replace(g,"@").replace(n,"]").replace(c,""))?(new Function("return "+b))():a.error("Invalid Json: "+b)}}a.UA.nodejs&&(a.KISSY=a,module.exports=a)})(KISSY); diff --git a/build/kissy-nodejs.js b/build/kissy-nodejs.js index 41ff1c6607..f45cb8eae3 100644 --- a/build/kissy-nodejs.js +++ b/build/kissy-nodejs.js @@ -1,7 +1,7 @@ /* Copyright 2014, KISSY v1.44 MIT Licensed -build time: May 22 12:30 +build time: Jun 10 15:14 */ /** * @ignore @@ -87,11 +87,11 @@ var KISSY = (function (undefined) { S = { /** * The build time of the library. - * NOTICE: '20140522123037' will replace with current timestamp when compressing. + * NOTICE: '20140610151400' will replace with current timestamp when compressing. * @private * @type {String} */ - __BUILD_TIME: '20140522123037', + __BUILD_TIME: '20140610151400', /** * KISSY Environment. @@ -118,10 +118,10 @@ var KISSY = (function (undefined) { /** * The version of the library. - * NOTICE: '1.43' will replace with current version when compressing. + * NOTICE: '1.44' will replace with current version when compressing. * @type {String} */ - version:'1.44', + version: '1.44', /** * set KISSY configuration @@ -3401,13 +3401,18 @@ var KISSY = (function (undefined) { // https://gist.github.com/lorenzopolidori/3794226 // ie9 does not support 3d transform // http://msdn.microsoft.com/en-us/ie/ff468705 - var el = doc.createElement('p'); - documentElement.insertBefore(el, documentElement.firstChild); - el.style[transformProperty] = 'translate3d(1px,1px,1px)'; - var computedStyle = win.getComputedStyle(el); - var has3d = computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]; - documentElement.removeChild(el); - isTransform3dSupported = (has3d !== undefined && has3d.length > 0 && has3d !== 'none'); + try { + var el = doc.createElement('p'); + documentElement.insertBefore(el, documentElement.firstChild); + el.style[transformProperty] = 'translate3d(1px,1px,1px)'; + var computedStyle = win.getComputedStyle(el); + var has3d = computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]; + documentElement.removeChild(el); + isTransform3dSupported = (has3d !== undefined && has3d.length > 0 && has3d !== 'none'); + }catch (e){ + // https://github.com/kissyteam/kissy/issues/563 + isTransform3dSupported = true; + } } } @@ -5457,7 +5462,7 @@ var KISSY = (function (undefined) { var doc = S.Env.host && S.Env.host.document; // var logger = S.getLogger('s/loader'); var Utils = S.Loader.Utils; - var TIMESTAMP = '20140522123037'; + var TIMESTAMP = '20140610151400'; var defaultComboPrefix = '??'; var defaultComboSep = ','; diff --git a/build/seed-min.js b/build/seed-min.js index 1e0bfd8a5c..54eff29e7a 100644 --- a/build/seed-min.js +++ b/build/seed-min.js @@ -1,102 +1,102 @@ /* Copyright 2014, KISSY v1.44 MIT Licensed -build time: May 22 12:30 +build time: Jun 10 15:14 */ -var KISSY=function(a){function f(a){var g={},f;for(f in h)(function(b,d){b[d]=function(b){return i.log(b,d,a)}})(g,f);return g}var i,j=0,h={debug:10,info:20,warn:30,error:40};i={__BUILD_TIME:"20140522123037",Env:{host:this},Config:{debug:"",fns:{}},version:'1.44',config:function(c,g){var f,b,d=this,l,e=i.Config,o=e.fns;i.isObject(c)?i.each(c,function(a,b){(l=o[b])?l.call(d,a):e[b]=a}):(f=o[c],g===a?b=f?f.call(d):e[c]:f?b=f.call(d,g):e[c]=g);return b},log:function(){return a},getLogger:function(a){return f(a)}, -error:function(){},guid:function(a){return(a||"")+j++},Logger:{}};i.Logger.Level={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};return i}(); -(function(a,f){function i(){}function j(d,k,b,e,l,g){if(!k||!d)return d;var s,r,v,p;k[c]=d;g.push(k);v=a.keys(k);p=v.length;for(s=0;s=c)throw new TypeError;}while(1)}for(;k=c)throw new TypeError;}while(1)}for(;l","<":"<","`":"`","/":"/",""":'"',"'":"'"},n={},b,d,l=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;(function(){for(var a in g)n[g[a]]=a})();a.mix(a,{urlEncode:function(a){return encodeURIComponent(""+ -a)},urlDecode:function(a){return decodeURIComponent(a.replace(/\+/g," "))},fromUnicode:function(a){return a.replace(/\\u([a-f\d]{4})/ig,function(a,b){return String.fromCharCode(parseInt(b,16))})},escapeHtml:function(a){return(a+"").replace(j(),function(a){return n[a]})},escapeRegExp:function(a){return a.replace(l,"\\$&")},unEscapeHtml:function(a){return a.replace(h(),function(a,b){return g[a]||String.fromCharCode(+b)})},param:function(b,d,k,m){d=d||"&";k=k||"=";m===f&&(m=!0);var g=[],l,h,s,r,v,p= -a.urlEncode;for(l in b)if(v=b[l],l=p(l),i(v))g.push(l),v!==f&&g.push(k,p(v+c)),g.push(d);else if(a.isArray(v)&&v.length){h=0;for(r=v.length;hj&&(c=g,f.apply(h||this,arguments))}},buffer:function(f,j,h){function c(){c.stop();g=a.later(f,j,0,h||this,arguments)}j=j||150;if(-1===j)return function(){f.apply(h||this,arguments)};var g=null;c.stop=function(){g&&(g.cancel(),g=0)};return c}})})(KISSY); -(function(a,f){function i(b,d,f){var e=b,h,k,m,n;if(!b)return e;if(b[g])return f[b[g]].destination;if("object"===typeof b){n=b.constructor;if(a.inArray(n,[Boolean,String,Number,Date,RegExp]))e=new n(b.valueOf());else if(h=a.isArray(b))e=d?a.filter(b,d):b.concat();else if(k=a.isPlainObject(b))e={};b[g]=n=a.guid("c");f[n]={destination:e,input:b}}if(h)for(b=0;b","<":"<","`":"`","/":"/",""":'"',"'":"'"},n={},b,d,i=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;(function(){for(var a in g)n[g[a]]=a})();a.mix(a,{urlEncode:function(a){return encodeURIComponent(""+ +a)},urlDecode:function(a){return decodeURIComponent(a.replace(/\+/g," "))},fromUnicode:function(a){return a.replace(/\\u([a-f\d]{4})/ig,function(a,b){return String.fromCharCode(parseInt(b,16))})},escapeHtml:function(a){return(a+"").replace(k(),function(a){return n[a]})},escapeRegExp:function(a){return a.replace(i,"\\$&")},unEscapeHtml:function(a){return a.replace(j(),function(a,b){return g[a]||String.fromCharCode(+b)})},param:function(b,d,l,m){d=d||"&";l=l||"=";m===f&&(m=!0);var i=[],g,j,r,q,u,x= +a.urlEncode;for(g in b)if(u=b[g],g=x(g),h(u))i.push(g),u!==f&&i.push(l,x(u+c)),i.push(d);else if(a.isArray(u)&&u.length){j=0;for(q=u.length;jk&&(c=g,f.apply(j||this,arguments))}},buffer:function(f,k,j){function c(){c.stop();g=a.later(f,k,0,j||this,arguments)}k=k||150;if(-1===k)return function(){f.apply(j||this,arguments)};var g=null;c.stop=function(){g&&(g.cancel(),g=0)};return c}})})(KISSY); +(function(a,f){function h(b,d,i){var e=b,f,l,m,j;if(!b)return e;if(b[g])return i[b[g]].destination;if("object"===typeof b){j=b.constructor;if(a.inArray(j,[Boolean,String,Number,Date,RegExp]))e=new j(b.valueOf());else if(f=a.isArray(b))e=d?a.filter(b,d):b.concat();else if(l=a.isPlainObject(b))e={};b[g]=j=a.guid("c");i[j]={destination:e,input:b}}if(f)for(b=0;b".replace("{{version}}",e),07)},isTransitionSupported:function(){return e!==f},isTransformSupported:function(){return o!==f},isTransform3dSupported:function(){return k},isClassListSupported:function(){return t},isQuerySelectorSupported:function(){return!a.config("dom/selector")&&q},isIELessThan:function(a){return!!(r&&r=o},!0))?c.push(h[f[0]].exports):c.push(null)):c.push(void 0)});return c},attachModsRecursively:function(a,b){var d,c=a.length;for(d=0;d=l?f[a]=!0:g!==e?f[a]=!1:m.checkModsLoadRecursively(h.getNormalizedRequires(),b,d,c,f)?(h.status=l,f[a]=!0):f[a]=!1},attachModRecursively:function(a,b){var d=b.Env.mods[a];d.status>=o||(d.status=o,d.cjs||m.attachModsRecursively(d.getNormalizedRequires(), +(function(a,f){var h=/^[\s\xa0]+|[\s\xa0]+$/g,k=String.prototype.trim,j=/\\?\{([^{}]+)\}/g;a.mix(a,{trim:k?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(h,"")},substitute:function(a,g,h){return"string"!==typeof a||!g?a:a.replace(h||j,function(a,d){return"\\"===a.charAt(0)?a.slice(1):g[d]===f?"":g[d]})},ucfirst:function(a){a+="";return a.charAt(0).toUpperCase()+a.substring(1)},startsWith:function(a,f){return 0===a.lastIndexOf(f,0)},endsWith:function(a,f){var j= +a.length-f.length;return 0<=j&&a.indexOf(f,j)===j}})})(KISSY); +(function(a,f){var h={},k=Object.prototype,j=k.toString;a.mix(a,{type:function(a){return null==a?""+a:h[j.call(a)]||"object"},isNull:function(a){return null===a},isUndefined:function(a){return a===f},isEmptyObject:function(a){for(var g in a)if(g!==f)return!1;return!0},isPlainObject:function(c){if(!c||"object"!==a.type(c)||c.nodeType||c.window==c)return!1;var g,j;try{if((j=c.constructor)&&!k.hasOwnProperty.call(c,"constructor")&&!k.hasOwnProperty.call(j.prototype,"isPrototypeOf"))return!1}catch(b){return!1}for(g in c); +return g===f||k.hasOwnProperty.call(c,g)}});a.each("Boolean,Number,String,Function,Date,RegExp,Object,Array".split(","),function(c,f){h["[object "+c+"]"]=f=c.toLowerCase();a["is"+c]=function(c){return a.type(c)===f}});a.isArray=Array.isArray||a.isArray})(KISSY); +(function(a){function f(){for(var a=0,b;b=h[a++];)try{b()}catch(d){setTimeout(function(){throw d;},0)}1".replace("{{version}}",e),0=o},!0))?c.push(h[f[0]].exports):c.push(null)):c.push(void 0)});return c},attachModsRecursively:function(a,b){var d,c=a.length;for(d=0;d=i?f[a]=!0:g!==e?f[a]=!1:m.checkModsLoadRecursively(h.getNormalizedRequires(),b,d,c,f)?(h.status=i,f[a]=!0):f[a]=!1},attachModRecursively:function(a,b){var d=b.Env.mods[a];d.status>=o||(d.status=o,d.cjs||m.attachModsRecursively(d.getNormalizedRequires(), b),m.attachMod(b,d))},attachMod:function(b,c){var e=c.factory;if("function"===typeof e){var f;c.requires&&c.requires.length&&(f=a.bind(c.require,c));e=e.apply(c,c.cjs?[b,f,c.exports,c]:m.getModules(b,c.getRequiresWithAlias()));void 0!==e&&(c.exports=e)}else c.exports=e;c.status=d},getModNamesAsArray:function(a){"string"===typeof a&&(a=a.replace(/\s+/g,"").split(","));return a},normalizeModNames:function(a,b,d){return m.unalias(a,m.normalizeModNamesWithAlias(a,b,d))},unalias:function(a,b){for(var d= -[].concat(b),c,e,g,l=0,h,i=a.Env.mods;!l;){l=1;for(c=d.length-1;0<=c;c--)if((e=i[d[c]])&&"alias"in e){l=0;g=e.alias;"string"===typeof g&&(g=[g]);for(h=g.length-1;0<=h;h--)g[h]||g.splice(h,1);d.splice.apply(d,[c,1].concat(f(g)))}}return d},normalizeModNamesWithAlias:function(a,b,d){var c=[],e,g;if(b){e=0;for(g=b.length;ec.length&&(c=e); b=this.packageInfo=b[c]||n}return b},getTag:function(){return this.tag||this.getPackage().getTag()},getCharset:function(){return this.charset||this.getPackage().getCharset()},getRequiresWithAlias:function(){var a=this.requiresWithAlias,d=this.requires;if(!d||0===d.length)return d||[];a||(this.requiresWithAlias=a=g.normalizeModNamesWithAlias(this.runtime,d,this.name));return a},getRequiredMods:function(){var b=this.runtime;return a.map(this.getNormalizedRequires(),function(a){return g.createModuleInfo(b, -a)})},getNormalizedRequires:function(){var a,d=this.normalizedRequiresStatus,c=this.status,e=this.requires;if(!e||0===e.length)return e||[];if((a=this.normalizedRequires)&&d===c)return a;this.normalizedRequiresStatus=c;return this.normalizedRequires=g.normalizeModNames(this.runtime,e,this.name)}};h.Module=j;var n=new i({name:"",runtime:a})})(KISSY); -(function(a){function f(a){var d=0;if(h.webkit)a.sheet&&(d=1);else if(a.sheet)try{a.sheet.cssRules&&(d=1)}catch(c){"NS_ERROR_DOM_SECURITY_ERR"===c.name&&(d=1)}return d}function i(){for(var b in n){var d=n[b],c=d.node;f(c,b)&&(d.callback&&d.callback.call(c),delete n[b])}g=a.isEmptyObject(n)?0:setTimeout(i,j)}var j=30,h=a.UA,c=a.Loader.Utils,g=0,n={};c.pollCss=function(a,d){var c;c=n[a.href]={};c.node=a;c.callback=d;g||i()};c.isCssLoaded=f})(KISSY); -(function(a){var f=a.Env.host.document,i=a.Loader.Utils,j=a.Path,h={},c,g=a.UA;a.getScript=function(n,b,d){function l(){var a=q.readyState;if(!a||"loaded"===a||"complete"===a)q.onreadystatechange=q.onload=null,s(0)}var e=b,o=0,k,m,u,t;a.startsWith(j.extname(n).toLowerCase(),".css")&&(o=1);a.isPlainObject(e)&&(b=e.success,k=e.error,m=e.timeout,d=e.charset,u=e.attrs);e=h[n]=h[n]||[];e.push([b,k]);if(1g.webkit;o&&d&&b&&(b=!1);b?(q.onload=l,q.onerror=function(){q.onerror=null;s(1)}):o?i.pollCss(q,function(){s(0)}):q.onreadystatechange=l;m&&(t=a.later(function(){s(1)},1E3*m));c||(c=i.docHead());o?c.appendChild(q):c.insertBefore(q,c.firstChild);return q}})(KISSY); -(function(a,f){function i(b){b=b.replace(/\\/g,"/");"/"!==b.charAt(b.length-1)&&(b+="/");g?b=g.resolve(b):(a.startsWith(b,"file:")||(b="file:"+b),b=new a.Uri(b));return b}var j=a.Loader,h=j.Utils,c=a.Env.host.location,g,n,b=a.Config.fns;if(!a.UA.nodejs&&c&&(n=c.href))g=new a.Uri(n);a.Config.loadModsFn=function(b,c){a.getScript(b.fullpath,c)};b.packages=function(b){var c,e=this.Config,g=e.packages=e.packages||{};return b?(a.each(b,function(b,d){c=b.name||d;var e=i(b.base||b.path);b.name=c;b.base=e.toString(); -b.baseUri=e;b.runtime=a;delete b.path;g[c]?g[c].reset(b):g[c]=new j.Package(b)}),f):!1===b?(e.packages={},f):g};b.modules=function(b){var c=this;b&&a.each(b,function(b,d){var f=h.createModuleInfo(c,d,b);f.status===j.Status.INIT&&a.mix(f,b)})};b.base=function(a){var b=this.Config;if(!a)return b.base;a=i(a);b.base=a.toString();b.baseUri=a;return f}})(KISSY); -(function(a,f){function i(b,c,e,h,l){var i=c&&c.length,j=[],k=[];a.each(c,function(c){var r,m={timeout:l,success:function(){k.push(c);r&&t&&(d.registerModule(b,r.name,t.factory,t.config),t=f);--i||e(k,j)},error:function(){j.push(c);--i||e(k,j)},charset:h};c.combine||(r=c.mods[0],"css"===r.getType()?r=f:g&&(q=r.name,a.now(),m.attrs={"data-mod-name":r.name}));a.Config.loadModsFn(c,m)})}function j(b,c){a.mix(this,{runtime:b,waitingModules:c})}function h(a,b){if(!a&&"function"===typeof b&&1a.UA.ieMode,n=a.Loader,b=n.Status,d=n.Utils,l=d.getHash,e=b.LOADING,o=b.LOADED,k=b.READY_TO_ATTACH,m=b.ERROR,u=a.now();j.groupTag=u;var t,q;j.add=function(b,c,e,l,i){if(3===i&&a.isArray(c))var j=c,c=e,e={requires:j,cjs:1};if("function"===typeof b|| -1===i)if(e=c,c=b,e=h(e,c),g){for(var b=a.Env.host.document.getElementsByTagName("script"),k,i=b.length-1;0<=i;i--)if(j=b[i],"interactive"===j.readyState){k=j;break}b=k?k.getAttribute("data-mod-name"):q;d.registerModule(l,b,c,e);q=null}else t={factory:c,config:e};else g?q=null:t=f,e=h(e,c),d.registerModule(l,b,c,e)};a.augment(j,{use:function(b){var c=a.Config.timeout,e=this.runtime,b=a.keys(this.calculate(b));d.createModulesInfo(e,b);b=this.getComboUrls(b);a.each(b.css,function(b){i(e,b,function(b, -c){a.each(b,function(b){a.each(b.mods,function(b){d.registerModule(e,b.name,a.noop);b.notifyAll()})});a.each(c,function(b){a.each(b.mods,function(a){a.status=m;a.notifyAll()})})},b.charset,c)});a.each(b.js,function(b){i(e,b,function(){a.each(b,function(b){a.each(b.mods,function(a){a.factory||(a.status=m);a.notifyAll()})})},b.charset,c)})},calculate:function(a,b,c){var f,g,h,i,l=this.waitingModules,j=this.runtime,c=c||{},b=b||{};for(f=0;f=k||(i!==o&&!l.contains(g)&&(i!==e&&(h.status=e,c[g]=1),h.wait(function(a){l.remove(a.name);l.notifyAll()}),l.add(g)),this.calculate(h.getNormalizedRequires(),b,c)));return c},getComboMods:function(b,e){for(var f={},g,h=this.runtime,i=0,l=b.length,j,k,m,n,q,o,t,F,H;ie||o+j.join(d).length+n>b)j.pop(),k.pop(),I(),j=[],k=[],B--}else z.push({combine:0,fullpath:C,mods:[A]})}j.length&& -I()}}return g}});n.ComboLoader=j})(KISSY); -(function(a,f){function i(b){a.mix(this,{fn:b,waitMods:{}})}var j=a.Loader,h=a.Env,c=j.Utils,g=a.setImmediate,n=j.ComboLoader;i.prototype={constructor:i,notifyAll:function(){var b=this.fn;b&&a.isEmptyObject(this.waitMods)&&(this.fn=null,b())},add:function(a){this.waitMods[a]=1},remove:function(a){delete this.waitMods[a]},contains:function(a){return this.waitMods[a]}};j.WaitingModules=i;a.mix(a,{add:function(b,c,f){n.add(b,c,f,a,arguments.length)},use:function(b,d){function h(){++u;var b=[];a.now(); -c.checkModsLoadRecursively(e,a,f,b)?(c.attachModsRecursively(e,a),d&&(m?t():g(t))):b.length?k&&(m?k.apply(a,b):g(function(){k.apply(a,b)})):(q.fn=h,j.use(e))}var e,j,k,m,u=0,t,q=new i(h);a.isPlainObject(d)&&(m=d.sync,k=d.error,d=d.success);t=function(){d.apply(a,c.getModules(a,b))};b=c.getModNamesAsArray(b);b=c.normalizeModNamesWithAlias(a,b);e=c.unalias(a,b);j=new n(a,q);m?q.notifyAll():g(function(){q.notifyAll()});return a},require:function(b,d){if(b){var f=c.unalias(a,c.normalizeModNamesWithAlias(a, -[b],d));c.attachModsRecursively(f,a);return c.getModules(a,f)[1]}}});h.mods={}})(KISSY); -(function(a){function f(f){var e=f.src||"";if(!e.match(d))return 0;var f=(f=f.getAttribute("data-config"))?(new Function("return "+f))():{},i=f.comboPrefix||g,j=f.comboSep||n,m,u=e.indexOf(i);-1===u?m=e.replace(b,"$1"):(m=e.substring(0,u),"/"!==m.charAt(m.length-1)&&(m+="/"),i=e.substring(u+i.length).split(j),a.each(i,function(a){if(a.match(d))return m+=a.replace(b,"$1"),!1}));"tag"in f||(i=e.lastIndexOf("?t="),-1!==i&&(e=e.substring(i+1),f.tag=h.getHash(c+e)));f.base=f.base||m;return f}function i(){var a= -j.getElementsByTagName("script"),b,c;for(b=a.length-1;0<=b;b--)if(c=f(a[b]))return c;return null}var j=a.Env.host&&a.Env.host.document,h=a.Loader.Utils,c="20140522123037",g="??",n=",",b=/^(.*)(seed|kissy)(?:-min)?\.js[^/]*/i,d=/(seed|kissy)(?:-min)?\.js/i;a.config({comboPrefix:g,comboSep:n,charset:"utf-8",lang:"zh-cn"});a.UA.nodejs?a.config({charset:"utf-8",base:__dirname.replace(/\\/g,"/").replace(/\/$/,"")+"/"}):j&&j.getElementsByTagName&&a.config(a.mix({comboMaxUrlLength:2E3,comboMaxFileNum:40},i()))})(KISSY); +a)})},getNormalizedRequires:function(){var a,d=this.normalizedRequiresStatus,c=this.status,e=this.requires;if(!e||0===e.length)return e||[];if((a=this.normalizedRequires)&&d===c)return a;this.normalizedRequiresStatus=c;return this.normalizedRequires=g.normalizeModNames(this.runtime,e,this.name)}};j.Module=k;var n=new h({name:"",runtime:a})})(KISSY); +(function(a){function f(a){var d=0;if(j.webkit)a.sheet&&(d=1);else if(a.sheet)try{a.sheet.cssRules&&(d=1)}catch(c){"NS_ERROR_DOM_SECURITY_ERR"===c.name&&(d=1)}return d}function h(){for(var b in n){var d=n[b],c=d.node;f(c,b)&&(d.callback&&d.callback.call(c),delete n[b])}g=a.isEmptyObject(n)?0:setTimeout(h,k)}var k=30,j=a.UA,c=a.Loader.Utils,g=0,n={};c.pollCss=function(a,d){var c;c=n[a.href]={};c.node=a;c.callback=d;g||h()};c.isCssLoaded=f})(KISSY); +(function(a){var f=a.Env.host.document,h=a.Loader.Utils,k=a.Path,j={},c,g=a.UA;a.getScript=function(n,b,d){function i(){var a=p.readyState;if(!a||"loaded"===a||"complete"===a)p.onreadystatechange=p.onload=null,r(0)}var e=b,o=0,l,m,t,s;a.startsWith(k.extname(n).toLowerCase(),".css")&&(o=1);a.isPlainObject(e)&&(b=e.success,l=e.error,m=e.timeout,d=e.charset,t=e.attrs);e=j[n]=j[n]||[];e.push([b,l]);if(1g.webkit;o&&d&&b&&(b=!1);b?(p.onload=i,p.onerror=function(){p.onerror=null;r(1)}):o?h.pollCss(p,function(){r(0)}):p.onreadystatechange=i;m&&(s=a.later(function(){r(1)},1E3*m));c||(c=h.docHead());o?c.appendChild(p):c.insertBefore(p,c.firstChild);return p}})(KISSY); +(function(a,f){function h(b){b=b.replace(/\\/g,"/");"/"!==b.charAt(b.length-1)&&(b+="/");g?b=g.resolve(b):(a.startsWith(b,"file:")||(b="file:"+b),b=new a.Uri(b));return b}var k=a.Loader,j=k.Utils,c=a.Env.host.location,g,n,b=a.Config.fns;if(!a.UA.nodejs&&c&&(n=c.href))g=new a.Uri(n);a.Config.loadModsFn=function(b,c){a.getScript(b.fullpath,c)};b.packages=function(b){var c,e=this.Config,g=e.packages=e.packages||{};return b?(a.each(b,function(b,d){c=b.name||d;var e=h(b.base||b.path);b.name=c;b.base=e.toString(); +b.baseUri=e;b.runtime=a;delete b.path;g[c]?g[c].reset(b):g[c]=new k.Package(b)}),f):!1===b?(e.packages={},f):g};b.modules=function(b){var c=this;b&&a.each(b,function(b,d){var f=j.createModuleInfo(c,d,b);f.status===k.Status.INIT&&a.mix(f,b)})};b.base=function(a){var b=this.Config;if(!a)return b.base;a=h(a);b.base=a.toString();b.baseUri=a;return f}})(KISSY); +(function(a,f){function h(b,c,e,i,h){var j=c&&c.length,k=[],l=[];a.each(c,function(c){var q,m={timeout:h,success:function(){l.push(c);q&&s&&(d.registerModule(b,q.name,s.factory,s.config),s=f);--j||e(l,k)},error:function(){k.push(c);--j||e(l,k)},charset:i};c.combine||(q=c.mods[0],"css"===q.getType()?q=f:g&&(p=q.name,a.now(),m.attrs={"data-mod-name":q.name}));a.Config.loadModsFn(c,m)})}function k(b,c){a.mix(this,{runtime:b,waitingModules:c})}function j(a,b){if(!a&&"function"===typeof b&&1a.UA.ieMode,n=a.Loader,b=n.Status,d=n.Utils,i=d.getHash,e=b.LOADING,o=b.LOADED,l=b.READY_TO_ATTACH,m=b.ERROR,t=a.now();k.groupTag=t;var s,p;k.add=function(b,c,e,i,h){if(3===h&&a.isArray(c))var k=c,c=e,e={requires:k,cjs:1};if("function"===typeof b|| +1===h)if(e=c,c=b,e=j(e,c),g){for(var b=a.Env.host.document.getElementsByTagName("script"),l,h=b.length-1;0<=h;h--)if(k=b[h],"interactive"===k.readyState){l=k;break}b=l?l.getAttribute("data-mod-name"):p;d.registerModule(i,b,c,e);p=null}else s={factory:c,config:e};else g?p=null:s=f,e=j(e,c),d.registerModule(i,b,c,e)};a.augment(k,{use:function(b){var c=a.Config.timeout,e=this.runtime,b=a.keys(this.calculate(b));d.createModulesInfo(e,b);b=this.getComboUrls(b);a.each(b.css,function(b){h(e,b,function(b, +c){a.each(b,function(b){a.each(b.mods,function(b){d.registerModule(e,b.name,a.noop);b.notifyAll()})});a.each(c,function(b){a.each(b.mods,function(a){a.status=m;a.notifyAll()})})},b.charset,c)});a.each(b.js,function(b){h(e,b,function(){a.each(b,function(b){a.each(b.mods,function(a){a.factory||(a.status=m);a.notifyAll()})})},b.charset,c)})},calculate:function(a,b,c){var f,g,i,h,j=this.waitingModules,k=this.runtime,c=c||{},b=b||{};for(f=0;f=l||(h!==o&&!j.contains(g)&&(h!==e&&(i.status=e,c[g]=1),i.wait(function(a){j.remove(a.name);j.notifyAll()}),j.add(g)),this.calculate(i.getNormalizedRequires(),b,c)));return c},getComboMods:function(b,e){for(var f={},g,i=this.runtime,h=0,j=b.length,k,l,m,n,p,o,s,G,I;he||o+k.join(d).length+n>b)k.pop(),l.pop(),J(),k=[],l=[],C--}else A.push({combine:0,fullpath:D,mods:[B]})}k.length&& +J()}}return g}});n.ComboLoader=k})(KISSY); +(function(a,f){function h(b){a.mix(this,{fn:b,waitMods:{}})}var k=a.Loader,j=a.Env,c=k.Utils,g=a.setImmediate,n=k.ComboLoader;h.prototype={constructor:h,notifyAll:function(){var b=this.fn;b&&a.isEmptyObject(this.waitMods)&&(this.fn=null,b())},add:function(a){this.waitMods[a]=1},remove:function(a){delete this.waitMods[a]},contains:function(a){return this.waitMods[a]}};k.WaitingModules=h;a.mix(a,{add:function(b,c,f){n.add(b,c,f,a,arguments.length)},use:function(b,d){function i(){++t;var b=[];a.now(); +c.checkModsLoadRecursively(e,a,f,b)?(c.attachModsRecursively(e,a),d&&(m?s():g(s))):b.length?k&&(m?k.apply(a,b):g(function(){k.apply(a,b)})):(p.fn=i,j.use(e))}var e,j,k,m,t=0,s,p=new h(i);a.isPlainObject(d)&&(m=d.sync,k=d.error,d=d.success);s=function(){d.apply(a,c.getModules(a,b))};b=c.getModNamesAsArray(b);b=c.normalizeModNamesWithAlias(a,b);e=c.unalias(a,b);j=new n(a,p);m?p.notifyAll():g(function(){p.notifyAll()});return a},require:function(b,d){if(b){var f=c.unalias(a,c.normalizeModNamesWithAlias(a, +[b],d));c.attachModsRecursively(f,a);return c.getModules(a,f)[1]}}});j.mods={}})(KISSY); +(function(a){function f(f){var e=f.src||"";if(!e.match(d))return 0;var f=(f=f.getAttribute("data-config"))?(new Function("return "+f))():{},h=f.comboPrefix||g,k=f.comboSep||n,m,t=e.indexOf(h);-1===t?m=e.replace(b,"$1"):(m=e.substring(0,t),"/"!==m.charAt(m.length-1)&&(m+="/"),h=e.substring(t+h.length).split(k),a.each(h,function(a){if(a.match(d))return m+=a.replace(b,"$1"),!1}));"tag"in f||(h=e.lastIndexOf("?t="),-1!==h&&(e=e.substring(h+1),f.tag=j.getHash(c+e)));f.base=f.base||m;return f}function h(){var a= +k.getElementsByTagName("script"),b,c;for(b=a.length-1;0<=b;b--)if(c=f(a[b]))return c;return null}var k=a.Env.host&&a.Env.host.document,j=a.Loader.Utils,c="20140610151400",g="??",n=",",b=/^(.*)(seed|kissy)(?:-min)?\.js[^/]*/i,d=/(seed|kissy)(?:-min)?\.js/i;a.config({comboPrefix:g,comboSep:n,charset:"utf-8",lang:"zh-cn"});a.UA.nodejs?a.config({charset:"utf-8",base:__dirname.replace(/\\/g,"/").replace(/\/$/,"")+"/"}):k&&k.getElementsByTagName&&a.config(a.mix({comboMaxUrlLength:2E3,comboMaxFileNum:40},h()))})(KISSY); KISSY.add("i18n",{alias:function(a,f){return f+"/i18n/"+a.Config.lang}}); -(function(a,f){function i(){if(!b){c&&!h.nodejs&&u(j,k,i);b=1;for(var e=0;ef.ieMode&&(j=null);if(j)a.add("json",function(){return a.JSON=j}),a.parseJson=function(a){return j.parse(a)};else{var h=/^[\],:{}\s]*$/,c=/(?:^|:|,)(?:\s*\[)+/g,g=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,n=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;a.parseJson=function(b){return null=== -b?b:"string"===typeof b&&(b=a.trim(b))&&h.test(b.replace(g,"@").replace(n,"]").replace(c,""))?(new Function("return "+b))():a.error("Invalid Json: "+b)}}a.UA.nodejs&&(a.KISSY=a,module.exports=a)})(KISSY); +(function(a){a.add("ua",function(){return a.UA});a.add("uri",function(){return a.Uri});a.add("path",function(){return a.Path});var f=a.UA,h=a.Env.host,k=(f.nodejs&&"object"===typeof global?global:h).JSON;9>f.ieMode&&(k=null);if(k)a.add("json",function(){return a.JSON=k}),a.parseJson=function(a){return k.parse(a)};else{var j=/^[\],:{}\s]*$/,c=/(?:^|:|,)(?:\s*\[)+/g,g=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,n=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;a.parseJson=function(b){return null=== +b?b:"string"===typeof b&&(b=a.trim(b))&&j.test(b.replace(g,"@").replace(n,"]").replace(c,""))?(new Function("return "+b))():a.error("Invalid Json: "+b)}}a.UA.nodejs&&(a.KISSY=a,module.exports=a)})(KISSY); diff --git a/build/seed.js b/build/seed.js index 6b4e1c0c6a..09b32f1f4e 100644 --- a/build/seed.js +++ b/build/seed.js @@ -1,7 +1,7 @@ /* Copyright 2014, KISSY v1.44 MIT Licensed -build time: May 22 12:30 +build time: Jun 10 15:14 */ /** * @ignore @@ -87,11 +87,11 @@ var KISSY = (function (undefined) { S = { /** * The build time of the library. - * NOTICE: '20140522123037' will replace with current timestamp when compressing. + * NOTICE: '20140610151400' will replace with current timestamp when compressing. * @private * @type {String} */ - __BUILD_TIME: '20140522123037', + __BUILD_TIME: '20140610151400', /** * KISSY Environment. @@ -118,10 +118,10 @@ var KISSY = (function (undefined) { /** * The version of the library. - * NOTICE: '1.43' will replace with current version when compressing. + * NOTICE: '1.44' will replace with current version when compressing. * @type {String} */ - version:'1.44', + version: '1.44', /** * set KISSY configuration @@ -3401,13 +3401,18 @@ var KISSY = (function (undefined) { // https://gist.github.com/lorenzopolidori/3794226 // ie9 does not support 3d transform // http://msdn.microsoft.com/en-us/ie/ff468705 - var el = doc.createElement('p'); - documentElement.insertBefore(el, documentElement.firstChild); - el.style[transformProperty] = 'translate3d(1px,1px,1px)'; - var computedStyle = win.getComputedStyle(el); - var has3d = computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]; - documentElement.removeChild(el); - isTransform3dSupported = (has3d !== undefined && has3d.length > 0 && has3d !== 'none'); + try { + var el = doc.createElement('p'); + documentElement.insertBefore(el, documentElement.firstChild); + el.style[transformProperty] = 'translate3d(1px,1px,1px)'; + var computedStyle = win.getComputedStyle(el); + var has3d = computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]; + documentElement.removeChild(el); + isTransform3dSupported = (has3d !== undefined && has3d.length > 0 && has3d !== 'none'); + }catch (e){ + // https://github.com/kissyteam/kissy/issues/563 + isTransform3dSupported = true; + } } } @@ -5589,7 +5594,7 @@ var KISSY = (function (undefined) { var doc = S.Env.host && S.Env.host.document; // var logger = S.getLogger('s/loader'); var Utils = S.Loader.Utils; - var TIMESTAMP = '20140522123037'; + var TIMESTAMP = '20140610151400'; var defaultComboPrefix = '??'; var defaultComboSep = ','; diff --git a/src/seed/coverage/src/features.js b/src/seed/coverage/src/features.js index 915422e40a..74d8061a31 100644 --- a/src/seed/coverage/src/features.js +++ b/src/seed/coverage/src/features.js @@ -255,38 +255,40 @@ if (! _$jscoverage['/features.js']) { _$jscoverage['/features.js'].lineData[72] = 0; _$jscoverage['/features.js'].lineData[73] = 0; _$jscoverage['/features.js'].lineData[74] = 0; + _$jscoverage['/features.js'].lineData[75] = 0; _$jscoverage['/features.js'].lineData[78] = 0; - _$jscoverage['/features.js'].lineData[80] = 0; - _$jscoverage['/features.js'].lineData[81] = 0; - _$jscoverage['/features.js'].lineData[82] = 0; + _$jscoverage['/features.js'].lineData[83] = 0; _$jscoverage['/features.js'].lineData[85] = 0; _$jscoverage['/features.js'].lineData[86] = 0; + _$jscoverage['/features.js'].lineData[87] = 0; + _$jscoverage['/features.js'].lineData[90] = 0; _$jscoverage['/features.js'].lineData[91] = 0; - _$jscoverage['/features.js'].lineData[95] = 0; _$jscoverage['/features.js'].lineData[96] = 0; - _$jscoverage['/features.js'].lineData[97] = 0; - _$jscoverage['/features.js'].lineData[98] = 0; - _$jscoverage['/features.js'].lineData[105] = 0; + _$jscoverage['/features.js'].lineData[100] = 0; + _$jscoverage['/features.js'].lineData[101] = 0; + _$jscoverage['/features.js'].lineData[102] = 0; + _$jscoverage['/features.js'].lineData[103] = 0; _$jscoverage['/features.js'].lineData[110] = 0; - _$jscoverage['/features.js'].lineData[119] = 0; - _$jscoverage['/features.js'].lineData[127] = 0; - _$jscoverage['/features.js'].lineData[136] = 0; - _$jscoverage['/features.js'].lineData[144] = 0; - _$jscoverage['/features.js'].lineData[148] = 0; - _$jscoverage['/features.js'].lineData[156] = 0; - _$jscoverage['/features.js'].lineData[167] = 0; - _$jscoverage['/features.js'].lineData[175] = 0; - _$jscoverage['/features.js'].lineData[183] = 0; - _$jscoverage['/features.js'].lineData[191] = 0; - _$jscoverage['/features.js'].lineData[199] = 0; - _$jscoverage['/features.js'].lineData[208] = 0; - _$jscoverage['/features.js'].lineData[218] = 0; - _$jscoverage['/features.js'].lineData[226] = 0; - _$jscoverage['/features.js'].lineData[234] = 0; - _$jscoverage['/features.js'].lineData[242] = 0; - _$jscoverage['/features.js'].lineData[250] = 0; - _$jscoverage['/features.js'].lineData[254] = 0; - _$jscoverage['/features.js'].lineData[258] = 0; + _$jscoverage['/features.js'].lineData[115] = 0; + _$jscoverage['/features.js'].lineData[124] = 0; + _$jscoverage['/features.js'].lineData[132] = 0; + _$jscoverage['/features.js'].lineData[141] = 0; + _$jscoverage['/features.js'].lineData[149] = 0; + _$jscoverage['/features.js'].lineData[153] = 0; + _$jscoverage['/features.js'].lineData[161] = 0; + _$jscoverage['/features.js'].lineData[172] = 0; + _$jscoverage['/features.js'].lineData[180] = 0; + _$jscoverage['/features.js'].lineData[188] = 0; + _$jscoverage['/features.js'].lineData[196] = 0; + _$jscoverage['/features.js'].lineData[204] = 0; + _$jscoverage['/features.js'].lineData[213] = 0; + _$jscoverage['/features.js'].lineData[223] = 0; + _$jscoverage['/features.js'].lineData[231] = 0; + _$jscoverage['/features.js'].lineData[239] = 0; + _$jscoverage['/features.js'].lineData[247] = 0; + _$jscoverage['/features.js'].lineData[255] = 0; + _$jscoverage['/features.js'].lineData[259] = 0; + _$jscoverage['/features.js'].lineData[263] = 0; } if (! _$jscoverage['/features.js'].functionData) { _$jscoverage['/features.js'].functionData = []; @@ -334,118 +336,118 @@ if (! _$jscoverage['/features.js'].branchData) { _$jscoverage['/features.js'].branchData['60'][1] = new BranchData(); _$jscoverage['/features.js'].branchData['64'] = []; _$jscoverage['/features.js'].branchData['64'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['72'] = []; - _$jscoverage['/features.js'].branchData['72'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['74'] = []; - _$jscoverage['/features.js'].branchData['74'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['74'][2] = new BranchData(); - _$jscoverage['/features.js'].branchData['74'][3] = new BranchData(); - _$jscoverage['/features.js'].branchData['74'][4] = new BranchData(); - _$jscoverage['/features.js'].branchData['74'][5] = new BranchData(); - _$jscoverage['/features.js'].branchData['81'] = []; - _$jscoverage['/features.js'].branchData['81'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['85'] = []; - _$jscoverage['/features.js'].branchData['85'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['97'] = []; - _$jscoverage['/features.js'].branchData['97'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['105'] = []; - _$jscoverage['/features.js'].branchData['105'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['148'] = []; - _$jscoverage['/features.js'].branchData['148'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['148'][2] = new BranchData(); - _$jscoverage['/features.js'].branchData['167'] = []; - _$jscoverage['/features.js'].branchData['167'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['167'][2] = new BranchData(); - _$jscoverage['/features.js'].branchData['167'][3] = new BranchData(); - _$jscoverage['/features.js'].branchData['175'] = []; - _$jscoverage['/features.js'].branchData['175'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['183'] = []; - _$jscoverage['/features.js'].branchData['183'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['208'] = []; - _$jscoverage['/features.js'].branchData['208'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['218'] = []; - _$jscoverage['/features.js'].branchData['218'][1] = new BranchData(); - _$jscoverage['/features.js'].branchData['218'][2] = new BranchData(); + _$jscoverage['/features.js'].branchData['73'] = []; + _$jscoverage['/features.js'].branchData['73'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['75'] = []; + _$jscoverage['/features.js'].branchData['75'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['75'][2] = new BranchData(); + _$jscoverage['/features.js'].branchData['75'][3] = new BranchData(); + _$jscoverage['/features.js'].branchData['75'][4] = new BranchData(); + _$jscoverage['/features.js'].branchData['75'][5] = new BranchData(); + _$jscoverage['/features.js'].branchData['86'] = []; + _$jscoverage['/features.js'].branchData['86'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['90'] = []; + _$jscoverage['/features.js'].branchData['90'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['102'] = []; + _$jscoverage['/features.js'].branchData['102'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['110'] = []; + _$jscoverage['/features.js'].branchData['110'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['153'] = []; + _$jscoverage['/features.js'].branchData['153'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['153'][2] = new BranchData(); + _$jscoverage['/features.js'].branchData['172'] = []; + _$jscoverage['/features.js'].branchData['172'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['172'][2] = new BranchData(); + _$jscoverage['/features.js'].branchData['172'][3] = new BranchData(); + _$jscoverage['/features.js'].branchData['180'] = []; + _$jscoverage['/features.js'].branchData['180'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['188'] = []; + _$jscoverage['/features.js'].branchData['188'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['213'] = []; + _$jscoverage['/features.js'].branchData['213'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['223'] = []; + _$jscoverage['/features.js'].branchData['223'][1] = new BranchData(); + _$jscoverage['/features.js'].branchData['223'][2] = new BranchData(); } -_$jscoverage['/features.js'].branchData['218'][2].init(29, 6, 'ie < v'); -function visit40_218_2(result) { - _$jscoverage['/features.js'].branchData['218'][2].ranCondition(result); +_$jscoverage['/features.js'].branchData['223'][2].init(29, 6, 'ie < v'); +function visit40_223_2(result) { + _$jscoverage['/features.js'].branchData['223'][2].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['218'][1].init(23, 12, 'ie && ie < v'); -function visit39_218_1(result) { - _$jscoverage['/features.js'].branchData['218'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['223'][1].init(23, 12, 'ie && ie < v'); +function visit39_223_1(result) { + _$jscoverage['/features.js'].branchData['223'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['208'][1].init(67, 74, '!S.config(\'dom/selector\') && isQuerySelectorSupportedState'); -function visit38_208_1(result) { - _$jscoverage['/features.js'].branchData['208'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['213'][1].init(67, 74, '!S.config(\'dom/selector\') && isQuerySelectorSupportedState'); +function visit38_213_1(result) { + _$jscoverage['/features.js'].branchData['213'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['183'][1].init(20, 29, 'transformPrefix !== undefined'); -function visit37_183_1(result) { - _$jscoverage['/features.js'].branchData['183'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['188'][1].init(20, 29, 'transformPrefix !== undefined'); +function visit37_188_1(result) { + _$jscoverage['/features.js'].branchData['188'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['175'][1].init(20, 30, 'transitionPrefix !== undefined'); -function visit36_175_1(result) { - _$jscoverage['/features.js'].branchData['175'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['180'][1].init(20, 30, 'transitionPrefix !== undefined'); +function visit36_180_1(result) { + _$jscoverage['/features.js'].branchData['180'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['167'][3].init(193, 6, 'ie > 7'); -function visit35_167_3(result) { - _$jscoverage['/features.js'].branchData['167'][3].ranCondition(result); +}_$jscoverage['/features.js'].branchData['172'][3].init(193, 6, 'ie > 7'); +function visit35_172_3(result) { + _$jscoverage['/features.js'].branchData['172'][3].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['167'][2].init(186, 13, '!ie || ie > 7'); -function visit34_167_2(result) { - _$jscoverage['/features.js'].branchData['167'][2].ranCondition(result); +}_$jscoverage['/features.js'].branchData['172'][2].init(186, 13, '!ie || ie > 7'); +function visit34_172_2(result) { + _$jscoverage['/features.js'].branchData['172'][2].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['167'][1].init(159, 41, '(\'onhashchange\' in win) && (!ie || ie > 7)'); -function visit33_167_1(result) { - _$jscoverage['/features.js'].branchData['167'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['172'][1].init(159, 41, '(\'onhashchange\' in win) && (!ie || ie > 7)'); +function visit33_172_1(result) { + _$jscoverage['/features.js'].branchData['172'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['148'][2].init(50, 42, 'isPointerSupported || isMsPointerSupported'); -function visit32_148_2(result) { - _$jscoverage['/features.js'].branchData['148'][2].ranCondition(result); +}_$jscoverage['/features.js'].branchData['153'][2].init(50, 42, 'isPointerSupported || isMsPointerSupported'); +function visit32_153_2(result) { + _$jscoverage['/features.js'].branchData['153'][2].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['148'][1].init(20, 72, 'isTouchEventSupportedState || isPointerSupported || isMsPointerSupported'); -function visit31_148_1(result) { - _$jscoverage['/features.js'].branchData['148'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['153'][1].init(20, 72, 'isTouchEventSupportedState || isPointerSupported || isMsPointerSupported'); +function visit31_153_1(result) { + _$jscoverage['/features.js'].branchData['153'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['105'][1].init(502, 94, 'vendorInfos[name] || {\n name: name, \n prefix: false}'); -function visit30_105_1(result) { - _$jscoverage['/features.js'].branchData['105'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['110'][1].init(502, 94, 'vendorInfos[name] || {\n name: name, \n prefix: false}'); +function visit30_110_1(result) { + _$jscoverage['/features.js'].branchData['110'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['97'][1].init(79, 34, 'vendorName in documentElementStyle'); -function visit29_97_1(result) { - _$jscoverage['/features.js'].branchData['97'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['102'][1].init(79, 34, 'vendorName in documentElementStyle'); +function visit29_102_1(result) { + _$jscoverage['/features.js'].branchData['102'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['85'][1].init(147, 53, '!documentElementStyle || name in documentElementStyle'); -function visit28_85_1(result) { - _$jscoverage['/features.js'].branchData['85'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['90'][1].init(147, 53, '!documentElementStyle || name in documentElementStyle'); +function visit28_90_1(result) { + _$jscoverage['/features.js'].branchData['90'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['81'][1].init(13, 17, 'vendorInfos[name]'); -function visit27_81_1(result) { - _$jscoverage['/features.js'].branchData['81'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['86'][1].init(13, 17, 'vendorInfos[name]'); +function visit27_86_1(result) { + _$jscoverage['/features.js'].branchData['86'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['74'][5].init(656, 16, 'has3d !== \'none\''); -function visit26_74_5(result) { - _$jscoverage['/features.js'].branchData['74'][5].ranCondition(result); +}_$jscoverage['/features.js'].branchData['75'][5].init(513, 16, 'has3d !== \'none\''); +function visit26_75_5(result) { + _$jscoverage['/features.js'].branchData['75'][5].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['74'][4].init(636, 16, 'has3d.length > 0'); -function visit25_74_4(result) { - _$jscoverage['/features.js'].branchData['74'][4].ranCondition(result); +}_$jscoverage['/features.js'].branchData['75'][4].init(493, 16, 'has3d.length > 0'); +function visit25_75_4(result) { + _$jscoverage['/features.js'].branchData['75'][4].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['74'][3].init(636, 36, 'has3d.length > 0 && has3d !== \'none\''); -function visit24_74_3(result) { - _$jscoverage['/features.js'].branchData['74'][3].ranCondition(result); +}_$jscoverage['/features.js'].branchData['75'][3].init(493, 36, 'has3d.length > 0 && has3d !== \'none\''); +function visit24_75_3(result) { + _$jscoverage['/features.js'].branchData['75'][3].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['74'][2].init(613, 19, 'has3d !== undefined'); -function visit23_74_2(result) { - _$jscoverage['/features.js'].branchData['74'][2].ranCondition(result); +}_$jscoverage['/features.js'].branchData['75'][2].init(470, 19, 'has3d !== undefined'); +function visit23_75_2(result) { + _$jscoverage['/features.js'].branchData['75'][2].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['74'][1].init(613, 59, 'has3d !== undefined && has3d.length > 0 && has3d !== \'none\''); -function visit22_74_1(result) { - _$jscoverage['/features.js'].branchData['74'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['75'][1].init(470, 59, 'has3d !== undefined && has3d.length > 0 && has3d !== \'none\''); +function visit22_75_1(result) { + _$jscoverage['/features.js'].branchData['75'][1].ranCondition(result); return result; -}_$jscoverage['/features.js'].branchData['72'][1].init(443, 85, 'computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]'); -function visit21_72_1(result) { - _$jscoverage['/features.js'].branchData['72'][1].ranCondition(result); +}_$jscoverage['/features.js'].branchData['73'][1].init(292, 85, 'computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]'); +function visit21_73_1(result) { + _$jscoverage['/features.js'].branchData['73'][1].ranCondition(result); return result; }_$jscoverage['/features.js'].branchData['64'][1].init(1063, 17, 'transformProperty'); function visit20_64_1(result) { @@ -536,150 +538,156 @@ function visit10_19_1(result) { _$jscoverage['/features.js'].lineData[64]++; if (visit20_64_1(transformProperty)) { _$jscoverage['/features.js'].lineData[68]++; - var el = doc.createElement('p'); - _$jscoverage['/features.js'].lineData[69]++; - documentElement.insertBefore(el, documentElement.firstChild); - _$jscoverage['/features.js'].lineData[70]++; - el.style[transformProperty] = 'translate3d(1px,1px,1px)'; - _$jscoverage['/features.js'].lineData[71]++; - var computedStyle = win.getComputedStyle(el); - _$jscoverage['/features.js'].lineData[72]++; - var has3d = visit21_72_1(computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]); - _$jscoverage['/features.js'].lineData[73]++; - documentElement.removeChild(el); - _$jscoverage['/features.js'].lineData[74]++; - isTransform3dSupported = (visit22_74_1(visit23_74_2(has3d !== undefined) && visit24_74_3(visit25_74_4(has3d.length > 0) && visit26_74_5(has3d !== 'none')))); + try { + _$jscoverage['/features.js'].lineData[69]++; + var el = doc.createElement('p'); + _$jscoverage['/features.js'].lineData[70]++; + documentElement.insertBefore(el, documentElement.firstChild); + _$jscoverage['/features.js'].lineData[71]++; + el.style[transformProperty] = 'translate3d(1px,1px,1px)'; + _$jscoverage['/features.js'].lineData[72]++; + var computedStyle = win.getComputedStyle(el); + _$jscoverage['/features.js'].lineData[73]++; + var has3d = visit21_73_1(computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]); + _$jscoverage['/features.js'].lineData[74]++; + documentElement.removeChild(el); + _$jscoverage['/features.js'].lineData[75]++; + isTransform3dSupported = (visit22_75_1(visit23_75_2(has3d !== undefined) && visit24_75_3(visit25_75_4(has3d.length > 0) && visit26_75_5(has3d !== 'none')))); + } catch (e) { + _$jscoverage['/features.js'].lineData[78]++; + isTransform3dSupported = true; +} } } - _$jscoverage['/features.js'].lineData[78]++; + _$jscoverage['/features.js'].lineData[83]++; var vendorInfos = {}; - _$jscoverage['/features.js'].lineData[80]++; + _$jscoverage['/features.js'].lineData[85]++; function getVendorInfo(name) { _$jscoverage['/features.js'].functionData[2]++; - _$jscoverage['/features.js'].lineData[81]++; - if (visit27_81_1(vendorInfos[name])) { - _$jscoverage['/features.js'].lineData[82]++; + _$jscoverage['/features.js'].lineData[86]++; + if (visit27_86_1(vendorInfos[name])) { + _$jscoverage['/features.js'].lineData[87]++; return vendorInfos[name]; } - _$jscoverage['/features.js'].lineData[85]++; - if (visit28_85_1(!documentElementStyle || name in documentElementStyle)) { - _$jscoverage['/features.js'].lineData[86]++; + _$jscoverage['/features.js'].lineData[90]++; + if (visit28_90_1(!documentElementStyle || name in documentElementStyle)) { + _$jscoverage['/features.js'].lineData[91]++; vendorInfos[name] = { name: name, prefix: ''}; } else { - _$jscoverage['/features.js'].lineData[91]++; + _$jscoverage['/features.js'].lineData[96]++; var upperFirstName = name.charAt(0).toUpperCase() + name.slice(1), vendorName, i = VENDORS.length; - _$jscoverage['/features.js'].lineData[95]++; + _$jscoverage['/features.js'].lineData[100]++; while (i--) { - _$jscoverage['/features.js'].lineData[96]++; + _$jscoverage['/features.js'].lineData[101]++; vendorName = VENDORS[i] + upperFirstName; - _$jscoverage['/features.js'].lineData[97]++; - if (visit29_97_1(vendorName in documentElementStyle)) { - _$jscoverage['/features.js'].lineData[98]++; + _$jscoverage['/features.js'].lineData[102]++; + if (visit29_102_1(vendorName in documentElementStyle)) { + _$jscoverage['/features.js'].lineData[103]++; vendorInfos[name] = { name: vendorName, prefix: VENDORS[i]}; } } - _$jscoverage['/features.js'].lineData[105]++; - vendorInfos[name] = visit30_105_1(vendorInfos[name] || { + _$jscoverage['/features.js'].lineData[110]++; + vendorInfos[name] = visit30_110_1(vendorInfos[name] || { name: name, prefix: false}); } - _$jscoverage['/features.js'].lineData[110]++; + _$jscoverage['/features.js'].lineData[115]++; return vendorInfos[name]; } - _$jscoverage['/features.js'].lineData[119]++; + _$jscoverage['/features.js'].lineData[124]++; S.Features = { isMsPointerSupported: function() { _$jscoverage['/features.js'].functionData[3]++; - _$jscoverage['/features.js'].lineData[127]++; + _$jscoverage['/features.js'].lineData[132]++; return isMsPointerSupported; }, isPointerSupported: function() { _$jscoverage['/features.js'].functionData[4]++; - _$jscoverage['/features.js'].lineData[136]++; + _$jscoverage['/features.js'].lineData[141]++; return isPointerSupported; }, isTouchEventSupported: function() { _$jscoverage['/features.js'].functionData[5]++; - _$jscoverage['/features.js'].lineData[144]++; + _$jscoverage['/features.js'].lineData[149]++; return isTouchEventSupportedState; }, isTouchGestureSupported: function() { _$jscoverage['/features.js'].functionData[6]++; - _$jscoverage['/features.js'].lineData[148]++; - return visit31_148_1(isTouchEventSupportedState || visit32_148_2(isPointerSupported || isMsPointerSupported)); + _$jscoverage['/features.js'].lineData[153]++; + return visit31_153_1(isTouchEventSupportedState || visit32_153_2(isPointerSupported || isMsPointerSupported)); }, isDeviceMotionSupported: function() { _$jscoverage['/features.js'].functionData[7]++; - _$jscoverage['/features.js'].lineData[156]++; + _$jscoverage['/features.js'].lineData[161]++; return !!win.DeviceMotionEvent; }, 'isHashChangeSupported': function() { _$jscoverage['/features.js'].functionData[8]++; - _$jscoverage['/features.js'].lineData[167]++; - return visit33_167_1(('onhashchange' in win) && (visit34_167_2(!ie || visit35_167_3(ie > 7)))); + _$jscoverage['/features.js'].lineData[172]++; + return visit33_172_1(('onhashchange' in win) && (visit34_172_2(!ie || visit35_172_3(ie > 7)))); }, 'isTransitionSupported': function() { _$jscoverage['/features.js'].functionData[9]++; - _$jscoverage['/features.js'].lineData[175]++; - return visit36_175_1(transitionPrefix !== undefined); + _$jscoverage['/features.js'].lineData[180]++; + return visit36_180_1(transitionPrefix !== undefined); }, 'isTransformSupported': function() { _$jscoverage['/features.js'].functionData[10]++; - _$jscoverage['/features.js'].lineData[183]++; - return visit37_183_1(transformPrefix !== undefined); + _$jscoverage['/features.js'].lineData[188]++; + return visit37_188_1(transformPrefix !== undefined); }, 'isTransform3dSupported': function() { _$jscoverage['/features.js'].functionData[11]++; - _$jscoverage['/features.js'].lineData[191]++; + _$jscoverage['/features.js'].lineData[196]++; return isTransform3dSupported; }, 'isClassListSupported': function() { _$jscoverage['/features.js'].functionData[12]++; - _$jscoverage['/features.js'].lineData[199]++; + _$jscoverage['/features.js'].lineData[204]++; return isClassListSupportedState; }, 'isQuerySelectorSupported': function() { _$jscoverage['/features.js'].functionData[13]++; - _$jscoverage['/features.js'].lineData[208]++; - return visit38_208_1(!S.config('dom/selector') && isQuerySelectorSupportedState); + _$jscoverage['/features.js'].lineData[213]++; + return visit38_213_1(!S.config('dom/selector') && isQuerySelectorSupportedState); }, 'isIELessThan': function(v) { _$jscoverage['/features.js'].functionData[14]++; - _$jscoverage['/features.js'].lineData[218]++; - return !!(visit39_218_1(ie && visit40_218_2(ie < v))); + _$jscoverage['/features.js'].lineData[223]++; + return !!(visit39_223_1(ie && visit40_223_2(ie < v))); }, 'getTransitionPrefix': function() { _$jscoverage['/features.js'].functionData[15]++; - _$jscoverage['/features.js'].lineData[226]++; + _$jscoverage['/features.js'].lineData[231]++; return transitionPrefix; }, 'getTransformPrefix': function() { _$jscoverage['/features.js'].functionData[16]++; - _$jscoverage['/features.js'].lineData[234]++; + _$jscoverage['/features.js'].lineData[239]++; return transformPrefix; }, 'getTransitionProperty': function() { _$jscoverage['/features.js'].functionData[17]++; - _$jscoverage['/features.js'].lineData[242]++; + _$jscoverage['/features.js'].lineData[247]++; return transitionProperty; }, 'getTransformProperty': function() { _$jscoverage['/features.js'].functionData[18]++; - _$jscoverage['/features.js'].lineData[250]++; + _$jscoverage['/features.js'].lineData[255]++; return transformProperty; }, getVendorCssPropPrefix: function(name) { _$jscoverage['/features.js'].functionData[19]++; - _$jscoverage['/features.js'].lineData[254]++; + _$jscoverage['/features.js'].lineData[259]++; return getVendorInfo(name).prefix; }, getVendorCssPropName: function(name) { _$jscoverage['/features.js'].functionData[20]++; - _$jscoverage['/features.js'].lineData[258]++; + _$jscoverage['/features.js'].lineData[263]++; return getVendorInfo(name).name; }}; })(KISSY); diff --git a/src/seed/src/features.js b/src/seed/src/features.js index 95f26011ac..5f85f49cf5 100644 --- a/src/seed/src/features.js +++ b/src/seed/src/features.js @@ -65,13 +65,18 @@ // https://gist.github.com/lorenzopolidori/3794226 // ie9 does not support 3d transform // http://msdn.microsoft.com/en-us/ie/ff468705 - var el = doc.createElement('p'); - documentElement.insertBefore(el, documentElement.firstChild); - el.style[transformProperty] = 'translate3d(1px,1px,1px)'; - var computedStyle = win.getComputedStyle(el); - var has3d = computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]; - documentElement.removeChild(el); - isTransform3dSupported = (has3d !== undefined && has3d.length > 0 && has3d !== 'none'); + try { + var el = doc.createElement('p'); + documentElement.insertBefore(el, documentElement.firstChild); + el.style[transformProperty] = 'translate3d(1px,1px,1px)'; + var computedStyle = win.getComputedStyle(el); + var has3d = computedStyle.getPropertyValue(transformProperty) || computedStyle[transformProperty]; + documentElement.removeChild(el); + isTransform3dSupported = (has3d !== undefined && has3d.length > 0 && has3d !== 'none'); + }catch (e){ + // https://github.com/kissyteam/kissy/issues/563 + isTransform3dSupported = true; + } } }