Home | History | Annotate | Download | only in chromium-trace

Lines Matching refs:labelWidth

127 {get:function(a,c,d,f,g){var h=b[d];h||(h={},b[d]=h);f=h[c];f||(h[c]={},f=h[c]);h=f[g];if(void 0===h){for(h=!1;a.labelWidthWorld(d,c)>g;)d=d.substring(0,0.75*d.length),h=!0;h&&3<d.length&&(d=d.substring(0,d.length-3)+"...");h=new e(d,a.labelWidth(d));f[g]=h}return h}};var j=cr.ui.define(d);j.prototype={__proto__:d.prototype,SHOULD_ELIDE_TEXT:!0,decorate:function(){this.classList.add("timeline-slice-track");this.elidedTitleCache=new c;this.asyncStyle_=!1},decorateHit:function(){},get asyncStyle(){return this.asyncStyle_},
128 set asyncStyle(a){this.asyncStyle_=!!a;this.invalidate()},get slices(){return this.slices_},set slices(a){this.slices_=a;this.invalidate()},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a;this.invalidate()},labelWidth:function(b){var c=a[b];c||(c=this.ctx_.measureText(b).width,a[b]=c);return c+2},labelWidthWorld:function(a,b){return this.labelWidth(a)*b},redraw:function(){var a=this.ctx_,b=this.canvas_.width,c=this.canvas_.height;a.clearRect(0,0,b,c);var d=
130 j.colorId+h:j.colorId;l<e&&(l=e);0<j.duration?k.fillRect(i,l,m):0.001<e?k.fillRect(i,e,m):(a.fillStyle=f[m],a.beginPath(),a.moveTo(i-4*e,c),a.lineTo(i,0),a.lineTo(i+4*e,c),a.closePath(),a.fill())}k.flush();a.restore();if(8<c){a.textAlign="center";a.textBaseline="top";a.font="10px sans-serif";a.strokeStyle="rgb(0,0,0)";a.fillStyle="rgb(0,0,0)";c=20*e;i=this.SHOULD_ELIDE_TEXT;for(b=0;b<g.length;++b)if(j=g[b],j.duration>c&&(k=j.title,j.didNotFinish&&(k+=" (Did Not Finish)"),l=this.labelWidth(k),i&&this.labelWidthWorld(k,