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

Unified Diff: chrome_linux/resources/inspector/TimelinePanel.js

Issue 42163002: Roll Linux reference build to official build 31.0.1650.34 (trunk r224845, branch r230433) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/reference_builds/
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome_linux/resources/inspector/TimelinePanel.js
===================================================================
--- chrome_linux/resources/inspector/TimelinePanel.js (revision 230844)
+++ chrome_linux/resources/inspector/TimelinePanel.js (working copy)
@@ -114,9 +114,9 @@
ctx.lineTo(width,currentY);ctx.lineWidth=1;ctx.strokeStyle=counterUI.graphColor;ctx.stroke();ctx.closePath();},_discardImageUnderMarker:function()
{for(var i=0;i<this._counterUI.length;i++)
this._counterUI[i].discardImageUnderMarker();},__proto__:WebInspector.MemoryStatistics.prototype};WebInspector.TimelineModel=function()
-{this._records=[];this._stringPool=new StringPool();this._minimumRecordTime=-1;this._maximumRecordTime=-1;this._collectionEnabled=false;WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded,this._onRecordAdded,this);WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStartEvent,this._onTimelineStarted,this);}
+{this._records=[];this._stringPool=new StringPool();this._minimumRecordTime=-1;this._maximumRecordTime=-1;WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded,this._onRecordAdded,this);WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted,this._onStarted,this);WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped,this._onStopped,this);}
WebInspector.TimelineModel.TransferChunkLengthBytes=5000000;WebInspector.TimelineModel.RecordType={Root:"Root",Program:"Program",EventDispatch:"EventDispatch",BeginFrame:"BeginFrame",ScheduleStyleRecalculation:"ScheduleStyleRecalculation",RecalculateStyles:"RecalculateStyles",InvalidateLayout:"InvalidateLayout",Layout:"Layout",PaintSetup:"PaintSetup",Paint:"Paint",Rasterize:"Rasterize",ScrollLayer:"ScrollLayer",DecodeImage:"DecodeImage",ResizeImage:"ResizeImage",CompositeLayers:"CompositeLayers",ParseHTML:"ParseHTML",TimerInstall:"TimerInstall",TimerRemove:"TimerRemove",TimerFire:"TimerFire",XHRReadyStateChange:"XHRReadyStateChange",XHRLoad:"XHRLoad",EvaluateScript:"EvaluateScript",MarkLoad:"MarkLoad",MarkDOMContent:"MarkDOMContent",TimeStamp:"TimeStamp",Time:"Time",TimeEnd:"TimeEnd",ScheduleResourceRequest:"ScheduleResourceRequest",ResourceSendRequest:"ResourceSendRequest",ResourceReceiveResponse:"ResourceReceiveResponse",ResourceReceivedData:"ResourceReceivedData",ResourceFinish:"ResourceFinish",FunctionCall:"FunctionCall",GCEvent:"GCEvent",RequestAnimationFrame:"RequestAnimationFrame",CancelAnimationFrame:"CancelAnimationFrame",FireAnimationFrame:"FireAnimationFrame",WebSocketCreate:"WebSocketCreate",WebSocketSendHandshakeRequest:"WebSocketSendHandshakeRequest",WebSocketReceiveHandshakeResponse:"WebSocketReceiveHandshakeResponse",WebSocketDestroy:"WebSocketDestroy",}
-WebInspector.TimelineModel.Events={RecordAdded:"RecordAdded",RecordsCleared:"RecordsCleared"}
+WebInspector.TimelineModel.Events={RecordAdded:"RecordAdded",RecordsCleared:"RecordsCleared",RecordingStarted:"RecordingStarted",RecordingStopped:"RecordingStopped"}
WebInspector.TimelineModel.startTimeInSeconds=function(record)
{return record.startTime/1000;}
WebInspector.TimelineModel.endTimeInSeconds=function(record)
@@ -129,14 +129,19 @@
WebInspector.TimelineModel.aggregateTimeByCategory=function(total,addend)
{for(var category in addend)
total[category]=(total[category]||0)+addend[category];}
-WebInspector.TimelineModel.prototype={startRecord:function(includeDomCounters)
-{if(this._collectionEnabled)
-return;this.reset();var maxStackFrames=WebInspector.settings.timelineLimitStackFramesFlag.get()?WebInspector.settings.timelineStackFramesToCapture.get():30;WebInspector.timelineManager.start(maxStackFrames,includeDomCounters);this._collectionEnabled=true;},stopRecord:function()
-{if(!this._collectionEnabled)
-return;WebInspector.timelineManager.stop();this._collectionEnabled=false;},get records()
+WebInspector.TimelineModel.prototype={startRecording:function(includeDomCounters)
+{this._clientInitiatedRecording=true;this.reset();var maxStackFrames=WebInspector.settings.timelineLimitStackFramesFlag.get()?WebInspector.settings.timelineStackFramesToCapture.get():30;WebInspector.timelineManager.start(maxStackFrames,includeDomCounters,false,this._fireRecordingStarted.bind(this));},stopRecording:function()
+{if(!this._clientInitiatedRecording){function stopTimeline()
+{WebInspector.timelineManager.stop(this._fireRecordingStopped.bind(this));}
+WebInspector.timelineManager.start(undefined,undefined,undefined,stopTimeline.bind(this));return;}
+this._clientInitiatedRecording=false;WebInspector.timelineManager.stop(this._fireRecordingStopped.bind(this));},get records()
{return this._records;},_onRecordAdded:function(event)
{if(this._collectionEnabled)
-this._addRecord(event.data);},_addRecord:function(record)
+this._addRecord((event.data));},_onStarted:function(event)
+{if(event.data){this._fireRecordingStarted();}},_onStopped:function(event)
+{if(event.data){this._fireRecordingStopped();}},_fireRecordingStarted:function()
+{this._collectionEnabled=true;this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStarted);},_fireRecordingStopped:function()
+{this._collectionEnabled=false;this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped);},_addRecord:function(record)
{this._stringPool.internObjectStrings(record);this._records.push(record);this._updateBoundaries(record);this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordAdded,record);},loadFromFile:function(file,progress)
{var delegate=new WebInspector.TimelineModelLoadFromFileDelegate(this,progress);var fileReader=this._createFileReader(file,delegate);var loader=new WebInspector.TimelineModelLoader(this,fileReader,progress);fileReader.start(loader);},loadFromURL:function(url,progress)
{var delegate=new WebInspector.TimelineModelLoadFromFileDelegate(this,progress);var urlReader=new WebInspector.ChunkedXHRReader(url,delegate);var loader=new WebInspector.TimelineModelLoader(this,urlReader,progress);urlReader.start(loader);},_createFileReader:function(file,delegate)
@@ -150,10 +155,7 @@
{return this._maximumRecordTime;},_updateBoundaries:function(record)
{var startTime=WebInspector.TimelineModel.startTimeInSeconds(record);var endTime=WebInspector.TimelineModel.endTimeInSeconds(record);if(this._minimumRecordTime===-1||startTime<this._minimumRecordTime)
this._minimumRecordTime=startTime;if(this._maximumRecordTime===-1||endTime>this._maximumRecordTime)
-this._maximumRecordTime=endTime;},_onTimelineStarted:function(event)
-{if(event.data.timestampsBase)
-this._timestampsBase=event.data.timestampsBase;if(event.data.startTime)
-this._startTime=event.data.startTime;},recordOffsetInSeconds:function(rawRecord)
+this._maximumRecordTime=endTime;},recordOffsetInSeconds:function(rawRecord)
{return WebInspector.TimelineModel.startTimeInSeconds(rawRecord)-this._minimumRecordTime;},__proto__:WebInspector.Object.prototype}
WebInspector.TimelineModelLoader=function(model,reader,progress)
{this._model=model;this._reader=reader;this._progress=progress;this._buffer="";this._firstChunk=true;}
@@ -343,9 +345,8 @@
eventDivider.title=title;return eventDivider;}
WebInspector.TimelinePresentationModel._hiddenRecords={}
WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.MarkDOMContent]=1;WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.MarkLoad]=1;WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.ScheduleStyleRecalculation]=1;WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.InvalidateLayout]=1;WebInspector.TimelinePresentationModel.prototype={addFilter:function(filter)
-{this._filters.push(filter);},removeFilter:function(filter)
-{var index=this._filters.indexOf(filter);if(index!==-1)
-this._filters.splice(index,1);},rootRecord:function()
+{this._filters.push(filter);},setSearchFilter:function(filter)
+{this._searchFilter=filter;},rootRecord:function()
{return this._rootRecord;},frames:function()
{return this._frames;},reset:function()
{this._linkifier.reset();this._rootRecord=new WebInspector.TimelinePresentationModel.Record(this,{type:WebInspector.TimelineModel.RecordType.Root},null,null,null,false);this._sendRequestRecords={};this._scheduledResourceRequests={};this._timerRecords={};this._requestAnimationFrameRecords={};this._eventDividerRecords=[];this._timeRecords={};this._timeRecordStack=[];this._frames=[];this._minimumRecordTime=-1;this._layoutInvalidateStack={};this._lastScheduleStyleRecalculation={};this._webSocketCreateRecords={};this._coalescingBuckets={};},addFrame:function(frame)
@@ -388,10 +389,11 @@
{this._glueRecords=glue;},invalidateFilteredRecords:function()
{delete this._filteredRecords;},filteredRecords:function()
{if(this._filteredRecords)
-return this._filteredRecords;var recordsInWindow=[];var stack=[{children:this._rootRecord.children,index:0,parentIsCollapsed:false}];while(stack.length){var entry=stack[stack.length-1];var records=entry.children;if(records&&entry.index<records.length){var record=records[entry.index];++entry.index;if(this.isVisible(record)){++record.parent._invisibleChildrenCount;if(!entry.parentIsCollapsed)
-recordsInWindow.push(record);}
-record._invisibleChildrenCount=0;stack.push({children:record.children,index:0,parentIsCollapsed:(entry.parentIsCollapsed||record.collapsed),parentRecord:record,windowLengthBeforeChildrenTraversal:recordsInWindow.length});}else{stack.pop();if(entry.parentRecord)
-entry.parentRecord._visibleChildrenCount=recordsInWindow.length-entry.windowLengthBeforeChildrenTraversal;}}
+return this._filteredRecords;var recordsInWindow=[];var stack=[{children:this._rootRecord.children,index:0,parentIsCollapsed:false,parentRecord:{}}];var revealedDepth=0;function revealRecordsInStack(){for(var depth=revealedDepth+1;depth<stack.length;++depth){if(stack[depth-1].parentIsCollapsed){stack[depth].parentRecord.parent._expandable=true;return;}
+stack[depth-1].parentRecord.collapsed=false;recordsInWindow.push(stack[depth].parentRecord);stack[depth].windowLengthBeforeChildrenTraversal=recordsInWindow.length;stack[depth].parentIsRevealed=true;revealedDepth=depth;}}
+while(stack.length){var entry=stack[stack.length-1];var records=entry.children;if(records&&entry.index<records.length){var record=records[entry.index];++entry.index;if(this.isVisible(record)){record.parent._expandable=true;if(this._searchFilter)
+revealRecordsInStack();if(!entry.parentIsCollapsed){recordsInWindow.push(record);revealedDepth=stack.length;entry.parentRecord.collapsed=false;}}
+record._expandable=false;stack.push({children:record.children,index:0,parentIsCollapsed:(entry.parentIsCollapsed||(record.collapsed&&(!this._searchFilter||record.clicked))),parentRecord:record,windowLengthBeforeChildrenTraversal:recordsInWindow.length});}else{stack.pop();revealedDepth=Math.min(revealedDepth,stack.length-1);entry.parentRecord._visibleChildrenCount=recordsInWindow.length-entry.windowLengthBeforeChildrenTraversal;}}
this._filteredRecords=recordsInWindow;return recordsInWindow;},filteredFrames:function(startTime,endTime)
{function compareStartTime(value,object)
{return value-object.startTime;}
@@ -402,7 +404,7 @@
{return this._eventDividerRecords;},isVisible:function(record)
{for(var i=0;i<this._filters.length;++i){if(!this._filters[i].accept(record))
return false;}
-return true;},generateMainThreadBarPopupContent:function(info)
+return!this._searchFilter||this._searchFilter.accept(record);},generateMainThreadBarPopupContent:function(info)
{var firstTaskIndex=info.firstTaskIndex;var lastTaskIndex=info.lastTaskIndex;var tasks=info.tasks;var messageCount=lastTaskIndex-firstTaskIndex+1;var cpuTime=0;for(var i=firstTaskIndex;i<=lastTaskIndex;++i){var task=tasks[i];cpuTime+=task.endTime-task.startTime;}
var startTime=tasks[firstTaskIndex].startTime;var endTime=tasks[lastTaskIndex].endTime;var duration=endTime-startTime;var offset=this._minimumRecordTime;var contentHelper=new WebInspector.PopoverContentHelper(WebInspector.UIString("CPU"));var durationText=WebInspector.UIString("%s (at %s)",Number.secondsToString(duration,true),Number.secondsToString(startTime-offset,true));contentHelper.appendTextRow(WebInspector.UIString("Duration"),durationText);contentHelper.appendTextRow(WebInspector.UIString("CPU time"),Number.secondsToString(cpuTime,true));contentHelper.appendTextRow(WebInspector.UIString("Message Count"),messageCount);return contentHelper.contentTable();},__proto__:WebInspector.Object.prototype}
WebInspector.TimelinePresentationModel.Record=function(presentationModel,record,parentRecord,origin,scriptDetails,hidden)
@@ -412,7 +414,8 @@
if(origin)
this._origin=origin;this._selfTime=this.endTime-this.startTime;this._lastChildEndTime=this.endTime;this._startTimeOffset=this.startTime-presentationModel._minimumRecordTime;if(record.data){if(record.data["url"])
this.url=record.data["url"];if(record.data["layerRootNode"])
-this._relatedBackendNodeId=record.data["layerRootNode"];}
+this._relatedBackendNodeId=record.data["layerRootNode"];else if(record.data["elementId"])
+this._relatedBackendNodeId=record.data["elementId"];}
if(scriptDetails){this.scriptName=scriptDetails.scriptName;this.scriptLine=scriptDetails.scriptLine;}
if(parentRecord&&parentRecord.callSiteStackTrace)
this.callSiteStackTrace=parentRecord.callSiteStackTrace;var recordTypes=WebInspector.TimelineModel.RecordType;switch(record.type){case recordTypes.ResourceSendRequest:presentationModel._sendRequestRecords[record.data["requestId"]]=this;break;case recordTypes.ScheduleResourceRequest:presentationModel._scheduledResourceRequests[record.data["url"]]=this;break;case recordTypes.ResourceReceiveResponse:var sendRequestRecord=presentationModel._sendRequestRecords[record.data["requestId"]];if(sendRequestRecord){this.url=sendRequestRecord.url;sendRequestRecord._refreshDetails();if(sendRequestRecord.parent!==presentationModel._rootRecord&&sendRequestRecord.parent.type===recordTypes.ScheduleResourceRequest)
@@ -448,8 +451,8 @@
{return this.type===WebInspector.TimelineModel.RecordType.Root;},origin:function()
{return this._origin||this.parent;},get children()
{return this._children;},get visibleChildrenCount()
-{return this._visibleChildrenCount||0;},get invisibleChildrenCount()
-{return this._invisibleChildrenCount||0;},get category()
+{return this._visibleChildrenCount||0;},get expandable()
+{return!!this._expandable;},get category()
{return WebInspector.TimelinePresentationModel.recordStyle(this._record).category},get title()
{return this.type===WebInspector.TimelineModel.RecordType.TimeStamp?this._record.data["message"]:WebInspector.TimelinePresentationModel.recordStyle(this._record).title;},get startTime()
{return WebInspector.TimelineModel.startTimeInSeconds(this._record);},get endTime()
@@ -484,7 +487,9 @@
contentHelper.appendTextRow(WebInspector.UIString("Location"),WebInspector.UIString("(%d, %d)",this.data["x"],this.data["y"]));if(typeof this.data["width"]!=="undefined"&&typeof this.data["height"]!=="undefined")
contentHelper.appendTextRow(WebInspector.UIString("Dimensions"),WebInspector.UIString("%d\u2009\u00d7\u2009%d",this.data["width"],this.data["height"]));}
case recordTypes.PaintSetup:case recordTypes.Rasterize:case recordTypes.ScrollLayer:if(this._relatedNode)
-contentHelper.appendElementRow(WebInspector.UIString("Layer root"),this._createNodeAnchor(this._relatedNode));break;case recordTypes.RecalculateStyles:if(this.data["elementCount"])
+contentHelper.appendElementRow(WebInspector.UIString("Layer root"),this._createNodeAnchor(this._relatedNode));break;case recordTypes.DecodeImage:case recordTypes.ResizeImage:if(this._relatedNode)
+contentHelper.appendElementRow(WebInspector.UIString("Image element"),this._createNodeAnchor(this._relatedNode));if(this.url)
+contentHelper.appendElementRow(WebInspector.UIString("Image URL"),WebInspector.linkifyResourceAsNode(this.url));break;case recordTypes.RecalculateStyles:if(this.data["elementCount"])
contentHelper.appendTextRow(WebInspector.UIString("Elements affected"),this.data["elementCount"]);callStackLabel=WebInspector.UIString("Styles recalculation forced");break;case recordTypes.Layout:if(this.data["dirtyObjects"])
contentHelper.appendTextRow(WebInspector.UIString("Nodes that need layout"),this.data["dirtyObjects"]);if(this.data["totalObjects"])
contentHelper.appendTextRow(WebInspector.UIString("Layout tree size"),this.data["totalObjects"]);if(typeof this.data["partialLayout"]==="boolean"){contentHelper.appendTextRow(WebInspector.UIString("Layout scope"),this.data["partialLayout"]?WebInspector.UIString("Partial"):WebInspector.UIString("Whole document"));}
@@ -512,7 +517,7 @@
{var node=document.createElement("span");node.textContent=textContent;return node;},_getRecordDetails:function()
{var details;if(this.coalesced)
return this._createSpanWithText(WebInspector.UIString("× %d",this.children.length));switch(this.type){case WebInspector.TimelineModel.RecordType.GCEvent:details=WebInspector.UIString("%s collected",Number.bytesToString(this.data["usedHeapSizeDelta"]));break;case WebInspector.TimelineModel.RecordType.TimerFire:details=this._linkifyScriptLocation(this.data["timerId"]);break;case WebInspector.TimelineModel.RecordType.FunctionCall:details=this._linkifyScriptLocation();break;case WebInspector.TimelineModel.RecordType.FireAnimationFrame:details=this._linkifyScriptLocation(this.data["id"]);break;case WebInspector.TimelineModel.RecordType.EventDispatch:details=this.data?this.data["type"]:null;break;case WebInspector.TimelineModel.RecordType.Paint:var width=this.data.clip?WebInspector.TimelinePresentationModel.quadWidth(this.data.clip):this.data.width;var height=this.data.clip?WebInspector.TimelinePresentationModel.quadHeight(this.data.clip):this.data.height;if(width&&height)
-details=WebInspector.UIString("%d\u2009\u00d7\u2009%d",width,height);break;case WebInspector.TimelineModel.RecordType.DecodeImage:details=this.data["imageType"];break;case WebInspector.TimelineModel.RecordType.ResizeImage:details=this.data["cached"]?WebInspector.UIString("cached"):WebInspector.UIString("non-cached");break;case WebInspector.TimelineModel.RecordType.TimerInstall:case WebInspector.TimelineModel.RecordType.TimerRemove:details=this._linkifyTopCallFrame(this.data["timerId"]);break;case WebInspector.TimelineModel.RecordType.RequestAnimationFrame:case WebInspector.TimelineModel.RecordType.CancelAnimationFrame:details=this._linkifyTopCallFrame(this.data["id"]);break;case WebInspector.TimelineModel.RecordType.ParseHTML:case WebInspector.TimelineModel.RecordType.RecalculateStyles:details=this._linkifyTopCallFrame();break;case WebInspector.TimelineModel.RecordType.EvaluateScript:details=this.url?this._linkifyLocation(this.url,this.data["lineNumber"],0):null;break;case WebInspector.TimelineModel.RecordType.XHRReadyStateChange:case WebInspector.TimelineModel.RecordType.XHRLoad:case WebInspector.TimelineModel.RecordType.ScheduleResourceRequest:case WebInspector.TimelineModel.RecordType.ResourceSendRequest:case WebInspector.TimelineModel.RecordType.ResourceReceivedData:case WebInspector.TimelineModel.RecordType.ResourceReceiveResponse:case WebInspector.TimelineModel.RecordType.ResourceFinish:details=WebInspector.displayNameForURL(this.url);break;case WebInspector.TimelineModel.RecordType.Time:case WebInspector.TimelineModel.RecordType.TimeEnd:details=this.data["message"];break;default:details=this._linkifyScriptLocation()||this._linkifyTopCallFrame()||null;break;}
+details=WebInspector.UIString("%d\u2009\u00d7\u2009%d",width,height);break;case WebInspector.TimelineModel.RecordType.TimerInstall:case WebInspector.TimelineModel.RecordType.TimerRemove:details=this._linkifyTopCallFrame(this.data["timerId"]);break;case WebInspector.TimelineModel.RecordType.RequestAnimationFrame:case WebInspector.TimelineModel.RecordType.CancelAnimationFrame:details=this._linkifyTopCallFrame(this.data["id"]);break;case WebInspector.TimelineModel.RecordType.ParseHTML:case WebInspector.TimelineModel.RecordType.RecalculateStyles:details=this._linkifyTopCallFrame();break;case WebInspector.TimelineModel.RecordType.EvaluateScript:details=this.url?this._linkifyLocation(this.url,this.data["lineNumber"],0):null;break;case WebInspector.TimelineModel.RecordType.XHRReadyStateChange:case WebInspector.TimelineModel.RecordType.XHRLoad:case WebInspector.TimelineModel.RecordType.ScheduleResourceRequest:case WebInspector.TimelineModel.RecordType.ResourceSendRequest:case WebInspector.TimelineModel.RecordType.ResourceReceivedData:case WebInspector.TimelineModel.RecordType.ResourceReceiveResponse:case WebInspector.TimelineModel.RecordType.ResourceFinish:case WebInspector.TimelineModel.RecordType.DecodeImage:case WebInspector.TimelineModel.RecordType.ResizeImage:details=WebInspector.displayNameForURL(this.url);break;case WebInspector.TimelineModel.RecordType.Time:case WebInspector.TimelineModel.RecordType.TimeEnd:details=this.data["message"];break;default:details=this._linkifyScriptLocation()||this._linkifyTopCallFrame()||null;break;}
if(details){if(details instanceof Node)
details.tabIndex=-1;else
return this._createSpanWithText(""+details);}
@@ -588,7 +593,7 @@
this.average=totalDuration/this.frameCount;var variance=sumOfSquares/this.frameCount-this.average*this.average;this.stddev=Math.sqrt(variance);}
WebInspector.TimelineFrame=function()
{this.timeByCategory={};this.cpuTime=0;};WebInspector.TimelinePanel=function()
-{WebInspector.Panel.call(this,"timeline");this.registerRequiredCSS("timelinePanel.css");this._model=new WebInspector.TimelineModel();this._presentationModel=new WebInspector.TimelinePresentationModel();this._overviewModeSetting=WebInspector.settings.createSetting("timelineOverviewMode",WebInspector.TimelineOverviewPane.Mode.Events);this._glueRecordsSetting=WebInspector.settings.createSetting("timelineGlueRecords",false);this._overviewPane=new WebInspector.TimelineOverviewPane(this._model);this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.WindowChanged,this._invalidateAndScheduleRefresh.bind(this,false,true));this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.ModeChanged,this._overviewModeChanged,this);this._overviewPane.show(this.element);this.element.addEventListener("contextmenu",this._contextMenu.bind(this),false);this.createSidebarViewWithTree();this._containerElement=this.splitView.element;this._containerElement.tabIndex=0;this._containerElement.id="timeline-container";this._containerElement.addEventListener("scroll",this._onScroll.bind(this),false);this._timelineMemorySplitter=this.element.createChild("div");this._timelineMemorySplitter.id="timeline-memory-splitter";WebInspector.installDragHandle(this._timelineMemorySplitter,this._startSplitterDragging.bind(this),this._splitterDragging.bind(this),this._endSplitterDragging.bind(this),"ns-resize");this._timelineMemorySplitter.addStyleClass("hidden");this._includeDomCounters=false;this._memoryStatistics=new WebInspector.DOMCountersGraph(this,this._model,this.splitView.sidebarWidth());this._includeDomCounters=true;WebInspector.settings.memoryCounterGraphsHeight=WebInspector.settings.createSetting("memoryCounterGraphsHeight",150);var itemsTreeElement=new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("RECORDS"),{},true);this.sidebarTree.appendChild(itemsTreeElement);this.sidebarTree.setFocusable(false);this._sidebarListElement=document.createElement("div");this.sidebarElement.appendChild(this._sidebarListElement);this._containerContentElement=this.splitView.mainElement;this._containerContentElement.id="resources-container-content";this._timelineGrid=new WebInspector.TimelineGrid();this._itemsGraphsElement=this._timelineGrid.itemsGraphsElement;this._itemsGraphsElement.id="timeline-graphs";this._containerContentElement.appendChild(this._timelineGrid.element);this._timelineGrid.gridHeaderElement.id="timeline-grid-header";this._memoryStatistics.setMainTimelineGrid(this._timelineGrid);this.element.appendChild(this._timelineGrid.gridHeaderElement);this._topGapElement=document.createElement("div");this._topGapElement.className="timeline-gap";this._itemsGraphsElement.appendChild(this._topGapElement);this._graphRowsElement=document.createElement("div");this._itemsGraphsElement.appendChild(this._graphRowsElement);this._bottomGapElement=document.createElement("div");this._bottomGapElement.className="timeline-gap";this._itemsGraphsElement.appendChild(this._bottomGapElement);this._expandElements=document.createElement("div");this._expandElements.id="orphan-expand-elements";this._itemsGraphsElement.appendChild(this._expandElements);this._calculator=new WebInspector.TimelineCalculator(this._model);this._createStatusBarItems();this._frameMode=false;this._boundariesAreValid=true;this._scrollTop=0;this._popoverHelper=new WebInspector.PopoverHelper(this.element,this._getPopoverAnchor.bind(this),this._showPopover.bind(this));this.element.addEventListener("mousemove",this._mouseMove.bind(this),false);this.element.addEventListener("mouseout",this._mouseOut.bind(this),false);this._durationFilter=new WebInspector.TimelineIsLongFilter();this._expandOffset=15;this._headerLineCount=1;this._adjustHeaderHeight();this._mainThreadTasks=([]);this._cpuBarsElement=this._timelineGrid.gridHeaderElement.createChild("div","timeline-cpu-bars");this._mainThreadMonitoringEnabled=WebInspector.settings.showCpuOnTimelineRuler.get();WebInspector.settings.showCpuOnTimelineRuler.addChangeListener(this._showCpuOnTimelineRulerChanged,this);this._createFileSelector();this._model.addEventListener(WebInspector.TimelineModel.Events.RecordAdded,this._onTimelineEventRecorded,this);this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleared,this._onRecordsCleared,this);this._registerShortcuts();this._allRecordsCount=0;this._presentationModel.addFilter(new WebInspector.TimelineWindowFilter(this._overviewPane));this._presentationModel.addFilter(new WebInspector.TimelineCategoryFilter());this._presentationModel.addFilter(this._durationFilter);}
+{WebInspector.Panel.call(this,"timeline");this.registerRequiredCSS("timelinePanel.css");this._model=new WebInspector.TimelineModel();this._presentationModel=new WebInspector.TimelinePresentationModel();this._overviewModeSetting=WebInspector.settings.createSetting("timelineOverviewMode",WebInspector.TimelineOverviewPane.Mode.Events);this._glueRecordsSetting=WebInspector.settings.createSetting("timelineGlueRecords",false);this._overviewPane=new WebInspector.TimelineOverviewPane(this._model);this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.WindowChanged,this._invalidateAndScheduleRefresh.bind(this,false,true));this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.ModeChanged,this._overviewModeChanged,this);this._overviewPane.show(this.element);this.element.addEventListener("contextmenu",this._contextMenu.bind(this),false);this.createSidebarViewWithTree();this._containerElement=this.splitView.element;this._containerElement.tabIndex=0;this._containerElement.id="timeline-container";this._containerElement.addEventListener("scroll",this._onScroll.bind(this),false);this._timelineMemorySplitter=this.element.createChild("div");this._timelineMemorySplitter.id="timeline-memory-splitter";WebInspector.installDragHandle(this._timelineMemorySplitter,this._startSplitterDragging.bind(this),this._splitterDragging.bind(this),this._endSplitterDragging.bind(this),"ns-resize");this._timelineMemorySplitter.addStyleClass("hidden");this._includeDomCounters=false;this._memoryStatistics=new WebInspector.DOMCountersGraph(this,this._model,this.splitView.sidebarWidth());this._includeDomCounters=true;WebInspector.settings.memoryCounterGraphsHeight=WebInspector.settings.createSetting("memoryCounterGraphsHeight",150);var itemsTreeElement=new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("RECORDS"),{},true);this.sidebarTree.appendChild(itemsTreeElement);this.sidebarTree.setFocusable(false);this._sidebarListElement=document.createElement("div");this.sidebarElement.appendChild(this._sidebarListElement);this._containerContentElement=this.splitView.mainElement;this._containerContentElement.id="resources-container-content";this._timelineGrid=new WebInspector.TimelineGrid();this._itemsGraphsElement=this._timelineGrid.itemsGraphsElement;this._itemsGraphsElement.id="timeline-graphs";this._containerContentElement.appendChild(this._timelineGrid.element);this._timelineGrid.gridHeaderElement.id="timeline-grid-header";this._memoryStatistics.setMainTimelineGrid(this._timelineGrid);this.element.appendChild(this._timelineGrid.gridHeaderElement);this._topGapElement=document.createElement("div");this._topGapElement.className="timeline-gap";this._itemsGraphsElement.appendChild(this._topGapElement);this._graphRowsElement=document.createElement("div");this._itemsGraphsElement.appendChild(this._graphRowsElement);this._bottomGapElement=document.createElement("div");this._bottomGapElement.className="timeline-gap";this._itemsGraphsElement.appendChild(this._bottomGapElement);this._expandElements=document.createElement("div");this._expandElements.id="orphan-expand-elements";this._itemsGraphsElement.appendChild(this._expandElements);this._calculator=new WebInspector.TimelineCalculator(this._model);this._createStatusBarItems();this._frameMode=false;this._boundariesAreValid=true;this._scrollTop=0;this._popoverHelper=new WebInspector.PopoverHelper(this.element,this._getPopoverAnchor.bind(this),this._showPopover.bind(this));this.element.addEventListener("mousemove",this._mouseMove.bind(this),false);this.element.addEventListener("mouseout",this._mouseOut.bind(this),false);this._durationFilter=new WebInspector.TimelineIsLongFilter();this._expandOffset=15;this._headerLineCount=1;this._adjustHeaderHeight();this._mainThreadTasks=([]);this._cpuBarsElement=this._timelineGrid.gridHeaderElement.createChild("div","timeline-cpu-bars");this._mainThreadMonitoringEnabled=WebInspector.settings.showCpuOnTimelineRuler.get();WebInspector.settings.showCpuOnTimelineRuler.addChangeListener(this._showCpuOnTimelineRulerChanged,this);this._createFileSelector();this._model.addEventListener(WebInspector.TimelineModel.Events.RecordAdded,this._onTimelineEventRecorded,this);this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleared,this._onRecordsCleared,this);this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted,this._onRecordingStarted,this);this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped,this._onRecordingStopped,this);this._registerShortcuts();this._allRecordsCount=0;this._presentationModel.addFilter(new WebInspector.TimelineWindowFilter(this._overviewPane));this._presentationModel.addFilter(new WebInspector.TimelineCategoryFilter());this._presentationModel.addFilter(this._durationFilter);}
WebInspector.TimelinePanel.rowHeight=18;WebInspector.TimelinePanel.durationFilterPresetsMs=[0,1,15];WebInspector.TimelinePanel.prototype={_showCpuOnTimelineRulerChanged:function()
{var mainThreadMonitoringEnabled=WebInspector.settings.showCpuOnTimelineRuler.get();if(this._mainThreadMonitoringEnabled!==mainThreadMonitoringEnabled){this._mainThreadMonitoringEnabled=mainThreadMonitoringEnabled;this._refreshMainThreadBars();}},_startSplitterDragging:function(event)
{this._dragOffset=this._timelineMemorySplitter.offsetTop+2-event.pageY;return true;},_splitterDragging:function(event)
@@ -602,14 +607,13 @@
{this._statusBarItems=([]);this.toggleTimelineButton=new WebInspector.StatusBarButton(WebInspector.UIString("Record"),"record-profile-status-bar-item");this.toggleTimelineButton.addEventListener("click",this._toggleTimelineButtonClicked,this);this._statusBarItems.push(this.toggleTimelineButton);this.clearButton=new WebInspector.StatusBarButton(WebInspector.UIString("Clear"),"clear-status-bar-item");this.clearButton.addEventListener("click",this._clearPanel,this);this._statusBarItems.push(this.clearButton);this.garbageCollectButton=new WebInspector.StatusBarButton(WebInspector.UIString("Collect Garbage"),"garbage-collect-status-bar-item");this.garbageCollectButton.addEventListener("click",this._garbageCollectButtonClicked,this);this._statusBarItems.push(this.garbageCollectButton);this._glueParentButton=new WebInspector.StatusBarButton(WebInspector.UIString("Glue asynchronous events to causes"),"glue-async-status-bar-item");this._glueParentButton.toggled=this._glueRecordsSetting.get();this._presentationModel.setGlueRecords(this._glueParentButton.toggled);this._glueParentButton.addEventListener("click",this._glueParentButtonClicked,this);this._statusBarItems.push(this._glueParentButton);this._durationFilterSelector=new WebInspector.StatusBarComboBox(this._durationFilterChanged.bind(this));for(var presetIndex=0;presetIndex<WebInspector.TimelinePanel.durationFilterPresetsMs.length;++presetIndex){var durationMs=WebInspector.TimelinePanel.durationFilterPresetsMs[presetIndex];var option=document.createElement("option");if(!durationMs){option.text=WebInspector.UIString("All");option.title=WebInspector.UIString("Show all records");}else{option.text=WebInspector.UIString("\u2265 %dms",durationMs);option.title=WebInspector.UIString("Hide records shorter than %dms",durationMs);}
option._durationMs=durationMs;this._durationFilterSelector.addOption(option);this._durationFilterSelector.element.title=this._durationFilterSelector.selectedOption().title;}
this._statusBarItems.push(this._durationFilterSelector);this._miscStatusBarItems=document.createElement("div");this._miscStatusBarItems.className="status-bar-items timeline-misc-status-bar-items";this._statusBarFilters=this._miscStatusBarItems.createChild("div","timeline-misc-status-bar-filters");var categories=WebInspector.TimelinePresentationModel.categories();for(var categoryName in categories){var category=categories[categoryName];if(category.overviewStripGroupIndex<0)
-continue;this._statusBarFilters.appendChild(this._createTimelineCategoryStatusBarCheckbox(category,this._onCategoryCheckboxClicked.bind(this,category)));}
-var statsContainer=this._statusBarFilters.createChild("div");statsContainer.className="timeline-records-stats-container";this.recordsCounter=statsContainer.createChild("div");this.recordsCounter.className="timeline-records-stats";this.frameStatistics=statsContainer.createChild("div");this.frameStatistics.className="timeline-records-stats hidden";function getAnchor()
+continue;this._statusBarFilters.appendChild(this._createTimelineCategoryStatusBarCheckbox(category));}
+var statsContainer=this._statusBarFilters.createChild("div","timeline-records-stats-container");this.recordsCounter=statsContainer.createChild("div","timeline-records-stats");this.frameStatistics=statsContainer.createChild("div","timeline-records-stats hidden");function getAnchor()
{return this.frameStatistics;}
-this._frameStatisticsPopoverHelper=new WebInspector.PopoverHelper(this.frameStatistics,getAnchor.bind(this),this._showFrameStatistics.bind(this));},_createTimelineCategoryStatusBarCheckbox:function(category,onCheckboxClicked)
-{var labelContainer=document.createElement("div");labelContainer.addStyleClass("timeline-category-statusbar-item");labelContainer.addStyleClass("timeline-category-"+category.name);labelContainer.addStyleClass("status-bar-item");var label=document.createElement("label");var checkBorder=label.createChild("div","timeline-category-checkbox");var checkElement=checkBorder.createChild("div","timeline-category-checkbox-check timeline-category-checkbox-checked");checkElement.type="checkbox";checkElement.checked=true;checkElement.addEventListener("click",listener,false);function listener(event)
-{checkElement.checked=!checkElement.checked;checkElement.enableStyleClass("timeline-category-checkbox-checked",checkElement.checked);onCheckboxClicked(event);}
-var typeElement=document.createElement("span");typeElement.className="type";typeElement.textContent=category.title;label.appendChild(typeElement);labelContainer.appendChild(label);return labelContainer;},_onCategoryCheckboxClicked:function(category,event)
-{category.hidden=!event.target.checked;this._invalidateAndScheduleRefresh(true,true);},_setOperationInProgress:function(indicator)
+this._frameStatisticsPopoverHelper=new WebInspector.PopoverHelper(this.frameStatistics,getAnchor.bind(this),this._showFrameStatistics.bind(this));},_createTimelineCategoryStatusBarCheckbox:function(category)
+{var labelContainer=document.createElement("div");labelContainer.addStyleClass("timeline-category-statusbar-item");labelContainer.addStyleClass("timeline-category-"+category.name);labelContainer.addStyleClass("status-bar-item");var label=labelContainer.createChild("label");var checkBorder=label.createChild("div","timeline-category-checkbox");var checkElement=checkBorder.createChild("div","timeline-category-checkbox-check timeline-category-checkbox-checked");checkElement.type="checkbox";checkElement.checked=true;labelContainer.addEventListener("click",listener.bind(this),false);function listener(event)
+{var checked=!checkElement.checked;checkElement.checked=checked;category.hidden=!checked;checkElement.enableStyleClass("timeline-category-checkbox-checked",checkElement.checked);this._invalidateAndScheduleRefresh(true,true);}
+var typeElement=label.createChild("span","type");typeElement.textContent=category.title;return labelContainer;},_setOperationInProgress:function(indicator)
{this._operationInProgress=!!indicator;for(var i=0;i<this._statusBarItems.length;++i)
this._statusBarItems[i].setEnabled(!this._operationInProgress);this._glueParentButton.setEnabled(!this._operationInProgress&&!this._frameController);this._miscStatusBarItems.removeChildren();this._miscStatusBarItems.appendChild(indicator?indicator.element:this._statusBarFilters);},_registerShortcuts:function()
{this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.StartStopRecording,this._toggleTimelineButtonClicked.bind(this));this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.SaveToFile,this._saveToFile.bind(this));this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.LoadFromFile,this._selectFileToLoad.bind(this));},_createFileSelector:function()
@@ -623,7 +627,7 @@
{var progressIndicator=this._prepareToLoadTimeline();if(!progressIndicator)
return;this._model.loadFromURL(url,progressIndicator);},_prepareToLoadTimeline:function()
{if(this._operationInProgress)
-return null;if(this.toggleTimelineButton.toggled){this.toggleTimelineButton.toggled=false;this._model.stopRecord();}
+return null;if(this.toggleTimelineButton.toggled){this.toggleTimelineButton.toggled=false;this._model.stopRecording();}
var progressIndicator=new WebInspector.ProgressIndicator();progressIndicator.addEventListener(WebInspector.ProgressIndicator.Events.Done,this._setOperationInProgress.bind(this,null));this._setOperationInProgress(progressIndicator);return progressIndicator;},_rootRecord:function()
{return this._presentationModel.rootRecord();},_updateRecordsCounter:function(recordsInWindowCount)
{this.recordsCounter.textContent=WebInspector.UIString("%d of %d records shown",recordsInWindowCount,this._allRecordsCount);},_updateFrameStatistics:function(frames)
@@ -644,14 +648,14 @@
if(shouldShowMemory===this._memoryStatistics.visible())
return;if(!shouldShowMemory){this._timelineMemorySplitter.addStyleClass("hidden");this._memoryStatistics.hide();this.splitView.element.style.height="auto";this.splitView.element.style.bottom="0";this.onResize();}else{this._timelineMemorySplitter.removeStyleClass("hidden");this._memoryStatistics.show();this.splitView.element.style.bottom="auto";this._setSplitterPosition(WebInspector.settings.memoryCounterGraphsHeight.get());}},_toggleTimelineButtonClicked:function()
{if(this._operationInProgress)
-return true;if(this.toggleTimelineButton.toggled){this._model.stopRecord();this.toggleTimelineButton.title=WebInspector.UIString("Record");}else{this._model.startRecord(this._includeDomCounters);this.toggleTimelineButton.title=WebInspector.UIString("Stop");WebInspector.userMetrics.TimelineStarted.record();}
-this.toggleTimelineButton.toggled=!this.toggleTimelineButton.toggled;return true;},_durationFilterChanged:function()
+return true;if(this.toggleTimelineButton.toggled){this._model.stopRecording();}else{this._model.startRecording(this._includeDomCounters);WebInspector.userMetrics.TimelineStarted.record();}
+return true;},_durationFilterChanged:function()
{var option=this._durationFilterSelector.selectedOption();var minimumRecordDuration=+option._durationMs/1000.0;this._durationFilter.setMinimumRecordDuration(minimumRecordDuration);this._durationFilterSelector.element.title=option.title;this._invalidateAndScheduleRefresh(true,true);},_garbageCollectButtonClicked:function()
{HeapProfilerAgent.collectGarbage();},_glueParentButtonClicked:function()
{var newValue=!this._glueParentButton.toggled;this._glueParentButton.toggled=newValue;this._presentationModel.setGlueRecords(newValue);this._glueRecordsSetting.set(newValue);this._repopulateRecords();},_repopulateRecords:function()
{this._resetPanel();this._automaticallySizeWindow=false;var records=this._model.records;for(var i=0;i<records.length;++i)
this._innerAddRecordToTimeline(records[i]);this._invalidateAndScheduleRefresh(false,false);},_onTimelineEventRecorded:function(event)
-{if(this._innerAddRecordToTimeline(event.data))
+{if(this._innerAddRecordToTimeline((event.data)))
this._invalidateAndScheduleRefresh(false,false);},_innerAddRecordToTimeline:function(record)
{if(record.type===WebInspector.TimelineModel.RecordType.Program){this._mainThreadTasks.push({startTime:WebInspector.TimelineModel.startTimeInSeconds(record),endTime:WebInspector.TimelineModel.endTimeInSeconds(record)});}
var records=this._presentationModel.addRecord(record);this._allRecordsCount+=records.length;var hasVisibleRecords=false;var presentationModel=this._presentationModel;function checkVisible(record)
@@ -663,7 +667,9 @@
{this._resize(this.splitView.sidebarWidth());},_resize:function(sidebarWidth)
{this._closeRecordDetails();this._graphRowsElementWidth=this._graphRowsElement.offsetWidth;this._containerElementHeight=this._containerElement.clientHeight;this._scheduleRefresh(false,true);var lastItemElement=this._statusBarItems[this._statusBarItems.length-1].element;var minFloatingStatusBarItemsOffset=lastItemElement.totalOffsetLeft()+lastItemElement.offsetWidth;this._timelineGrid.gridHeaderElement.style.width=this._itemsGraphsElement.offsetWidth+"px";this._miscStatusBarItems.style.left=Math.max(minFloatingStatusBarItemsOffset,sidebarWidth)+"px";},_clearPanel:function()
{this._model.reset();},_onRecordsCleared:function()
-{this._resetPanel();this._invalidateAndScheduleRefresh(true,true);},_resetPanel:function()
+{this._resetPanel();this._invalidateAndScheduleRefresh(true,true);},_onRecordingStarted:function()
+{this.toggleTimelineButton.title=WebInspector.UIString("Stop");this.toggleTimelineButton.toggled=true;},_onRecordingStopped:function()
+{this.toggleTimelineButton.title=WebInspector.UIString("Record");this.toggleTimelineButton.toggled=false;},_resetPanel:function()
{this._presentationModel.reset();this._boundariesAreValid=false;this._adjustScrollPosition(0);this._closeRecordDetails();this._allRecordsCount=0;this._automaticallySizeWindow=true;this._mainThreadTasks=[];},elementsToRestoreScrollPositionsFor:function()
{return[this._containerElement];},wasShown:function()
{WebInspector.Panel.prototype.wasShown.call(this);if(!WebInspector.TimelinePanel._categoryStylesInitialized){WebInspector.TimelinePanel._categoryStylesInitialized=true;this._injectCategoryStyles();}
@@ -753,7 +759,9 @@
selectedIndex=0;this._selectSearchResult(selectedIndex);}else{WebInspector.searchController.updateSearchMatchesCount(0,this);delete this._selectedSearchResult;}},searchCanceled:function()
{this._clearHighlight();delete this._searchResults;delete this._selectedSearchResult;delete this._searchRegExp;},canFilter:function()
{return true;},performFilter:function(searchQuery)
-{this._presentationModel.removeFilter(this._searchFilter);delete this._searchFilter;this.searchCanceled();if(searchQuery){this._searchFilter=new WebInspector.TimelineSearchFilter(createPlainTextSearchRegex(searchQuery,"i"));this._presentationModel.addFilter(this._searchFilter);}
+{this._presentationModel.setSearchFilter(null);delete this._searchFilter;function cleanRecord(record)
+{delete record.clicked;}
+WebInspector.TimelinePresentationModel.forAllRecords(this._presentationModel.rootRecord().children,cleanRecord);this.searchCanceled();if(searchQuery){this._searchFilter=new WebInspector.TimelineSearchFilter(createPlainTextSearchRegex(searchQuery,"i"));this._presentationModel.setSearchFilter(this._searchFilter);}
this._invalidateAndScheduleRefresh(true,true);},performSearch:function(query,shouldJump)
{this._searchRegExp=createPlainTextSearchRegex(query,"i");delete this._searchResults;this._updateSearchHighlight(true,shouldJump);},__proto__:WebInspector.Panel.prototype}
WebInspector.TimelineCalculator=function(model)
@@ -794,12 +802,12 @@
{this._record=record;this.element.className="timeline-graph-side timeline-category-"+record.category.name;if(isEven)
this.element.addStyleClass("even");if(record.isBackground)
this.element.addStyleClass("background");var barPosition=calculator.computeBarGraphWindowPosition(record);this._barWithChildrenElement.style.left=barPosition.left+"px";this._barWithChildrenElement.style.width=barPosition.widthWithChildren+"px";this._barElement.style.left=barPosition.left+"px";this._barElement.style.width=barPosition.width+"px";this._barCpuElement.style.left=barPosition.left+"px";this._barCpuElement.style.width=barPosition.cpuWidth+"px";this._expandElement._update(record,index,barPosition.left-expandOffset,barPosition.width);},_onClick:function(event)
-{this._record.collapsed=!this._record.collapsed;this._scheduleRefresh(false,true);},dispose:function()
+{this._record.collapsed=!this._record.collapsed;this._record.clicked=true;this._scheduleRefresh(false,true);},dispose:function()
{this.element.remove();this._expandElement._dispose();}}
WebInspector.TimelineExpandableElement=function(container)
{this._element=container.createChild("div","timeline-expandable");this._element.createChild("div","timeline-expandable-left");this._element.createChild("div","timeline-expandable-arrow");}
WebInspector.TimelineExpandableElement.prototype={_update:function(record,index,left,width)
-{const rowHeight=WebInspector.TimelinePanel.rowHeight;if(record.visibleChildrenCount||record.invisibleChildrenCount){this._element.style.top=index*rowHeight+"px";this._element.style.left=left+"px";this._element.style.width=Math.max(12,width+25)+"px";if(!record.collapsed){this._element.style.height=(record.visibleChildrenCount+1)*rowHeight+"px";this._element.addStyleClass("timeline-expandable-expanded");this._element.removeStyleClass("timeline-expandable-collapsed");}else{this._element.style.height=rowHeight+"px";this._element.addStyleClass("timeline-expandable-collapsed");this._element.removeStyleClass("timeline-expandable-expanded");}
+{const rowHeight=WebInspector.TimelinePanel.rowHeight;if(record.visibleChildrenCount||record.expandable){this._element.style.top=index*rowHeight+"px";this._element.style.left=left+"px";this._element.style.width=Math.max(12,width+25)+"px";if(!record.collapsed){this._element.style.height=(record.visibleChildrenCount+1)*rowHeight+"px";this._element.addStyleClass("timeline-expandable-expanded");this._element.removeStyleClass("timeline-expandable-collapsed");}else{this._element.style.height=rowHeight+"px";this._element.addStyleClass("timeline-expandable-collapsed");this._element.removeStyleClass("timeline-expandable-expanded");}
this._element.removeStyleClass("hidden");}else
this._element.addStyleClass("hidden");},_dispose:function()
{this._element.remove();}}
« no previous file with comments | « chrome_linux/resources/inspector/SourcesPanel.js ('k') | chrome_linux/resources/inspector/canvasProfiler.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698