Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/third_party/jstemplate/jstemplate_compiled.js

Issue 7086003: Apply content-security-policy to chrome://plugins page. This involves (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/third_party/jstemplate/compile.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 (function(){function j(a,b){for(var c in b)a[c]=b[c]}function l(){return Functio n.prototype.call.apply(Array.prototype.slice,arguments)}function m(a,b){var c=l( arguments,2);return function(){return b.apply(a,c)}}var n=9;function o(a,b){b=ne w p(b);for(b.f=[a];b.f.length;){a=b.f.shift();b.g(a);for(a=a.firstChild;a;a=a.ne xtSibling)a.nodeType==1&&b.f.push(a)}}function p(a){this.g=a}function q(a,b,c){a .setAttribute(b,c)}function r(a,b){a.removeAttribute(b)}function s(a){a.style.di splay=""}
2 function t(a){a.style.display="none"};var u=":",v=/\s*;\s*/;function w(){this.i. apply(this,arguments)}w.prototype.i=function(a,b){var c=this;if(!c.a)c.a={};b?j( c.a,b.a):j(c.a,x);c.a.$this=a;c.a.$context=c;c.d=typeof a!="undefined"&&a!=null? a:"";if(!b)c.a.$top=c.d};var x={};(function(a,b){x[a]=b})("$default",null);var y =[];function z(a){for(var b in a.a)delete a.a[b];a.d=null;y.push(a)}function A(a ,b,c){try{return b.call(c,a.a,a.d)}catch(e){return x.$default}}
3 function B(a,b,c,e){if(y.length>0){var d=y.pop();w.call(d,b,a);a=d}else a=new w( b,a);a.a.$index=c;a.a.$count=e;return a}var C="a_",E="b_",F="with (a_) with (b_) return ",G={};function H(a){if(!G[a])try{G[a]=new Function(C,E,F+a)}catch(b){}r eturn G[a]}function I(a){return a}function J(a){var b=[];a=a.split(v);for(var c= 0,e=a.length;c<e;++c){var d=a[c].indexOf(u);if(!(d<0)){var f;f=a[c].substr(0,d). replace(/^\s+/,"").replace(/\s+$/,"");d=H(a[c].substr(d+1));b.push(f,d)}}return b}
4 function K(a){var b=[];a=a.split(v);for(var c=0,e=a.length;c<e;++c)if(a[c]){var d=H(a[c]);b.push(d)}return b};var L="jsinstance",aa="jsts",M="*",N="div",ba="id" ;function ca(a,b){var c=new O;P(b);c.j=b?b.nodeType==n?b:b.ownerDocument||docume nt:document;var e=m(c,c.e,a,b);a=c.h=[];b=c.k=[];c.c=[];e();for(var d,f,g;a.leng th;){d=a[a.length-1];e=b[b.length-1];if(e>=d.length){e=a.pop();e.length=0;c.c.pu sh(e);b.pop()}else{f=d[e++];g=d[e++];d=d[e++];b[b.length-1]=e;f.call(c,g,d)}}}fu nction O(){}var da=0,Q={};Q[0]={};var R={},S={},T=[];function P(a){a.__jstcache| |o(a,function(b){U(b)})}
5 var V=[["jsselect",H],["jsdisplay",H],["jsvalues",J],["jsvars",J],["jseval",K],[ "transclude",I],["jscontent",H],["jsskip",H]];
6 function U(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache ");if(b!=null)return a.__jstcache=Q[b];b=T.length=0;for(var c=V.length;b<c;++b){ var e=V[b][0],d=a.getAttribute(e);S[e]=d;d!=null&&T.push(e+"="+d)}if(T.length==0 ){a.setAttribute("jstcache","0");return a.__jstcache=Q[0]}var f=T.join("&");if(b =R[f]){a.setAttribute("jstcache",b);return a.__jstcache=Q[b]}var g={};b=0;for(c= V.length;b<c;++b){d=V[b];e=d[0];var i=d[1];d=S[e];if(d!=null)g[e]=i(d)}b=""+ ++d a;a.setAttribute("jstcache",
7 b);Q[b]=g;R[f]=b;return a.__jstcache=g}function W(a,b){a.h.push(b);a.k.push(0)}f unction X(a){return a.c.length?a.c.pop():[]}O.prototype.e=function(a,b){var c=th is,e=Y(c,b),d=e.transclude;if(d)if(e=Z(d)){b.parentNode.replaceChild(e,b);b=X(c) ;b.push(c.e,a,e);W(c,b)}else b.parentNode.removeChild(b);else(e=e.jsselect)?ea(c ,a,b,e):c.b(a,b)};
8 O.prototype.b=function(a,b){var c=this,e=Y(c,b),d=e.jsdisplay;if(d){if(!A(a,d,b) ){t(b);return}s(b)}(d=e.jsvars)&&fa(c,a,b,d);(d=e.jsvalues)&&ga(c,a,b,d);if(d=e. jseval)for(var f=0,g=d.length;f<g;++f)A(a,d[f],b);if(d=e.jsskip)if(A(a,d,b))retu rn;if(e=e.jscontent){a=""+A(a,e,b);if(b.innerHTML!=a){for(;b.firstChild;)b.first Child.parentNode.removeChild(b.firstChild);c=c.j.createTextNode(a);b.appendChild (c)}}else{e=X(c);for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==1&&e.push(c.e, a,b);e.length&&W(c,e)}};
9 function ea(a,b,c,e){e=A(b,e,c);var d=c.getAttribute(L),f=false;if(d)if(d.charAt (0)==M){var g=d.substr(1);d=parseInt(g,10);f=true}else d=parseInt(d,10);var i=e! =null&&typeof e=="object"&&typeof e.length=="number";g=i?e.length:1;var h=i&&g== 0;if(i)if(h)if(d)c.parentNode.removeChild(c);else{c.setAttribute(L,"*0");t(c)}el se{s(c);if(d===null||d===""||f&&d<g-1){f=X(a);d=d||0;for(i=g-1;d<i;++d){var k=c. cloneNode(true);c.parentNode.insertBefore(k,c);$(k,e,d);h=B(b,e[d],d,g);f.push(a .b,h,k,z,h,null)}$(c,
10 e,d);h=B(b,e[d],d,g);f.push(a.b,h,c,z,h,null);W(a,f)}else if(d<g){f=e[d];$(c,e,d );h=B(b,f,d,g);f=X(a);f.push(a.b,h,c,z,h,null);W(a,f)}else c.parentNode.removeCh ild(c)}else if(e==null)t(c);else{s(c);h=B(b,e,0,1);f=X(a);f.push(a.b,h,c,z,h,nul l);W(a,f)}}function fa(a,b,c,e){a=0;for(var d=e.length;a<d;a+=2){var f=e[a],g=A( b,e[a+1],c);b.a[f]=g}}
11 function ga(a,b,c,e){a=0;for(var d=e.length;a<d;a+=2){var f=e[a],g=A(b,e[a+1],c) ;if(f.charAt(0)=="$")b.a[f]=g;else if(f.charAt(0)=="."){f=f.substr(1).split(".") ;for(var i=c,h=f.length,k=0,ha=h-1;k<ha;++k){var D=f[k];i[D]||(i[D]={});i=i[D]}i [f[h-1]]=g}else if(f)if(typeof g=="boolean")g?q(c,f,f):r(c,f);else c.setAttribut e(f,""+g)}}function Y(a,b){if(b.__jstcache)return b.__jstcache;if(a=b.getAttribu te("jstcache"))return b.__jstcache=Q[a];return U(b)}
12 function Z(a,b){var c=document;if(a=b?ia(c,a,b):c.getElementById(a)){P(a);a=a.cl oneNode(true);a.removeAttribute(ba);return a}else return null}function ia(a,b,c, e){var d=a.getElementById(b);if(d)return d;c=c();e=e||aa;if(d=a.getElementById(e ))d=d;else{d=a.createElement(N);d.id=e;t(d);d.style.position="absolute";a.body.a ppendChild(d)}e=a.createElement(N);d.appendChild(e);e.innerHTML=c;return d=a.get ElementById(b)}function $(a,b,c){c==b.length-1?q(a,L,M+c):q(a,L,""+c)};window.js tGetTemplate=Z;window.JsEvalContext=w;window.jstProcess=ca;
13 })()
OLDNEW
« no previous file with comments | « chrome/third_party/jstemplate/compile.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698