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

Lines Matching refs:labelWidth

399 !!a},get slices(){return this.slices_},set slices(a){this.slices_=a||[]},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a},get hasVisibleContent(){return 0<this.slices.length},labelWidth:function(a){var b=this.context(),c=f[a];c||(c=b.measureText(a).width,f[a]=c);return c+2},labelWidthWorld:function(a,b){return this.labelWidth(a)*b},draw:function(a,b,c){switch(a){case tracing.tracks.DrawType.SLICE:this.drawSlices_(b,c)}},drawSlices_:function(b,c){var d=this.context(),
401 x,y):0.001<q?t.fillRect(u,q,y):(d.fillStyle=a[y],d.beginPath(),d.moveTo(u-4*q,g),d.lineTo(u,0),d.lineTo(u+4*q,g),d.closePath(),d.fill())}t.flush();d.restore();if(8<g)for(d.textAlign="center",d.textBaseline="top",d.font=10*f+"px sans-serif",d.strokeStyle="rgb(0,0,0)",d.fillStyle="rgb(0,0,0)",g=20*q,t=this.SHOULD_ELIDE_TEXT,s=w;s<v.length;++s){r=v[s];if(r.start>c)break;r.duration<=g||(w=r.title+(r.didNotFinish?" (Did Not Finish)":""),u=this.labelWidth(w),t&&this.labelWidthWorld(w,q)>r.duration&&(u=
404 b.addSlice(this,this.slices_[c]);this.decorateHit(e)}}};var e=tracing.getColorPaletteHighlightIdBoost(),f={},g={};d.prototype={get:function(a,c,e,d,f){var p=g[e];p||(p={},g[e]=p);d=p[c];d||(p[c]={},d=p[c]);p=d[f];if(void 0===p){for(p=!1;a.labelWidthWorld(e,c)>f&&!(1>0.75*e.length);)e=e.substring(0,0.75*e.length),p=!0;p&&3<e.length&&(e=e.substring(0,e.length-3)+"...");p=new b(e,a.labelWidth(e));d[f]=p}return p}};return{SliceTrack:c}});"use strict";base.require("tracing.tracks.container_track");base.require("tracing.tracks.slice_track");