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

Lines Matching refs:break

34 traceMarkWriteAndroidEvent:function(a,e,f,g,h){a=h.details.split("|");switch(a[0]){case "B":e=parseInt(a[1]);var d=a[4],l=a[2],m=this.model_.getOrCreateProcess(e).getOrCreateThread(f);m.name=h.threadName;if(!m.sliceGroup.isTimestampValidForBeginOrEnd(g))return this.model_.importErrors.push("Timestamps are moving backward."),!1;this.ppids_[f]=e;m.sliceGroup.beginSlice(d,l,g,b(a[3]));break;case "E":e=this.ppids_[f];if(void 0===e)break;m=this.model_.getOrCreateProcess(e).getOrCreateThread(f);if(!m.sliceGroup.openSliceCount)break;
35 f=m.sliceGroup.endSlice(g);h=b(a[3]);for(d in h)void 0!==f.args[d]&&this.model_.importErrors.push("Both the B and E events of "+f.title+"provided values for argument "+d+". The value of the E event will be used."),f.args[d]=h[d];break;case "C":e=parseInt(a[1]);var l=a[2],n=parseInt(a[3]),d=a[4];f=this.model_.getOrCreateProcess(e).getOrCreateCounter(d,l);0===f.numSeries&&f.addSeries(new tracing.trace_model.CounterSeries(n,tracing.getStringColorId(f.name+".value")));f.series.forEach(function(a){a.addSample(g,
36 n)});break;case "S":e=parseInt(a[1]);l=a[2];a=parseInt(a[3]);m=this.model_.getOrCreateProcess(e).getOrCreateThread(f);m.name=h.threadName;this.ppids_[f]=e;this.openAsyncSlice(m,null,l,a,g);break;case "F":e=parseInt(a[1]);l=a[2];a=parseInt(a[3]);m=this.model_.getOrCreateProcess(e).getOrCreateThread(f);m.name=h.threadName;this.ppids_[f]=e;this.closeAsyncSlice(m,l,a,g);break;default:return!1}return!0}};a.registerSubtype(d);return{AndroidParser:d}});"use strict";base.require("tracing.importer.linux_perf.parser");
50 "ext4",g.threadName,g.pid,a+"-"+c,{device:a,inode:c,error:e});return!0},blockRqIssueEvent:function(a,c,e,b,g){var h=/(\d+,\d+) (F)?([DWRN])(F)?(A)?(S)?(M)? \d+ \(.*\) (\d+) \+ (\d+) \[.*\]/.exec(g.details);if(!h)return!1;switch(h[3]){case "D":a="discard";break;case "W":a="write";break;case "R":a="read";break;case "N":a="none";break;default:a="unknown"}h[2]&&(a+=" flush");"F"==h[4]&&(a+=" fua");"A"==h[5]&&(a+=" ahead");"S"==h[6]&&(a+=" sync");"M"==h[7]&&(a+=" meta");c=h[1];e=parseInt(h[8]);h=parseInt(h[9]);
59 a,c,e)},gestureCloseSlice:function(a,c){var e=this.importer.getOrCreatePseudoThread("gesture").thread;if(e.sliceGroup.openSliceCount){var b=e.sliceGroup.mostRecentlyOpenedPartialSlice;b.title!=a?this.importer.importError("Titles do not match. Title is "+b.title+" in openSlice, and is "+a+" in endSlice"):e.sliceGroup.endSlice(c)}},logEvent:function(a,c,e,b,g){a=/^\s*(\w+):\s*(\w+)$/.exec(g.details);switch(a[1]){case "start":this.gestureOpenSlice("GestureLog",b,{name:a[2]});break;case "end":this.gestureCloseSlice("GestureLog",
60 b)}return!0},syncEvent:function(a,c,e,b,g){a=/^\s*(\w+):\s*(\w+)$/.exec(g.details);switch(a[1]){case "start":this.gestureOpenSlice("SyncInterpret",b,{interpreter:a[2]});break;case "end":this.gestureCloseSlice("SyncInterpret",b)}return!0},timerEvent:function(a,c,e,b,g){a=/^\s*(\w+):\s*(\w+)$/.exec(g.details);switch(a[1]){case "start":this.gestureOpenSlice("HandleTimer",b,{interpreter:a[2]});break
100 autoDetectLineRE:function(a){var c=/^\s*\(([\w\-]*)\)\s*(\w+):\s*([\w\\\/\.\-]*@\d*):?\s*(.*)$/;if(c.test(a))return c;c=/^s*()(\w+):\s*([\w\\\/.\-]*):?\s*(.*)$/;return c.test(a)?c:null},lineRE:null,maliDDKEvent:function(a,c,e,b,g){if(null==this.lineRE&&(this.lineRE=this.autoDetectLineRE(g.details),null==this.lineRE))return!1;a=this.lineRE.exec(g.details);c=""===a[1]?"mali":a[1];switch(a[2]){case "cros_trace_print_enter":this.maliDDKOpenSlice(e,c,b,a[4],a[3]);break;case "cros_trace_print_exit":this.maliDDKCloseSlice(e,
162 if(0!=f.snapshots.length)throw Error("Cannot shift creationTs forward, snapshots have been added. First snap was at ts="+f.snapshots[0].ts+" and creationTs was "+f.creationTs);f.creationTs=c}else if(f>=this.instances.length)if(f=this.instances[this.instances.length-1],c>=f.deletionTs)f=this.createObjectInstanceFunction_(this.parent,this.id,b,a,c),this.instances.push(f);else{for(var g,f=this.instances.length-1;0<=f;f--){b=this.instances[f];if(c>=b.deletionTs)break;!1==b.creationTsWasExplicit&&0==b.snapshots.length&&
181 b.copySlice(f);f.start=a;f.duration=g-a;f.title+=" (cont.)";d.duration=a-d.start;m[c]=d;b.pushSlice(d)}},p=function(a){for(;0<l.length||0<m.length;){var c=l[l.length-1],b=m[m.length-1],c=c&&c.start,b=b&&b.start;if((void 0===c||c<a)&&(void 0===b||b<a))break;void 0===b||c>b?(n(c),l.pop()):m.pop()}};0<=h||0<=k;){var q=f[h],t=g[k];void 0===q||void 0!==t&&q.end<t.end?(q=b.copySlice(t),t=!0,k--):(q=b.copySlice(q),t=!1,h--);p(q.end);b.pushSlice(q);t?m.push(q):(n(q.end),l.push(q))}p();b.slices.reverse();
210 b=0;b<d.importerConstructors_.length;++b)if(d.importerConstructors_[b].canImport(a)){c=d.importerConstructors_[b];break}if(!c)throw Error("Could not find an importer for the provided eventData.");return new c(this,a)},importTraces:function(a,c,b){void 0===c&&(c=!0);void 0===b&&(b=!0);a=a.slice(0);for(var d=[],k=0;k<a.length;++k)d.push(this.createImporter_(a[k]));for(k=0;k<d.length;k++){var l=d[k].extractSubtrace();l&&(a.push(l),d.push(this.createImporter_(l)))}d.sort(function(a,c){return a.importPriority-
254 a.name)},processInstantEvent:function(a){var c;switch(a.s){case "g":c=tracing.trace_model.GlobalInstantEvent;break;case "p":c=tracing.trace_model.ProcessInstantEvent;break;default:c=tracing.trace_model.ThreadInstantEvent}var b=tracing.getStringColorId(a.name);c=new c(a.cat,a.name,b,a.ts/1E3,this.deepCopyIfNeeded_(a.args));switch(c.type){case tracing.trace_model.InstantEventType.GLOBAL:this.model_.pushInstantEvent(c);break;case tracing.trace_model.InstantEventType.PROCESS:this.model_.getOrCreateProcess(a.pid).pushInstantEvent(c);
255 break;case tracing.trace_model.InstantEventType.THREAD:this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid).sliceGroup.pushInstantEvent(c);break;default:throw Error("Unknown instant event type: "+a.s);}},processSampleEvent:function(a){this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid).addSample(a.cat,a.name,a.ts/1E3,this.deepCopyIfNeeded_(a.args))},importEvents:function(){for(var a=this.events_,c=0;c<a.length;c++){var b=a[c];"B"===b.ph||"E"===b.ph?this.processDurationEvent(b):
271 e;a=c=e=new d.Node(null,null);for(var f=this.root_;;)if(b<f.key){if(!f.left)break;if(b<f.left.key){var g=f.left;f.left=g.right;g.right=f;f=g;if(!f.left)break}e=e.left=f;f=f.left}else if(b>f.key){if(!f.right)break;if(b>f.right.key&&(g=f.right,f.right=g.left,g.left=f,f=g,!f.right))break;c=c.right=f;f=f.right}else break;c.right=f.left;e.left=f.right;f.left=a.right;f.right=a.left;this.root_=f}};d.prototype.traverse_=function(b){for(var a=[this.root_];0<a.length;){var c=a.shift();null!=c&&(b(c),a.push(c.left),
275 b.findGreatestLessThan(f);if(!d)break;f=d.key;d=f+d.value.size;f<c&&a<d&&e.push(f);f-=1}a=0;for(c=e.length;a<c;++a)b.remove(e[a])};d.prototype.isAddressBelongsTo_=function(b,a){return b>=a.key&&b<a.key+a.value.size};d.prototype.findInTree_=function(b,a){var c=b.findGreatestLessThan(a);return c&&this.isAddressBelongsTo_(a,c)?c.value:null};d.prototype.findEntry=function(b){if(b>>>d.PAGE_ALIGNMENT in this.pages_)return this.findInTree_(this.statics_,b)||this.findInTree_(this.libraries_,b);var a=this.dynamics_.findMin(),
281 [],f=0;f<c.parsers.length;++f){var d=c.parsers[f];if(null===d)b.push(a[1+f]);else if("function"==typeof d)b.push(d(a[1+f]));else{b.push(a.slice(1+f));break}}c.processor.apply(this,b)}};b.prototype.processLog_=function(a){for(var c=0,b=a.length;c<b;++c,++this.lineNum_){var f=a[c];if(f)try{var d=this.csvParser_.parseLine(f);this.dispatchLogRow_(d)}catch(h){this.printError("line "+(this.lineNum_+1)+": "+(h.message||h))}}};return{LogReader:b}});"use strict";base.require("tracing.trace_model");base.require("tracing.trace_model.slice");
286 h);a.kind=b;this.code_map_.addCode(f,a)},processCodeMoveEvent_:function(a,b){this.code_map_.moveCode(a,b)},processCodeDeleteEvent_:function(a){this.code_map_.deleteCode(a)},processSharedLibrary_:function(a,e,f){f=new tracing.importer.v8.CodeMap.CodeEntry(f-e,a);f.kind=-3;for(var d=0;d<b.length;d++){var h=b[d];if(0<=a.indexOf(h,a.length-h.length)){f.kind=-1;break}}this.code_map_.addLibrary(e,f)},findCodeKind_:function(a){for(name in CodeKinds)if(0<=CodeKinds[name].kinds.indexOf(a))return CodeKinds[name]},
358 this.onKeyPress,!0),document.removeEventListener("click",this.onDocumentClick,!0),a.hideOverlay(this))},onKeyDown:function(a){this.obeyCloseEvents&&27==a.keyCode&&(this.visible=!1,a.preventDefault())},onKeyPress:function(a){if(this.obeyCloseEvents)for(var c=0;c<this.additionalCloseKeyCodes.length;c++)if(a.keyCode==this.additionalCloseKeyCodes[c]){this.visible=!1;a.preventDefault();break}},onDocumentClick:function(a){if(this.obeyCloseEvents){for(var c=a.target;null!==c;){if(c===this)return;c=c.parentNode}this.visible=
385 g);for(c=base.findLowIndexInSortedArray(a,function(a){return a.start},c);c<a.length;++c){var m=a[c],n=m.start;if(n>b)break;Math.max(m.duration,.001);m=m.selected?m.colorId+d:m.colorId;.001<k?h.fillRect(n,k,m):(f.fillStyle=l[m],f.beginPath(),f.moveTo(n-4*k,g),f.lineTo(n,0),f.lineTo(n+4*k,g),f.closePath(),f.fill())}h.flush();f.restore()}};return{Track:b}});"use strict";base.requireStylesheet("tracing.tracks.drawing_container");base.require("base.raf");base.require("tracing.tracks.track");base.require("ui");
397 e)}},drawSlices_:function(a,c){var e=this.context(),d=window.devicePixelRatio||1,g=this.getBoundingClientRect(),h=g.width*d,k=g.height*d,l=this.classList.contains("ruler-track-with-distance-measurements"),g=l?k/2:k,m=this.viewport;m.drawMarkerArrows(e,a,c,g);var d=150*d,n=m.xViewVectorToWorld(d),p,q,t,v;v=Math.pow(10,Math.ceil(Math.log(n)/b));q=[10,5,2,1];for(n=0;n<q.length;++n)if(!(m.xWorldVectorToView(v/q[n])<d)){p=v/q[n-1];break}v=void 0;100>p?(q="ms",t=1,v=this.strings_msecs_):(q="s",t=1E3,v=
412 f=window.devicePixelRatio||1,g=this.getBoundingClientRect().height*f,p=this.viewport,q=p.xViewVectorToWorld(1);d.save();p.applyTransformToCanvas(d);this.asyncStyle_&&(d.globalAlpha=.25);var t=new tracing.FastRectRenderer(d,2*q,2*q,a);t.setYandH(0,g);for(var v=this.slices_,w=base.findLowIndexInSortedArray(v,function(a){return a.start+a.duration},b),s=w;s<v.length;++s){var r=v[s],u=r.start;if(u>c)break;var x=Math.max(r.duration,.001),y=r.selected?r.colorId+e:r.colorId;x<q&&(x=q);0<r.duration?t.fillRect(u,
413 x,y):.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=this.elidedTitleCache.get(this,
419 updateContents_:function(){this.detach();if(this.cpu_){var b=tracing.filterSliceArray(this.categoryFilter_,this.cpu_.slices);if(b.length){var a=new tracing.tracks.SliceTrack(this.viewport);a.slices=b;a.heading="CPU "+this.cpu_.cpuNumber+":";this.appendChild(a)}for(var c in this.cpu_.counters){b=this.cpu_.counters[c];if(!this.categoryFilter_.matchCounter(b))break;a=new tracing.tracks.CounterTrack(this.viewport);a.heading="CPU "+this.cpu_.cpuNumber+" "+b.name+":";a.counter=b;a.categoryFilter=this.categoryFilter_;
423 d)}},drawSlices_:function(a,e){var f=this.context(),g=window.devicePixelRatio||1,h=this.getBoundingClientRect().height*g,k=.5*h,l=2*Math.PI,m=this.viewport,n=this.snapshotRadiusView,p=m.xViewVectorToWorld(h),q;f.save();m.applyTransformToCanvas(f);var t=this.objectInstances_;q=base.findLowIndexInSortedArray(t,function(a){return a.deletionTs},a);f.globalAlpha=.25;for(f.strokeStyle="rgb(0,0,0)";q<t.length;++q){var v=t[q],w=v.creationTs;if(w>e)break;var s=v.selected?v.colorId+b:v.colorId,v=v.deletionTs==
424 Number.MAX_VALUE?e:v.deletionTs;f.fillStyle=d[s];f.fillRect(w,g,v-w,h-2*g)}f.globalAlpha=1;f.restore();g=this.objectSnapshots_;for(q=base.findLowIndexInSortedArray(g,function(a){return a.ts+p},a);q<g.length;++q){h=g[q];w=h.ts;if(w-p>e)break;w=m.xWorldToView(w);s=h.selected?h.objectInstance.colorId+b:h.objectInstance.colorId;f.fillStyle=d[s];f.beginPath();f.arc(w,k,n,0,l);f.fill();h.selected?(f.lineWidth=5,f.strokeStyle="rgb(100,100,0)",f.stroke(),f.beginPath(),f.arc(w,k,n-1,0,l),f.lineWidth=2,f.strokeStyle=
431 g=window.devicePixelRatio||1,h=this.getBoundingClientRect(),k=h.width*g,g=h.height*g,h=this.viewport,l=this.maxBytes_,m=this.objectInstance_.snapshots,n=base.findLowIndexInSortedArray(m,function(a){return a.ts},a);for(0<n&&(n-=1);n<m.length;++n){var p=m[n],q=p.ts;if(q>e)break;q=h.xWorldToView(q);0>q&&(q=0);var t=h.xWorldToView(n<m.length-1?m[n+1].ts:m[m.length-1].ts+5E3);t>k&&(t=k);for(var q=Math.floor(q),t=Math.floor(t),v=g,w=Object.keys(p.heap_.children),s=w.length-1;0<=s;s--){var r=p.heap_.children[w[s]];
437 function(a){return a},a),n=0<n-1?n-1:0,p=f/g.maxTotal,q=g.numSeries-1;0<=q;q--){e.fillStyle=d[g.series[q].color];e.beginPath();for(var t=n-1,v=0<=t?g.timestamps[t]-l:-1,w=f,s=!1;;){var r=t+1;if(r>=m){e.lineTo(v,w);e.lineTo(v+8*k,w);e.lineTo(v+8*k,f);break}var u=g.timestamps[r],x=g.totals[r*h+q],x=f-p*x;if(u>b){e.lineTo(u,w);e.lineTo(u,f);break}if(r+1<m&&(t=g.timestamps[r+1],t-v<=l&&t<b)){t=r;continue}s||(e.moveTo(a,f),s=!0);u-v<l&&(u=v+l);e.lineTo(u,w);e.lineTo(u,x);t=r;v=u;w=x}e.closePath();e.fill()}e.fillStyle=
445 k.subSlices&&k.subSlices.push(d);g=!0;break}}g||e[0].push(d)}return e},areArrayContentsSame_:function(b,a){if(!(b&&a&&b.length&&a.length)||b.length!=a.length)return!1;for(var c=0;c<b.length;++c)if(b[c]!=a[c])return!1;return!0}};return{SliceGroupTrack:d}});"use strict";base.require("tracing.tracks.slice_group_track");base.require("ui");
447 this.group_.slices);b.sort(function(a,b){return a.start-b.start});for(var a=[],c=0;c<b.length;c++){for(var e=b[c],d=!1,g=0;g<a.length;g++){var h=a[g];if(e.start>=h[h.length-1].end){d=!0;if(void 0===e.subSlices||1>e.subSlices.length)throw Error("AsyncEvent missing subSlices: ")+e.name;for(g=0;g<e.subSlices.length;g++)h.push(e.subSlices[g]);break}}if(!d&&(h=[],void 0!==e.subSlices)){for(g=0;g<e.subSlices.length;g++)h.push(e.subSlices[g]);a.push(h)}}return a}};return{AsyncSliceGroupTrack:d}});"use strict";
454 b,e,d,g){function h(d){d=n.selectedOptions[0].targetPropertyValue;base.Settings.set(e,d);a[b]=d}for(var k,l=0;l<g.length;l++){var m=g[l];if(m.value==d){k=l;break}}if(void 0===k)throw Error("defaultValue must be in the items list");var n=document.createElement("select");n.addEventListener("change",h);for(l=0;l<g.length;l++){var m=g[l],p=document.createElement("option");p.textContent=m.label;p.targetPropertyValue=m.value;n.appendChild(p)}a.__lookupSetter__("selectedIndex");n.__defineGetter__("selectedValue",
455 function(a){return n.children[n.selectedIndex].targetPropertyValue});n.__defineSetter__("selectedValue",function(a){for(var b=0;b<n.children.length;b++)if(n.children[b].targetPropertyValue==a){n.selectedIndex=b;h();return}throw Error("Not a valid value");});g=base.Settings.get(e,d);m=!1;for(l=0;l<n.children.length;l++)if(n.children[l].targetPropertyValue==g){m=!0;a[b]=g;n.selectedIndex=l;break}m||(n.selectedIndex=k,a[b]=d);return n},createCheckBox:function(a,c,e,f,g){function h(){base.Settings.set(e,
468 base.exportTo("tracing.tracks",function(){var d=tracing.tracks.ProcessTrackBase,b=ui.define("process-track",d);b.prototype={__proto__:d.prototype,decorate:function(a){tracing.tracks.ProcessTrackBase.prototype.decorate.call(this,a)},drawTrack:function(a){switch(a){case tracing.tracks.DrawType.INSTANT_EVENT:if(!this.processBase.instantEvents||0===this.processBase.instantEvents.length)break;var b=this.context();if(void 0===b)break;b.save();var e=this.setupCanvasForDraw_();this.drawInstantEvents_(this.processBase.instantEvents,
472 applyCategoryFilter_:function(){this.updateContents_()},updateContents_:function(){this.textContent="";if(this.model_&&this.categoryFilter){var b=this.categoryFilter;this.appendKernelTrack_();var a=this.model_.getAllProcesses();a.sort(tracing.trace_model.Process.compare);for(var c=0;c<a.length;++c){var d=a[c];if(!b.matchProcess(d))break;var f=new tracing.tracks.ProcessTrack(this.viewport);f.categoryFilter=b;f.process=d;f.hasVisibleContent&&this.appendChild(f)}}},appendKernelTrack_:function(){if(this.categoryFilter.matchProcess(this.model.kernel)){var b=
473 new tracing.tracks.KernelTrack(this.viewport);b.categoryFilter=this.categoryFilter;b.kernel=this.model.kernel;b.hasVisibleContent&&this.appendChild(b)}},drawTrack:function(b){switch(b){case tracing.tracks.DrawType.INSTANT_EVENT:if(!this.model_.instantEvents||0===this.model_.instantEvents.length)break;var a=this.context();if(void 0===a)break;a.save();var c=this.setupCanvasForDraw_();this.drawInstantEvents_(this.model_.instantEvents,c.left,c.right);a.restore()}tracing.tracks.ContainerTrack.prototype.drawTrack.call(this,
480 b;this.panScanModeButton_.classList.remove("active");this.selectionModeButton_.classList.remove("active");this.zoomModeButton_.classList.remove("active");switch(b){case a.MOUSE_MODE_PANSCAN:this.panScanModeButton_.classList.add("active");break;case a.MOUSE_MODE_SELECTION:this.selectionModeButton_.classList.add("active");break;case a.MOUSE_MODE_ZOOM:this.zoomModeButton_.classList.add("active");break;default:throw Error("Unknown selection mode: "+b);}base.Settings.set("mouse_mode_selector.mouseMode",
481 b)}},getCurrentModeEventNames_:function(){var b=tracing.mouseModeConstants,a={begin:"",update:"",end:""};switch(this.mode){case b.MOUSE_MODE_PANSCAN:a.begin="beginpan";a.update="updatepan";a.end="endpan";break;case b.MOUSE_MODE_SELECTION:a.begin="beginselection";a.update="updateselection";a.end="endselection";break;case b.MOUSE_MODE_ZOOM:a.begin="beginzoom";a.update="updatezoom";a.end="endzoom";break;default:throw Error("Unsupported interaction mode");}return a},onMouseDown_:function(b){var a=this.getCurrentModeEventNames_(),
483 onButtonMouseDown_:function(b){b.preventDefault();b.stopImmediatePropagation()},onButtonMouseUp_:function(b){b.preventDefault();b.stopImmediatePropagation()},onButtonPress_:function(b){var a=tracing.mouseModeConstants;switch(b.target){case this.panScanModeButton_:this.mode=a.MOUSE_MODE_PANSCAN;break;case this.selectionModeButton_:this.mode=a.MOUSE_MODE_SELECTION;break;case this.zoomModeButton_:this.mode=a.MOUSE_MODE_ZOOM;break;default:throw Error("Unknown mouse mode button pressed");}b.preventDefault();
484 this.isInTemporaryAlternativeMouseMode_=!1},onKeyPress_:function(b){if(!this.isInteracting_){var a=tracing.mouseModeConstants;switch(b.keyCode){case 49:this.mode=a.MOUSE_MODE_PANSCAN;break;case 50:this.mode=a.MOUSE_MODE_SELECTION;break;case 51:this.mode=a.MOUSE_MODE_ZOOM}}},onKeyDown_:function(b){if(!this.isInteracting_){var a=tracing.mouseModeConstants,c=base.isMac&&b.metaKey||!base.isMac&&b.ctrlKey,d=b.shiftKey;this.mode===a.MOUSE_MODE_PANSCAN&&(c||d)&&(this.mode=c?a.MOUSE_MODE_ZOOM:a.MOUSE_MODE_SELECTION,
497 this.activeElement instanceof tracing.FindControl?!1:this.focusElement_?0<=this.focusElement.tabIndex?document.activeElement==this.focusElement?!0:ui.elementIsChildOf(document.activeElement,this.focusElement):!0:!0},onMouseMove_:function(a){this.isZooming_||this.storeLastMousePos_(a)},onKeypress_:function(a){var b=this.viewport_;if(this.listenToKeys_&&"INPUT"!=document.activeElement.nodeName){var d=this.modelTrackContainer_.canvas.clientWidth;switch(a.keyCode){case 119:case 44:this.zoomBy_(1.5);break;
498 case 115:case 111:this.zoomBy_(1/1.5);break;case 103:this.onGridToggle_(!0);break;case 71:this.onGridToggle_(!1);break;case 87:case 60:this.zoomBy_(10);break;case 83:case 79:this.zoomBy_(.1);break;case 97:b.panX+=b.xViewVectorToWorld(.1*d);break;case 100:case 101:b.panX-=b.xViewVectorToWorld(.1*d);break;case 65:b.panX+=b.xViewVectorToWorld(.5*d);break;case 68:b.panX-=b.xViewVectorToWorld(.5*d);break;case 48:case 122:this.setInitialViewport_();break;case 102:this.zoomToSelection()}}},onKeydown_:function(a){if(this.listenToKeys_){var b,
499 d=this.viewport_,g=this.modelTrackContainer_.canvas.clientWidth;switch(a.keyCode){case 37:(b=this.selection.getShiftedSelection(-1))?(this.selection=b,this.panToSelection(),a.preventDefault()):d.panX+=d.xViewVectorToWorld(.1*g);break;case 39:(b=this.selection.getShiftedSelection(1))?(this.selection=b,this.panToSelection(),a.preventDefault()):d.panX-=d.xViewVectorToWorld(.1*g);break;case 9:-1==this.focusElement.tabIndex&&(a.shiftKey?this.selectPrevious_(a):this.selectNext_(a),a.preventDefault())}}},