| OLD | NEW |
| 1 WebInspector.MemoryStatistics=function(timelinePanel,model,sidebarWidth) | 1 WebInspector.MemoryStatistics=function(timelinePanel,model,sidebarWidth) |
| 2 {this._timelinePanel=timelinePanel;this._counters=[];model.addEventListener(WebI
nspector.TimelineModel.Events.RecordAdded,this._onRecordAdded,this);model.addEve
ntListener(WebInspector.TimelineModel.Events.RecordsCleared,this._onRecordsClear
ed,this);this._containerAnchor=timelinePanel.element.lastChild;this._memorySideb
arView=new WebInspector.SidebarView(WebInspector.SidebarView.SidebarPosition.Sta
rt,undefined,sidebarWidth);this._memorySidebarView.sidebarElement.addStyleClass(
"sidebar");this._memorySidebarView.element.id="memory-graphs-container";this._me
morySidebarView.addEventListener(WebInspector.SidebarView.EventTypes.Resized,thi
s._sidebarResized.bind(this));this._canvasContainer=this._memorySidebarView.main
Element;this._canvasContainer.id="memory-graphs-canvas-container";this._createCu
rrentValuesBar();this._canvas=this._canvasContainer.createChild("canvas");this._
canvas.id="memory-counters-graph";this._lastMarkerXPosition=0;this._canvas.addEv
entListener("mouseover",this._onMouseOver.bind(this),true);this._canvas.addEvent
Listener("mousemove",this._onMouseMove.bind(this),true);this._canvas.addEventLis
tener("mouseout",this._onMouseOut.bind(this),true);this._canvas.addEventListener
("click",this._onClick.bind(this),true);this._timelineGrid=new WebInspector.Time
lineGrid();this._canvasContainer.appendChild(this._timelineGrid.dividersElement)
;this._memorySidebarView.sidebarElement.createChild("div","sidebar-tree sidebar-
tree-section").textContent=WebInspector.UIString("COUNTERS");this._counterUI=thi
s._createCounterUIList();} | 2 {this._timelinePanel=timelinePanel;this._counters=[];model.addEventListener(WebI
nspector.TimelineModel.Events.RecordAdded,this._onRecordAdded,this);model.addEve
ntListener(WebInspector.TimelineModel.Events.RecordsCleared,this._onRecordsClear
ed,this);this._containerAnchor=timelinePanel.element.lastChild;this._memorySideb
arView=new WebInspector.SidebarView(WebInspector.SidebarView.SidebarPosition.Sta
rt,undefined,sidebarWidth);this._memorySidebarView.sidebarElement.addStyleClass(
"sidebar");this._memorySidebarView.element.id="memory-graphs-container";this._me
morySidebarView.addEventListener(WebInspector.SidebarView.EventTypes.Resized,thi
s._sidebarResized.bind(this));this._canvasContainer=this._memorySidebarView.main
Element;this._canvasContainer.id="memory-graphs-canvas-container";this._createCu
rrentValuesBar();this._canvas=this._canvasContainer.createChild("canvas");this._
canvas.id="memory-counters-graph";this._lastMarkerXPosition=0;this._canvas.addEv
entListener("mouseover",this._onMouseOver.bind(this),true);this._canvas.addEvent
Listener("mousemove",this._onMouseMove.bind(this),true);this._canvas.addEventLis
tener("mouseout",this._onMouseOut.bind(this),true);this._canvas.addEventListener
("click",this._onClick.bind(this),true);this._timelineGrid=new WebInspector.Time
lineGrid();this._canvasContainer.appendChild(this._timelineGrid.dividersElement)
;this._memorySidebarView.sidebarElement.createChild("div","sidebar-tree sidebar-
tree-section").textContent=WebInspector.UIString("COUNTERS");this._counterUI=thi
s._createCounterUIList();} |
| 3 WebInspector.MemoryStatistics.Counter=function(time) | 3 WebInspector.MemoryStatistics.Counter=function(time) |
| 4 {this.time=time;} | 4 {this.time=time;} |
| 5 WebInspector.SwatchCheckbox=function(title,color) | 5 WebInspector.SwatchCheckbox=function(title,color) |
| 6 {this.element=document.createElement("div");this._swatch=this.element.createChil
d("div","swatch");this.element.createChild("span","title").textContent=title;thi
s._color=color;this.checked=true;this.element.addEventListener("click",this._tog
gleCheckbox.bind(this),true);} | 6 {this.element=document.createElement("div");this._swatch=this.element.createChil
d("div","swatch");this.element.createChild("span","title").textContent=title;thi
s._color=color;this.checked=true;this.element.addEventListener("click",this._tog
gleCheckbox.bind(this),true);} |
| 7 WebInspector.SwatchCheckbox.Events={Changed:"Changed"} | 7 WebInspector.SwatchCheckbox.Events={Changed:"Changed"} |
| 8 WebInspector.SwatchCheckbox.prototype={get checked() | 8 WebInspector.SwatchCheckbox.prototype={get checked() |
| 9 {return this._checked;},set checked(v) | 9 {return this._checked;},set checked(v) |
| 10 {this._checked=v;if(this._checked) | 10 {this._checked=v;if(this._checked) |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 continue;var y=counterUI.graphYValues[index];ctx.beginPath();ctx.arc(x,y,radius,
0,Math.PI*2,true);ctx.lineWidth=1;ctx.fillStyle=counterUI.graphColor;ctx.strokeS
tyle=counterUI.graphColor;ctx.fill();ctx.stroke();ctx.closePath();}},_drawGraph:
function(counterUI) | 107 continue;var y=counterUI.graphYValues[index];ctx.beginPath();ctx.arc(x,y,radius,
0,Math.PI*2,true);ctx.lineWidth=1;ctx.fillStyle=counterUI.graphColor;ctx.strokeS
tyle=counterUI.graphColor;ctx.fill();ctx.stroke();ctx.closePath();}},_drawGraph:
function(counterUI) |
| 108 {var canvas=this._canvas;var ctx=canvas.getContext("2d");var width=canvas.width;
var height=this._clippedHeight;var originY=this._originY;var valueGetter=counter
UI.valueGetter;if(!this._counters.length) | 108 {var canvas=this._canvas;var ctx=canvas.getContext("2d");var width=canvas.width;
var height=this._clippedHeight;var originY=this._originY;var valueGetter=counter
UI.valueGetter;if(!this._counters.length) |
| 109 return;var maxValue;var minValue;for(var i=this._minimumIndex;i<=this._maximumIn
dex;i++){var value=valueGetter(this._counters[i]);if(minValue===undefined||value
<minValue) | 109 return;var maxValue;var minValue;for(var i=this._minimumIndex;i<=this._maximumIn
dex;i++){var value=valueGetter(this._counters[i]);if(minValue===undefined||value
<minValue) |
| 110 minValue=value;if(maxValue===undefined||value>maxValue) | 110 minValue=value;if(maxValue===undefined||value>maxValue) |
| 111 maxValue=value;} | 111 maxValue=value;} |
| 112 counterUI.setRange(minValue,maxValue);if(!counterUI.visible) | 112 counterUI.setRange(minValue,maxValue);if(!counterUI.visible) |
| 113 return;var yValues=counterUI.graphYValues;yValues.length=this._counters.length;v
ar maxYRange=maxValue-minValue;var yFactor=maxYRange?height/(maxYRange):1;ctx.be
ginPath();var currentY=originY+(height-(valueGetter(this._counters[this._minimum
Index])-minValue)*yFactor);ctx.moveTo(0,currentY);for(var i=this._minimumIndex;i
<=this._maximumIndex;i++){var x=this._counters[i].x;ctx.lineTo(x,currentY);curre
ntY=originY+(height-(valueGetter(this._counters[i])-minValue)*yFactor);ctx.lineT
o(x,currentY);yValues[i]=currentY;} | 113 return;var yValues=counterUI.graphYValues;yValues.length=this._counters.length;v
ar maxYRange=maxValue-minValue;var yFactor=maxYRange?height/(maxYRange):1;ctx.be
ginPath();var currentY=originY+(height-(valueGetter(this._counters[this._minimum
Index])-minValue)*yFactor);ctx.moveTo(0,currentY);for(var i=this._minimumIndex;i
<=this._maximumIndex;i++){var x=this._counters[i].x;ctx.lineTo(x,currentY);curre
ntY=originY+(height-(valueGetter(this._counters[i])-minValue)*yFactor);ctx.lineT
o(x,currentY);yValues[i]=currentY;} |
| 114 ctx.lineTo(width,currentY);ctx.lineWidth=1;ctx.strokeStyle=counterUI.graphColor;
ctx.stroke();ctx.closePath();},_discardImageUnderMarker:function() | 114 ctx.lineTo(width,currentY);ctx.lineWidth=1;ctx.strokeStyle=counterUI.graphColor;
ctx.stroke();ctx.closePath();},_discardImageUnderMarker:function() |
| 115 {for(var i=0;i<this._counterUI.length;i++) | 115 {for(var i=0;i<this._counterUI.length;i++) |
| 116 this._counterUI[i].discardImageUnderMarker();},__proto__:WebInspector.MemoryStat
istics.prototype};WebInspector.TimelineModel=function() | 116 this._counterUI[i].discardImageUnderMarker();},__proto__:WebInspector.MemoryStat
istics.prototype};WebInspector.TimelineModel=function() |
| 117 {this._records=[];this._stringPool=new StringPool();this._minimumRecordTime=-1;t
his._maximumRecordTime=-1;this._collectionEnabled=false;WebInspector.timelineMan
ager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecor
ded,this._onRecordAdded,this);WebInspector.timelineManager.addEventListener(WebI
nspector.TimelineManager.EventTypes.TimelineStartEvent,this._onTimelineStarted,t
his);} | 117 {this._records=[];this._stringPool=new StringPool();this._minimumRecordTime=-1;t
his._maximumRecordTime=-1;WebInspector.timelineManager.addEventListener(WebInspe
ctor.TimelineManager.EventTypes.TimelineEventRecorded,this._onRecordAdded,this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event
Types.TimelineStarted,this._onStarted,this);WebInspector.timelineManager.addEven
tListener(WebInspector.TimelineManager.EventTypes.TimelineStopped,this._onStoppe
d,this);} |
| 118 WebInspector.TimelineModel.TransferChunkLengthBytes=5000000;WebInspector.Timelin
eModel.RecordType={Root:"Root",Program:"Program",EventDispatch:"EventDispatch",B
eginFrame:"BeginFrame",ScheduleStyleRecalculation:"ScheduleStyleRecalculation",R
ecalculateStyles:"RecalculateStyles",InvalidateLayout:"InvalidateLayout",Layout:
"Layout",PaintSetup:"PaintSetup",Paint:"Paint",Rasterize:"Rasterize",ScrollLayer
:"ScrollLayer",DecodeImage:"DecodeImage",ResizeImage:"ResizeImage",CompositeLaye
rs:"CompositeLayers",ParseHTML:"ParseHTML",TimerInstall:"TimerInstall",TimerRemo
ve:"TimerRemove",TimerFire:"TimerFire",XHRReadyStateChange:"XHRReadyStateChange"
,XHRLoad:"XHRLoad",EvaluateScript:"EvaluateScript",MarkLoad:"MarkLoad",MarkDOMCo
ntent:"MarkDOMContent",TimeStamp:"TimeStamp",Time:"Time",TimeEnd:"TimeEnd",Sched
uleResourceRequest:"ScheduleResourceRequest",ResourceSendRequest:"ResourceSendRe
quest",ResourceReceiveResponse:"ResourceReceiveResponse",ResourceReceivedData:"R
esourceReceivedData",ResourceFinish:"ResourceFinish",FunctionCall:"FunctionCall"
,GCEvent:"GCEvent",RequestAnimationFrame:"RequestAnimationFrame",CancelAnimation
Frame:"CancelAnimationFrame",FireAnimationFrame:"FireAnimationFrame",WebSocketCr
eate:"WebSocketCreate",WebSocketSendHandshakeRequest:"WebSocketSendHandshakeRequ
est",WebSocketReceiveHandshakeResponse:"WebSocketReceiveHandshakeResponse",WebSo
cketDestroy:"WebSocketDestroy",} | 118 WebInspector.TimelineModel.TransferChunkLengthBytes=5000000;WebInspector.Timelin
eModel.RecordType={Root:"Root",Program:"Program",EventDispatch:"EventDispatch",B
eginFrame:"BeginFrame",ScheduleStyleRecalculation:"ScheduleStyleRecalculation",R
ecalculateStyles:"RecalculateStyles",InvalidateLayout:"InvalidateLayout",Layout:
"Layout",PaintSetup:"PaintSetup",Paint:"Paint",Rasterize:"Rasterize",ScrollLayer
:"ScrollLayer",DecodeImage:"DecodeImage",ResizeImage:"ResizeImage",CompositeLaye
rs:"CompositeLayers",ParseHTML:"ParseHTML",TimerInstall:"TimerInstall",TimerRemo
ve:"TimerRemove",TimerFire:"TimerFire",XHRReadyStateChange:"XHRReadyStateChange"
,XHRLoad:"XHRLoad",EvaluateScript:"EvaluateScript",MarkLoad:"MarkLoad",MarkDOMCo
ntent:"MarkDOMContent",TimeStamp:"TimeStamp",Time:"Time",TimeEnd:"TimeEnd",Sched
uleResourceRequest:"ScheduleResourceRequest",ResourceSendRequest:"ResourceSendRe
quest",ResourceReceiveResponse:"ResourceReceiveResponse",ResourceReceivedData:"R
esourceReceivedData",ResourceFinish:"ResourceFinish",FunctionCall:"FunctionCall"
,GCEvent:"GCEvent",RequestAnimationFrame:"RequestAnimationFrame",CancelAnimation
Frame:"CancelAnimationFrame",FireAnimationFrame:"FireAnimationFrame",WebSocketCr
eate:"WebSocketCreate",WebSocketSendHandshakeRequest:"WebSocketSendHandshakeRequ
est",WebSocketReceiveHandshakeResponse:"WebSocketReceiveHandshakeResponse",WebSo
cketDestroy:"WebSocketDestroy",} |
| 119 WebInspector.TimelineModel.Events={RecordAdded:"RecordAdded",RecordsCleared:"Rec
ordsCleared"} | 119 WebInspector.TimelineModel.Events={RecordAdded:"RecordAdded",RecordsCleared:"Rec
ordsCleared",RecordingStarted:"RecordingStarted",RecordingStopped:"RecordingStop
ped"} |
| 120 WebInspector.TimelineModel.startTimeInSeconds=function(record) | 120 WebInspector.TimelineModel.startTimeInSeconds=function(record) |
| 121 {return record.startTime/1000;} | 121 {return record.startTime/1000;} |
| 122 WebInspector.TimelineModel.endTimeInSeconds=function(record) | 122 WebInspector.TimelineModel.endTimeInSeconds=function(record) |
| 123 {return(typeof record.endTime==="undefined"?record.startTime:record.endTime)/100
0;} | 123 {return(typeof record.endTime==="undefined"?record.startTime:record.endTime)/100
0;} |
| 124 WebInspector.TimelineModel.durationInSeconds=function(record) | 124 WebInspector.TimelineModel.durationInSeconds=function(record) |
| 125 {return WebInspector.TimelineModel.endTimeInSeconds(record)-WebInspector.Timelin
eModel.startTimeInSeconds(record);} | 125 {return WebInspector.TimelineModel.endTimeInSeconds(record)-WebInspector.Timelin
eModel.startTimeInSeconds(record);} |
| 126 WebInspector.TimelineModel.aggregateTimeForRecord=function(total,rawRecord) | 126 WebInspector.TimelineModel.aggregateTimeForRecord=function(total,rawRecord) |
| 127 {var childrenTime=0;var children=rawRecord["children"]||[];for(var i=0;i<childre
n.length;++i){WebInspector.TimelineModel.aggregateTimeForRecord(total,children[i
]);childrenTime+=WebInspector.TimelineModel.durationInSeconds(children[i]);} | 127 {var childrenTime=0;var children=rawRecord["children"]||[];for(var i=0;i<childre
n.length;++i){WebInspector.TimelineModel.aggregateTimeForRecord(total,children[i
]);childrenTime+=WebInspector.TimelineModel.durationInSeconds(children[i]);} |
| 128 var categoryName=WebInspector.TimelinePresentationModel.recordStyle(rawRecord).c
ategory.name;var ownTime=WebInspector.TimelineModel.durationInSeconds(rawRecord)
-childrenTime;total[categoryName]=(total[categoryName]||0)+ownTime;} | 128 var categoryName=WebInspector.TimelinePresentationModel.recordStyle(rawRecord).c
ategory.name;var ownTime=WebInspector.TimelineModel.durationInSeconds(rawRecord)
-childrenTime;total[categoryName]=(total[categoryName]||0)+ownTime;} |
| 129 WebInspector.TimelineModel.aggregateTimeByCategory=function(total,addend) | 129 WebInspector.TimelineModel.aggregateTimeByCategory=function(total,addend) |
| 130 {for(var category in addend) | 130 {for(var category in addend) |
| 131 total[category]=(total[category]||0)+addend[category];} | 131 total[category]=(total[category]||0)+addend[category];} |
| 132 WebInspector.TimelineModel.prototype={startRecord:function(includeDomCounters) | 132 WebInspector.TimelineModel.prototype={startRecording:function(includeDomCounters
) |
| 133 {if(this._collectionEnabled) | 133 {this._clientInitiatedRecording=true;this.reset();var maxStackFrames=WebInspecto
r.settings.timelineLimitStackFramesFlag.get()?WebInspector.settings.timelineStac
kFramesToCapture.get():30;WebInspector.timelineManager.start(maxStackFrames,incl
udeDomCounters,false,this._fireRecordingStarted.bind(this));},stopRecording:func
tion() |
| 134 return;this.reset();var maxStackFrames=WebInspector.settings.timelineLimitStackF
ramesFlag.get()?WebInspector.settings.timelineStackFramesToCapture.get():30;WebI
nspector.timelineManager.start(maxStackFrames,includeDomCounters);this._collecti
onEnabled=true;},stopRecord:function() | 134 {if(!this._clientInitiatedRecording){function stopTimeline() |
| 135 {if(!this._collectionEnabled) | 135 {WebInspector.timelineManager.stop(this._fireRecordingStopped.bind(this));} |
| 136 return;WebInspector.timelineManager.stop();this._collectionEnabled=false;},get r
ecords() | 136 WebInspector.timelineManager.start(undefined,undefined,undefined,stopTimeline.bi
nd(this));return;} |
| 137 this._clientInitiatedRecording=false;WebInspector.timelineManager.stop(this._fir
eRecordingStopped.bind(this));},get records() |
| 137 {return this._records;},_onRecordAdded:function(event) | 138 {return this._records;},_onRecordAdded:function(event) |
| 138 {if(this._collectionEnabled) | 139 {if(this._collectionEnabled) |
| 139 this._addRecord(event.data);},_addRecord:function(record) | 140 this._addRecord((event.data));},_onStarted:function(event) |
| 141 {if(event.data){this._fireRecordingStarted();}},_onStopped:function(event) |
| 142 {if(event.data){this._fireRecordingStopped();}},_fireRecordingStarted:function() |
| 143 {this._collectionEnabled=true;this.dispatchEventToListeners(WebInspector.Timelin
eModel.Events.RecordingStarted);},_fireRecordingStopped:function() |
| 144 {this._collectionEnabled=false;this.dispatchEventToListeners(WebInspector.Timeli
neModel.Events.RecordingStopped);},_addRecord:function(record) |
| 140 {this._stringPool.internObjectStrings(record);this._records.push(record);this._u
pdateBoundaries(record);this.dispatchEventToListeners(WebInspector.TimelineModel
.Events.RecordAdded,record);},loadFromFile:function(file,progress) | 145 {this._stringPool.internObjectStrings(record);this._records.push(record);this._u
pdateBoundaries(record);this.dispatchEventToListeners(WebInspector.TimelineModel
.Events.RecordAdded,record);},loadFromFile:function(file,progress) |
| 141 {var delegate=new WebInspector.TimelineModelLoadFromFileDelegate(this,progress);
var fileReader=this._createFileReader(file,delegate);var loader=new WebInspector
.TimelineModelLoader(this,fileReader,progress);fileReader.start(loader);},loadFr
omURL:function(url,progress) | 146 {var delegate=new WebInspector.TimelineModelLoadFromFileDelegate(this,progress);
var fileReader=this._createFileReader(file,delegate);var loader=new WebInspector
.TimelineModelLoader(this,fileReader,progress);fileReader.start(loader);},loadFr
omURL:function(url,progress) |
| 142 {var delegate=new WebInspector.TimelineModelLoadFromFileDelegate(this,progress);
var urlReader=new WebInspector.ChunkedXHRReader(url,delegate);var loader=new Web
Inspector.TimelineModelLoader(this,urlReader,progress);urlReader.start(loader);}
,_createFileReader:function(file,delegate) | 147 {var delegate=new WebInspector.TimelineModelLoadFromFileDelegate(this,progress);
var urlReader=new WebInspector.ChunkedXHRReader(url,delegate);var loader=new Web
Inspector.TimelineModelLoader(this,urlReader,progress);urlReader.start(loader);}
,_createFileReader:function(file,delegate) |
| 143 {return new WebInspector.ChunkedFileReader(file,WebInspector.TimelineModel.Trans
ferChunkLengthBytes,delegate);},_createFileWriter:function(fileName,callback) | 148 {return new WebInspector.ChunkedFileReader(file,WebInspector.TimelineModel.Trans
ferChunkLengthBytes,delegate);},_createFileWriter:function(fileName,callback) |
| 144 {var stream=new WebInspector.FileOutputStream();stream.open(fileName,callback);}
,saveToFile:function() | 149 {var stream=new WebInspector.FileOutputStream();stream.open(fileName,callback);}
,saveToFile:function() |
| 145 {var now=new Date();var fileName="TimelineRawData-"+now.toISO8601Compact()+".jso
n";function callback(stream) | 150 {var now=new Date();var fileName="TimelineRawData-"+now.toISO8601Compact()+".jso
n";function callback(stream) |
| 146 {var saver=new WebInspector.TimelineSaver(stream);saver.save(this._records,windo
w.navigator.appVersion);} | 151 {var saver=new WebInspector.TimelineSaver(stream);saver.save(this._records,windo
w.navigator.appVersion);} |
| 147 this._createFileWriter(fileName,callback.bind(this));},reset:function() | 152 this._createFileWriter(fileName,callback.bind(this));},reset:function() |
| 148 {this._records=[];this._stringPool.reset();this._minimumRecordTime=-1;this._maxi
mumRecordTime=-1;this.dispatchEventToListeners(WebInspector.TimelineModel.Events
.RecordsCleared);},minimumRecordTime:function() | 153 {this._records=[];this._stringPool.reset();this._minimumRecordTime=-1;this._maxi
mumRecordTime=-1;this.dispatchEventToListeners(WebInspector.TimelineModel.Events
.RecordsCleared);},minimumRecordTime:function() |
| 149 {return this._minimumRecordTime;},maximumRecordTime:function() | 154 {return this._minimumRecordTime;},maximumRecordTime:function() |
| 150 {return this._maximumRecordTime;},_updateBoundaries:function(record) | 155 {return this._maximumRecordTime;},_updateBoundaries:function(record) |
| 151 {var startTime=WebInspector.TimelineModel.startTimeInSeconds(record);var endTime
=WebInspector.TimelineModel.endTimeInSeconds(record);if(this._minimumRecordTime=
==-1||startTime<this._minimumRecordTime) | 156 {var startTime=WebInspector.TimelineModel.startTimeInSeconds(record);var endTime
=WebInspector.TimelineModel.endTimeInSeconds(record);if(this._minimumRecordTime=
==-1||startTime<this._minimumRecordTime) |
| 152 this._minimumRecordTime=startTime;if(this._maximumRecordTime===-1||endTime>this.
_maximumRecordTime) | 157 this._minimumRecordTime=startTime;if(this._maximumRecordTime===-1||endTime>this.
_maximumRecordTime) |
| 153 this._maximumRecordTime=endTime;},_onTimelineStarted:function(event) | 158 this._maximumRecordTime=endTime;},recordOffsetInSeconds:function(rawRecord) |
| 154 {if(event.data.timestampsBase) | |
| 155 this._timestampsBase=event.data.timestampsBase;if(event.data.startTime) | |
| 156 this._startTime=event.data.startTime;},recordOffsetInSeconds:function(rawRecord) | |
| 157 {return WebInspector.TimelineModel.startTimeInSeconds(rawRecord)-this._minimumRe
cordTime;},__proto__:WebInspector.Object.prototype} | 159 {return WebInspector.TimelineModel.startTimeInSeconds(rawRecord)-this._minimumRe
cordTime;},__proto__:WebInspector.Object.prototype} |
| 158 WebInspector.TimelineModelLoader=function(model,reader,progress) | 160 WebInspector.TimelineModelLoader=function(model,reader,progress) |
| 159 {this._model=model;this._reader=reader;this._progress=progress;this._buffer="";t
his._firstChunk=true;} | 161 {this._model=model;this._reader=reader;this._progress=progress;this._buffer="";t
his._firstChunk=true;} |
| 160 WebInspector.TimelineModelLoader.prototype={write:function(chunk) | 162 WebInspector.TimelineModelLoader.prototype={write:function(chunk) |
| 161 {var data=this._buffer+chunk;var lastIndex=0;var index;do{index=lastIndex;lastIn
dex=WebInspector.findBalancedCurlyBrackets(data,index);}while(lastIndex!==-1) | 163 {var data=this._buffer+chunk;var lastIndex=0;var index;do{index=lastIndex;lastIn
dex=WebInspector.findBalancedCurlyBrackets(data,index);}while(lastIndex!==-1) |
| 162 var json=data.slice(0,index)+"]";this._buffer=data.slice(index);if(!index) | 164 var json=data.slice(0,index)+"]";this._buffer=data.slice(index);if(!index) |
| 163 return;if(!this._firstChunk) | 165 return;if(!this._firstChunk) |
| 164 json="[0"+json;var items;try{items=(JSON.parse(json));}catch(e){WebInspector.sho
wErrorMessage("Malformed timeline data.");this._model.reset();this._reader.cance
l();this._progress.done();return;} | 166 json="[0"+json;var items;try{items=(JSON.parse(json));}catch(e){WebInspector.sho
wErrorMessage("Malformed timeline data.");this._model.reset();this._reader.cance
l();this._progress.done();return;} |
| 165 if(this._firstChunk){this._version=items[0];this._firstChunk=false;this._model.r
eset();} | 167 if(this._firstChunk){this._version=items[0];this._firstChunk=false;this._model.r
eset();} |
| 166 for(var i=1,size=items.length;i<size;++i) | 168 for(var i=1,size=items.length;i<size;++i) |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 return false;const recordTypes=WebInspector.TimelineModel.RecordType;switch(reco
rdType){case recordTypes.ScheduleResourceRequest:case recordTypes.ResourceSendRe
quest:case recordTypes.ResourceReceiveResponse:case recordTypes.ResourceReceived
Data:case recordTypes.ResourceFinish:return true;default:return false;}} | 338 return false;const recordTypes=WebInspector.TimelineModel.RecordType;switch(reco
rdType){case recordTypes.ScheduleResourceRequest:case recordTypes.ResourceSendRe
quest:case recordTypes.ResourceReceiveResponse:case recordTypes.ResourceReceived
Data:case recordTypes.ResourceFinish:return true;default:return false;}} |
| 337 WebInspector.TimelinePresentationModel.createEventDivider=function(recordType,ti
tle) | 339 WebInspector.TimelinePresentationModel.createEventDivider=function(recordType,ti
tle) |
| 338 {var eventDivider=document.createElement("div");eventDivider.className="resource
s-event-divider";var recordTypes=WebInspector.TimelineModel.RecordType;if(record
Type===recordTypes.MarkDOMContent) | 340 {var eventDivider=document.createElement("div");eventDivider.className="resource
s-event-divider";var recordTypes=WebInspector.TimelineModel.RecordType;if(record
Type===recordTypes.MarkDOMContent) |
| 339 eventDivider.className+=" resources-blue-divider";else if(recordType===recordTyp
es.MarkLoad) | 341 eventDivider.className+=" resources-blue-divider";else if(recordType===recordTyp
es.MarkLoad) |
| 340 eventDivider.className+=" resources-red-divider";else if(recordType===recordType
s.TimeStamp) | 342 eventDivider.className+=" resources-red-divider";else if(recordType===recordType
s.TimeStamp) |
| 341 eventDivider.className+=" resources-orange-divider";else if(recordType===recordT
ypes.BeginFrame) | 343 eventDivider.className+=" resources-orange-divider";else if(recordType===recordT
ypes.BeginFrame) |
| 342 eventDivider.className+=" timeline-frame-divider";if(title) | 344 eventDivider.className+=" timeline-frame-divider";if(title) |
| 343 eventDivider.title=title;return eventDivider;} | 345 eventDivider.title=title;return eventDivider;} |
| 344 WebInspector.TimelinePresentationModel._hiddenRecords={} | 346 WebInspector.TimelinePresentationModel._hiddenRecords={} |
| 345 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkDOMContent]=1;WebInspector.TimelinePresentationModel._hiddenReco
rds[WebInspector.TimelineModel.RecordType.MarkLoad]=1;WebInspector.TimelinePrese
ntationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.ScheduleStyleR
ecalculation]=1;WebInspector.TimelinePresentationModel._hiddenRecords[WebInspect
or.TimelineModel.RecordType.InvalidateLayout]=1;WebInspector.TimelinePresentatio
nModel.prototype={addFilter:function(filter) | 347 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkDOMContent]=1;WebInspector.TimelinePresentationModel._hiddenReco
rds[WebInspector.TimelineModel.RecordType.MarkLoad]=1;WebInspector.TimelinePrese
ntationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.ScheduleStyleR
ecalculation]=1;WebInspector.TimelinePresentationModel._hiddenRecords[WebInspect
or.TimelineModel.RecordType.InvalidateLayout]=1;WebInspector.TimelinePresentatio
nModel.prototype={addFilter:function(filter) |
| 346 {this._filters.push(filter);},removeFilter:function(filter) | 348 {this._filters.push(filter);},setSearchFilter:function(filter) |
| 347 {var index=this._filters.indexOf(filter);if(index!==-1) | 349 {this._searchFilter=filter;},rootRecord:function() |
| 348 this._filters.splice(index,1);},rootRecord:function() | |
| 349 {return this._rootRecord;},frames:function() | 350 {return this._rootRecord;},frames:function() |
| 350 {return this._frames;},reset:function() | 351 {return this._frames;},reset:function() |
| 351 {this._linkifier.reset();this._rootRecord=new WebInspector.TimelinePresentationM
odel.Record(this,{type:WebInspector.TimelineModel.RecordType.Root},null,null,nul
l,false);this._sendRequestRecords={};this._scheduledResourceRequests={};this._ti
merRecords={};this._requestAnimationFrameRecords={};this._eventDividerRecords=[]
;this._timeRecords={};this._timeRecordStack=[];this._frames=[];this._minimumReco
rdTime=-1;this._layoutInvalidateStack={};this._lastScheduleStyleRecalculation={}
;this._webSocketCreateRecords={};this._coalescingBuckets={};},addFrame:function(
frame) | 352 {this._linkifier.reset();this._rootRecord=new WebInspector.TimelinePresentationM
odel.Record(this,{type:WebInspector.TimelineModel.RecordType.Root},null,null,nul
l,false);this._sendRequestRecords={};this._scheduledResourceRequests={};this._ti
merRecords={};this._requestAnimationFrameRecords={};this._eventDividerRecords=[]
;this._timeRecords={};this._timeRecordStack=[];this._frames=[];this._minimumReco
rdTime=-1;this._layoutInvalidateStack={};this._lastScheduleStyleRecalculation={}
;this._webSocketCreateRecords={};this._coalescingBuckets={};},addFrame:function(
frame) |
| 352 {this._frames.push(frame);},addRecord:function(record) | 353 {this._frames.push(frame);},addRecord:function(record) |
| 353 {if(this._minimumRecordTime===-1||record.startTime<this._minimumRecordTime) | 354 {if(this._minimumRecordTime===-1||record.startTime<this._minimumRecordTime) |
| 354 this._minimumRecordTime=WebInspector.TimelineModel.startTimeInSeconds(record);va
r records;if(record.type===WebInspector.TimelineModel.RecordType.Program) | 355 this._minimumRecordTime=WebInspector.TimelineModel.startTimeInSeconds(record);va
r records;if(record.type===WebInspector.TimelineModel.RecordType.Program) |
| 355 records=record.children;else | 356 records=record.children;else |
| 356 records=[record];var formattedRecords=[];var recordsCount=records.length;for(var
i=0;i<recordsCount;++i) | 357 records=[record];var formattedRecords=[];var recordsCount=records.length;for(var
i=0;i<recordsCount;++i) |
| 357 formattedRecords.push(this._innerAddRecord(records[i],this._rootRecord));return
formattedRecords;},_innerAddRecord:function(record,parentRecord) | 358 formattedRecords.push(this._innerAddRecord(records[i],this._rootRecord));return
formattedRecords;},_innerAddRecord:function(record,parentRecord) |
| 358 {const recordTypes=WebInspector.TimelineModel.RecordType;var isHiddenRecord=reco
rd.type in WebInspector.TimelinePresentationModel._hiddenRecords;var origin;var
coalescingBucket;if(!isHiddenRecord){var newParentRecord=this._findParentRecord(
record);if(newParentRecord){origin=parentRecord;parentRecord=newParentRecord;} | 359 {const recordTypes=WebInspector.TimelineModel.RecordType;var isHiddenRecord=reco
rd.type in WebInspector.TimelinePresentationModel._hiddenRecords;var origin;var
coalescingBucket;if(!isHiddenRecord){var newParentRecord=this._findParentRecord(
record);if(newParentRecord){origin=parentRecord;parentRecord=newParentRecord;} |
| (...skipping 22 matching lines...) Expand all Loading... |
| 381 return lastRecord.parent;return this._replaceWithCoalescedRecord(lastRecord);},_
replaceWithCoalescedRecord:function(record) | 382 return lastRecord.parent;return this._replaceWithCoalescedRecord(lastRecord);},_
replaceWithCoalescedRecord:function(record) |
| 382 {var rawRecord={type:record._record.type,startTime:record._record.startTime,endT
ime:record._record.endTime,data:{}};if(record._record.thread) | 383 {var rawRecord={type:record._record.type,startTime:record._record.startTime,endT
ime:record._record.endTime,data:{}};if(record._record.thread) |
| 383 rawRecord.thread="aggregated";if(record.type===WebInspector.TimelineModel.Record
Type.TimeStamp) | 384 rawRecord.thread="aggregated";if(record.type===WebInspector.TimelineModel.Record
Type.TimeStamp) |
| 384 rawRecord.data.message=record.data.message;var coalescedRecord=new WebInspector.
TimelinePresentationModel.Record(this,rawRecord,null,null,null,false);var parent
=record.parent;coalescedRecord.coalesced=true;coalescedRecord.collapsed=true;coa
lescedRecord._children.push(record);record.parent=coalescedRecord;coalescedRecor
d.calculateAggregatedStats();if(record.hasWarning||record.childHasWarning) | 385 rawRecord.data.message=record.data.message;var coalescedRecord=new WebInspector.
TimelinePresentationModel.Record(this,rawRecord,null,null,null,false);var parent
=record.parent;coalescedRecord.coalesced=true;coalescedRecord.collapsed=true;coa
lescedRecord._children.push(record);record.parent=coalescedRecord;coalescedRecor
d.calculateAggregatedStats();if(record.hasWarning||record.childHasWarning) |
| 385 coalescedRecord.childHasWarning=true;coalescedRecord.parent=parent;parent._child
ren[parent._children.indexOf(record)]=coalescedRecord;return coalescedRecord;},_
findParentRecord:function(record) | 386 coalescedRecord.childHasWarning=true;coalescedRecord.parent=parent;parent._child
ren[parent._children.indexOf(record)]=coalescedRecord;return coalescedRecord;},_
findParentRecord:function(record) |
| 386 {if(!this._glueRecords) | 387 {if(!this._glueRecords) |
| 387 return null;var recordTypes=WebInspector.TimelineModel.RecordType;switch(record.
type){case recordTypes.ResourceReceiveResponse:case recordTypes.ResourceFinish:c
ase recordTypes.ResourceReceivedData:return this._sendRequestRecords[record.data
["requestId"]];case recordTypes.ResourceSendRequest:return this._rootRecord;case
recordTypes.TimerFire:return this._timerRecords[record.data["timerId"]];case re
cordTypes.ResourceSendRequest:return this._scheduledResourceRequests[record.data
["url"]];case recordTypes.FireAnimationFrame:return this._requestAnimationFrameR
ecords[record.data["id"]];case recordTypes.Time:return this._rootRecord;case rec
ordTypes.TimeEnd:return this._timeRecords[record.data["message"]];}},setGlueReco
rds:function(glue) | 388 return null;var recordTypes=WebInspector.TimelineModel.RecordType;switch(record.
type){case recordTypes.ResourceReceiveResponse:case recordTypes.ResourceFinish:c
ase recordTypes.ResourceReceivedData:return this._sendRequestRecords[record.data
["requestId"]];case recordTypes.ResourceSendRequest:return this._rootRecord;case
recordTypes.TimerFire:return this._timerRecords[record.data["timerId"]];case re
cordTypes.ResourceSendRequest:return this._scheduledResourceRequests[record.data
["url"]];case recordTypes.FireAnimationFrame:return this._requestAnimationFrameR
ecords[record.data["id"]];case recordTypes.Time:return this._rootRecord;case rec
ordTypes.TimeEnd:return this._timeRecords[record.data["message"]];}},setGlueReco
rds:function(glue) |
| 388 {this._glueRecords=glue;},invalidateFilteredRecords:function() | 389 {this._glueRecords=glue;},invalidateFilteredRecords:function() |
| 389 {delete this._filteredRecords;},filteredRecords:function() | 390 {delete this._filteredRecords;},filteredRecords:function() |
| 390 {if(this._filteredRecords) | 391 {if(this._filteredRecords) |
| 391 return this._filteredRecords;var recordsInWindow=[];var stack=[{children:this._r
ootRecord.children,index:0,parentIsCollapsed:false}];while(stack.length){var ent
ry=stack[stack.length-1];var records=entry.children;if(records&&entry.index<reco
rds.length){var record=records[entry.index];++entry.index;if(this.isVisible(reco
rd)){++record.parent._invisibleChildrenCount;if(!entry.parentIsCollapsed) | 392 return this._filteredRecords;var recordsInWindow=[];var stack=[{children:this._r
ootRecord.children,index:0,parentIsCollapsed:false,parentRecord:{}}];var reveale
dDepth=0;function revealRecordsInStack(){for(var depth=revealedDepth+1;depth<sta
ck.length;++depth){if(stack[depth-1].parentIsCollapsed){stack[depth].parentRecor
d.parent._expandable=true;return;} |
| 392 recordsInWindow.push(record);} | 393 stack[depth-1].parentRecord.collapsed=false;recordsInWindow.push(stack[depth].pa
rentRecord);stack[depth].windowLengthBeforeChildrenTraversal=recordsInWindow.len
gth;stack[depth].parentIsRevealed=true;revealedDepth=depth;}} |
| 393 record._invisibleChildrenCount=0;stack.push({children:record.children,index:0,pa
rentIsCollapsed:(entry.parentIsCollapsed||record.collapsed),parentRecord:record,
windowLengthBeforeChildrenTraversal:recordsInWindow.length});}else{stack.pop();i
f(entry.parentRecord) | 394 while(stack.length){var entry=stack[stack.length-1];var records=entry.children;i
f(records&&entry.index<records.length){var record=records[entry.index];++entry.i
ndex;if(this.isVisible(record)){record.parent._expandable=true;if(this._searchFi
lter) |
| 394 entry.parentRecord._visibleChildrenCount=recordsInWindow.length-entry.windowLeng
thBeforeChildrenTraversal;}} | 395 revealRecordsInStack();if(!entry.parentIsCollapsed){recordsInWindow.push(record)
;revealedDepth=stack.length;entry.parentRecord.collapsed=false;}} |
| 396 record._expandable=false;stack.push({children:record.children,index:0,parentIsCo
llapsed:(entry.parentIsCollapsed||(record.collapsed&&(!this._searchFilter||recor
d.clicked))),parentRecord:record,windowLengthBeforeChildrenTraversal:recordsInWi
ndow.length});}else{stack.pop();revealedDepth=Math.min(revealedDepth,stack.lengt
h-1);entry.parentRecord._visibleChildrenCount=recordsInWindow.length-entry.windo
wLengthBeforeChildrenTraversal;}} |
| 395 this._filteredRecords=recordsInWindow;return recordsInWindow;},filteredFrames:fu
nction(startTime,endTime) | 397 this._filteredRecords=recordsInWindow;return recordsInWindow;},filteredFrames:fu
nction(startTime,endTime) |
| 396 {function compareStartTime(value,object) | 398 {function compareStartTime(value,object) |
| 397 {return value-object.startTime;} | 399 {return value-object.startTime;} |
| 398 function compareEndTime(value,object) | 400 function compareEndTime(value,object) |
| 399 {return value-object.endTime;} | 401 {return value-object.endTime;} |
| 400 var firstFrame=insertionIndexForObjectInListSortedByFunction(startTime,this._fra
mes,compareStartTime);var lastFrame=insertionIndexForObjectInListSortedByFunctio
n(endTime,this._frames,compareEndTime);while(lastFrame<this._frames.length&&this
._frames[lastFrame].endTime<=endTime) | 402 var firstFrame=insertionIndexForObjectInListSortedByFunction(startTime,this._fra
mes,compareStartTime);var lastFrame=insertionIndexForObjectInListSortedByFunctio
n(endTime,this._frames,compareEndTime);while(lastFrame<this._frames.length&&this
._frames[lastFrame].endTime<=endTime) |
| 401 ++lastFrame;return this._frames.slice(firstFrame,lastFrame);},eventDividerRecord
s:function() | 403 ++lastFrame;return this._frames.slice(firstFrame,lastFrame);},eventDividerRecord
s:function() |
| 402 {return this._eventDividerRecords;},isVisible:function(record) | 404 {return this._eventDividerRecords;},isVisible:function(record) |
| 403 {for(var i=0;i<this._filters.length;++i){if(!this._filters[i].accept(record)) | 405 {for(var i=0;i<this._filters.length;++i){if(!this._filters[i].accept(record)) |
| 404 return false;} | 406 return false;} |
| 405 return true;},generateMainThreadBarPopupContent:function(info) | 407 return!this._searchFilter||this._searchFilter.accept(record);},generateMainThrea
dBarPopupContent:function(info) |
| 406 {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.e
ndTime-task.startTime;} | 408 {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.e
ndTime-task.startTime;} |
| 407 var startTime=tasks[firstTaskIndex].startTime;var endTime=tasks[lastTaskIndex].e
ndTime;var duration=endTime-startTime;var offset=this._minimumRecordTime;var con
tentHelper=new WebInspector.PopoverContentHelper(WebInspector.UIString("CPU"));v
ar durationText=WebInspector.UIString("%s (at %s)",Number.secondsToString(durati
on,true),Number.secondsToString(startTime-offset,true));contentHelper.appendText
Row(WebInspector.UIString("Duration"),durationText);contentHelper.appendTextRow(
WebInspector.UIString("CPU time"),Number.secondsToString(cpuTime,true));contentH
elper.appendTextRow(WebInspector.UIString("Message Count"),messageCount);return
contentHelper.contentTable();},__proto__:WebInspector.Object.prototype} | 409 var startTime=tasks[firstTaskIndex].startTime;var endTime=tasks[lastTaskIndex].e
ndTime;var duration=endTime-startTime;var offset=this._minimumRecordTime;var con
tentHelper=new WebInspector.PopoverContentHelper(WebInspector.UIString("CPU"));v
ar durationText=WebInspector.UIString("%s (at %s)",Number.secondsToString(durati
on,true),Number.secondsToString(startTime-offset,true));contentHelper.appendText
Row(WebInspector.UIString("Duration"),durationText);contentHelper.appendTextRow(
WebInspector.UIString("CPU time"),Number.secondsToString(cpuTime,true));contentH
elper.appendTextRow(WebInspector.UIString("Message Count"),messageCount);return
contentHelper.contentTable();},__proto__:WebInspector.Object.prototype} |
| 408 WebInspector.TimelinePresentationModel.Record=function(presentationModel,record,
parentRecord,origin,scriptDetails,hidden) | 410 WebInspector.TimelinePresentationModel.Record=function(presentationModel,record,
parentRecord,origin,scriptDetails,hidden) |
| 409 {this._linkifier=presentationModel._linkifier;this._aggregatedStats={};this._rec
ord=record;this._children=[];if(!hidden&&parentRecord){this.parent=parentRecord;
if(this.isBackground) | 411 {this._linkifier=presentationModel._linkifier;this._aggregatedStats={};this._rec
ord=record;this._children=[];if(!hidden&&parentRecord){this.parent=parentRecord;
if(this.isBackground) |
| 410 WebInspector.TimelinePresentationModel.insertRetrospectiveRecord(parentRecord,th
is);else | 412 WebInspector.TimelinePresentationModel.insertRetrospectiveRecord(parentRecord,th
is);else |
| 411 parentRecord.children.push(this);} | 413 parentRecord.children.push(this);} |
| 412 if(origin) | 414 if(origin) |
| 413 this._origin=origin;this._selfTime=this.endTime-this.startTime;this._lastChildEn
dTime=this.endTime;this._startTimeOffset=this.startTime-presentationModel._minim
umRecordTime;if(record.data){if(record.data["url"]) | 415 this._origin=origin;this._selfTime=this.endTime-this.startTime;this._lastChildEn
dTime=this.endTime;this._startTimeOffset=this.startTime-presentationModel._minim
umRecordTime;if(record.data){if(record.data["url"]) |
| 414 this.url=record.data["url"];if(record.data["layerRootNode"]) | 416 this.url=record.data["url"];if(record.data["layerRootNode"]) |
| 415 this._relatedBackendNodeId=record.data["layerRootNode"];} | 417 this._relatedBackendNodeId=record.data["layerRootNode"];else if(record.data["ele
mentId"]) |
| 418 this._relatedBackendNodeId=record.data["elementId"];} |
| 416 if(scriptDetails){this.scriptName=scriptDetails.scriptName;this.scriptLine=scrip
tDetails.scriptLine;} | 419 if(scriptDetails){this.scriptName=scriptDetails.scriptName;this.scriptLine=scrip
tDetails.scriptLine;} |
| 417 if(parentRecord&&parentRecord.callSiteStackTrace) | 420 if(parentRecord&&parentRecord.callSiteStackTrace) |
| 418 this.callSiteStackTrace=parentRecord.callSiteStackTrace;var recordTypes=WebInspe
ctor.TimelineModel.RecordType;switch(record.type){case recordTypes.ResourceSendR
equest:presentationModel._sendRequestRecords[record.data["requestId"]]=this;brea
k;case recordTypes.ScheduleResourceRequest:presentationModel._scheduledResourceR
equests[record.data["url"]]=this;break;case recordTypes.ResourceReceiveResponse:
var sendRequestRecord=presentationModel._sendRequestRecords[record.data["request
Id"]];if(sendRequestRecord){this.url=sendRequestRecord.url;sendRequestRecord._re
freshDetails();if(sendRequestRecord.parent!==presentationModel._rootRecord&&send
RequestRecord.parent.type===recordTypes.ScheduleResourceRequest) | 421 this.callSiteStackTrace=parentRecord.callSiteStackTrace;var recordTypes=WebInspe
ctor.TimelineModel.RecordType;switch(record.type){case recordTypes.ResourceSendR
equest:presentationModel._sendRequestRecords[record.data["requestId"]]=this;brea
k;case recordTypes.ScheduleResourceRequest:presentationModel._scheduledResourceR
equests[record.data["url"]]=this;break;case recordTypes.ResourceReceiveResponse:
var sendRequestRecord=presentationModel._sendRequestRecords[record.data["request
Id"]];if(sendRequestRecord){this.url=sendRequestRecord.url;sendRequestRecord._re
freshDetails();if(sendRequestRecord.parent!==presentationModel._rootRecord&&send
RequestRecord.parent.type===recordTypes.ScheduleResourceRequest) |
| 419 sendRequestRecord.parent._refreshDetails();} | 422 sendRequestRecord.parent._refreshDetails();} |
| 420 break;case recordTypes.ResourceReceivedData:case recordTypes.ResourceFinish:var
sendRequestRecord=presentationModel._sendRequestRecords[record.data["requestId"]
];if(sendRequestRecord) | 423 break;case recordTypes.ResourceReceivedData:case recordTypes.ResourceFinish:var
sendRequestRecord=presentationModel._sendRequestRecords[record.data["requestId"]
];if(sendRequestRecord) |
| 421 this.url=sendRequestRecord.url;break;case recordTypes.TimerInstall:this.timeout=
record.data["timeout"];this.singleShot=record.data["singleShot"];presentationMod
el._timerRecords[record.data["timerId"]]=this;break;case recordTypes.TimerFire:v
ar timerInstalledRecord=presentationModel._timerRecords[record.data["timerId"]];
if(timerInstalledRecord){this.callSiteStackTrace=timerInstalledRecord.stackTrace
;this.timeout=timerInstalledRecord.timeout;this.singleShot=timerInstalledRecord.
singleShot;} | 424 this.url=sendRequestRecord.url;break;case recordTypes.TimerInstall:this.timeout=
record.data["timeout"];this.singleShot=record.data["singleShot"];presentationMod
el._timerRecords[record.data["timerId"]]=this;break;case recordTypes.TimerFire:v
ar timerInstalledRecord=presentationModel._timerRecords[record.data["timerId"]];
if(timerInstalledRecord){this.callSiteStackTrace=timerInstalledRecord.stackTrace
;this.timeout=timerInstalledRecord.timeout;this.singleShot=timerInstalledRecord.
singleShot;} |
| 422 break;case recordTypes.RequestAnimationFrame:presentationModel._requestAnimation
FrameRecords[record.data["id"]]=this;break;case recordTypes.FireAnimationFrame:v
ar requestAnimationRecord=presentationModel._requestAnimationFrameRecords[record
.data["id"]];if(requestAnimationRecord) | 425 break;case recordTypes.RequestAnimationFrame:presentationModel._requestAnimation
FrameRecords[record.data["id"]]=this;break;case recordTypes.FireAnimationFrame:v
ar requestAnimationRecord=presentationModel._requestAnimationFrameRecords[record
.data["id"]];if(requestAnimationRecord) |
| 423 this.callSiteStackTrace=requestAnimationRecord.stackTrace;break;case recordTypes
.Time:var message=record.data["message"];var oldReference=presentationModel._tim
eRecords[message];if(oldReference) | 426 this.callSiteStackTrace=requestAnimationRecord.stackTrace;break;case recordTypes
.Time:var message=record.data["message"];var oldReference=presentationModel._tim
eRecords[message];if(oldReference) |
| 424 break;presentationModel._timeRecords[message]=this;if(origin) | 427 break;presentationModel._timeRecords[message]=this;if(origin) |
| 425 presentationModel._timeRecordStack.push(this);break;case recordTypes.TimeEnd:var
message=record.data["message"];var timeRecord=presentationModel._timeRecords[me
ssage];delete presentationModel._timeRecords[message];if(timeRecord){this.timeRe
cord=timeRecord;timeRecord.timeEndRecord=this;var intervalDuration=this.startTim
e-timeRecord.startTime;this.intervalDuration=intervalDuration;timeRecord.interva
lDuration=intervalDuration;if(!origin) | 428 presentationModel._timeRecordStack.push(this);break;case recordTypes.TimeEnd:var
message=record.data["message"];var timeRecord=presentationModel._timeRecords[me
ssage];delete presentationModel._timeRecords[message];if(timeRecord){this.timeRe
cord=timeRecord;timeRecord.timeEndRecord=this;var intervalDuration=this.startTim
e-timeRecord.startTime;this.intervalDuration=intervalDuration;timeRecord.interva
lDuration=intervalDuration;if(!origin) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 441 parent.children.splice(insertionIndexForObjectInListSortedByFunction(record.star
tTime,parent.children,compareStartTime),0,record);} | 444 parent.children.splice(insertionIndexForObjectInListSortedByFunction(record.star
tTime,parent.children,compareStartTime),0,record);} |
| 442 WebInspector.TimelinePresentationModel.Record.prototype={get lastChildEndTime() | 445 WebInspector.TimelinePresentationModel.Record.prototype={get lastChildEndTime() |
| 443 {return this._lastChildEndTime;},set lastChildEndTime(time) | 446 {return this._lastChildEndTime;},set lastChildEndTime(time) |
| 444 {this._lastChildEndTime=time;},get selfTime() | 447 {this._lastChildEndTime=time;},get selfTime() |
| 445 {return this.coalesced?this._lastChildEndTime-this.startTime:this._selfTime;},se
t selfTime(time) | 448 {return this.coalesced?this._lastChildEndTime-this.startTime:this._selfTime;},se
t selfTime(time) |
| 446 {this._selfTime=time;},get cpuTime() | 449 {this._selfTime=time;},get cpuTime() |
| 447 {return this._cpuTime;},isRoot:function() | 450 {return this._cpuTime;},isRoot:function() |
| 448 {return this.type===WebInspector.TimelineModel.RecordType.Root;},origin:function
() | 451 {return this.type===WebInspector.TimelineModel.RecordType.Root;},origin:function
() |
| 449 {return this._origin||this.parent;},get children() | 452 {return this._origin||this.parent;},get children() |
| 450 {return this._children;},get visibleChildrenCount() | 453 {return this._children;},get visibleChildrenCount() |
| 451 {return this._visibleChildrenCount||0;},get invisibleChildrenCount() | 454 {return this._visibleChildrenCount||0;},get expandable() |
| 452 {return this._invisibleChildrenCount||0;},get category() | 455 {return!!this._expandable;},get category() |
| 453 {return WebInspector.TimelinePresentationModel.recordStyle(this._record).categor
y},get title() | 456 {return WebInspector.TimelinePresentationModel.recordStyle(this._record).categor
y},get title() |
| 454 {return this.type===WebInspector.TimelineModel.RecordType.TimeStamp?this._record
.data["message"]:WebInspector.TimelinePresentationModel.recordStyle(this._record
).title;},get startTime() | 457 {return this.type===WebInspector.TimelineModel.RecordType.TimeStamp?this._record
.data["message"]:WebInspector.TimelinePresentationModel.recordStyle(this._record
).title;},get startTime() |
| 455 {return WebInspector.TimelineModel.startTimeInSeconds(this._record);},get endTim
e() | 458 {return WebInspector.TimelineModel.startTimeInSeconds(this._record);},get endTim
e() |
| 456 {return WebInspector.TimelineModel.endTimeInSeconds(this._record);},get isBackgr
ound() | 459 {return WebInspector.TimelineModel.endTimeInSeconds(this._record);},get isBackgr
ound() |
| 457 {return!!this._record.thread;},get data() | 460 {return!!this._record.thread;},get data() |
| 458 {return this._record.data;},get type() | 461 {return this._record.data;},get type() |
| 459 {return this._record.type;},get frameId() | 462 {return this._record.type;},get frameId() |
| 460 {return this._record.frameId;},get usedHeapSizeDelta() | 463 {return this._record.frameId;},get usedHeapSizeDelta() |
| 461 {return this._record.usedHeapSizeDelta||0;},get usedHeapSize() | 464 {return this._record.usedHeapSizeDelta||0;},get usedHeapSize() |
| 462 {return this._record.usedHeapSize;},get stackTrace() | 465 {return this._record.usedHeapSize;},get stackTrace() |
| (...skipping 14 matching lines...) Expand all Loading... |
| 477 break;case recordTypes.FireAnimationFrame:callSiteStackTraceLabel=WebInspector.U
IString("Animation frame requested");contentHelper.appendTextRow(WebInspector.UI
String("Callback ID"),this.data["id"]);break;case recordTypes.FunctionCall:conte
ntHelper.appendElementRow(WebInspector.UIString("Location"),this._linkifyScriptL
ocation());break;case recordTypes.ScheduleResourceRequest:case recordTypes.Resou
rceSendRequest:case recordTypes.ResourceReceiveResponse:case recordTypes.Resourc
eReceivedData:case recordTypes.ResourceFinish:contentHelper.appendElementRow(Web
Inspector.UIString("Resource"),WebInspector.linkifyResourceAsNode(this.url));if(
this._imagePreviewElement) | 480 break;case recordTypes.FireAnimationFrame:callSiteStackTraceLabel=WebInspector.U
IString("Animation frame requested");contentHelper.appendTextRow(WebInspector.UI
String("Callback ID"),this.data["id"]);break;case recordTypes.FunctionCall:conte
ntHelper.appendElementRow(WebInspector.UIString("Location"),this._linkifyScriptL
ocation());break;case recordTypes.ScheduleResourceRequest:case recordTypes.Resou
rceSendRequest:case recordTypes.ResourceReceiveResponse:case recordTypes.Resourc
eReceivedData:case recordTypes.ResourceFinish:contentHelper.appendElementRow(Web
Inspector.UIString("Resource"),WebInspector.linkifyResourceAsNode(this.url));if(
this._imagePreviewElement) |
| 478 contentHelper.appendElementRow(WebInspector.UIString("Preview"),this._imagePrevi
ewElement);if(this.data["requestMethod"]) | 481 contentHelper.appendElementRow(WebInspector.UIString("Preview"),this._imagePrevi
ewElement);if(this.data["requestMethod"]) |
| 479 contentHelper.appendTextRow(WebInspector.UIString("Request Method"),this.data["r
equestMethod"]);if(typeof this.data["statusCode"]==="number") | 482 contentHelper.appendTextRow(WebInspector.UIString("Request Method"),this.data["r
equestMethod"]);if(typeof this.data["statusCode"]==="number") |
| 480 contentHelper.appendTextRow(WebInspector.UIString("Status Code"),this.data["stat
usCode"]);if(this.data["mimeType"]) | 483 contentHelper.appendTextRow(WebInspector.UIString("Status Code"),this.data["stat
usCode"]);if(this.data["mimeType"]) |
| 481 contentHelper.appendTextRow(WebInspector.UIString("MIME Type"),this.data["mimeTy
pe"]);if(this.data["encodedDataLength"]) | 484 contentHelper.appendTextRow(WebInspector.UIString("MIME Type"),this.data["mimeTy
pe"]);if(this.data["encodedDataLength"]) |
| 482 contentHelper.appendTextRow(WebInspector.UIString("Encoded Data Length"),WebInsp
ector.UIString("%d Bytes",this.data["encodedDataLength"]));break;case recordType
s.EvaluateScript:if(this.data&&this.url) | 485 contentHelper.appendTextRow(WebInspector.UIString("Encoded Data Length"),WebInsp
ector.UIString("%d Bytes",this.data["encodedDataLength"]));break;case recordType
s.EvaluateScript:if(this.data&&this.url) |
| 483 contentHelper.appendElementRow(WebInspector.UIString("Script"),this._linkifyLoca
tion(this.url,this.data["lineNumber"]));break;case recordTypes.Paint:var clip=th
is.data["clip"];if(clip){contentHelper.appendTextRow(WebInspector.UIString("Loca
tion"),WebInspector.UIString("(%d, %d)",clip[0],clip[1]));var clipWidth=WebInspe
ctor.TimelinePresentationModel.quadWidth(clip);var clipHeight=WebInspector.Timel
inePresentationModel.quadHeight(clip);contentHelper.appendTextRow(WebInspector.U
IString("Dimensions"),WebInspector.UIString("%d × %d",clipWidth,clipHeight));}el
se{if(typeof this.data["x"]!=="undefined"&&typeof this.data["y"]!=="undefined") | 486 contentHelper.appendElementRow(WebInspector.UIString("Script"),this._linkifyLoca
tion(this.url,this.data["lineNumber"]));break;case recordTypes.Paint:var clip=th
is.data["clip"];if(clip){contentHelper.appendTextRow(WebInspector.UIString("Loca
tion"),WebInspector.UIString("(%d, %d)",clip[0],clip[1]));var clipWidth=WebInspe
ctor.TimelinePresentationModel.quadWidth(clip);var clipHeight=WebInspector.Timel
inePresentationModel.quadHeight(clip);contentHelper.appendTextRow(WebInspector.U
IString("Dimensions"),WebInspector.UIString("%d × %d",clipWidth,clipHeight));}el
se{if(typeof this.data["x"]!=="undefined"&&typeof this.data["y"]!=="undefined") |
| 484 contentHelper.appendTextRow(WebInspector.UIString("Location"),WebInspector.UIStr
ing("(%d, %d)",this.data["x"],this.data["y"]));if(typeof this.data["width"]!=="u
ndefined"&&typeof this.data["height"]!=="undefined") | 487 contentHelper.appendTextRow(WebInspector.UIString("Location"),WebInspector.UIStr
ing("(%d, %d)",this.data["x"],this.data["y"]));if(typeof this.data["width"]!=="u
ndefined"&&typeof this.data["height"]!=="undefined") |
| 485 contentHelper.appendTextRow(WebInspector.UIString("Dimensions"),WebInspector.UIS
tring("%d\u2009\u00d7\u2009%d",this.data["width"],this.data["height"]));} | 488 contentHelper.appendTextRow(WebInspector.UIString("Dimensions"),WebInspector.UIS
tring("%d\u2009\u00d7\u2009%d",this.data["width"],this.data["height"]));} |
| 486 case recordTypes.PaintSetup:case recordTypes.Rasterize:case recordTypes.ScrollLa
yer:if(this._relatedNode) | 489 case recordTypes.PaintSetup:case recordTypes.Rasterize:case recordTypes.ScrollLa
yer:if(this._relatedNode) |
| 487 contentHelper.appendElementRow(WebInspector.UIString("Layer root"),this._createN
odeAnchor(this._relatedNode));break;case recordTypes.RecalculateStyles:if(this.d
ata["elementCount"]) | 490 contentHelper.appendElementRow(WebInspector.UIString("Layer root"),this._createN
odeAnchor(this._relatedNode));break;case recordTypes.DecodeImage:case recordType
s.ResizeImage:if(this._relatedNode) |
| 491 contentHelper.appendElementRow(WebInspector.UIString("Image element"),this._crea
teNodeAnchor(this._relatedNode));if(this.url) |
| 492 contentHelper.appendElementRow(WebInspector.UIString("Image URL"),WebInspector.l
inkifyResourceAsNode(this.url));break;case recordTypes.RecalculateStyles:if(this
.data["elementCount"]) |
| 488 contentHelper.appendTextRow(WebInspector.UIString("Elements affected"),this.data
["elementCount"]);callStackLabel=WebInspector.UIString("Styles recalculation for
ced");break;case recordTypes.Layout:if(this.data["dirtyObjects"]) | 493 contentHelper.appendTextRow(WebInspector.UIString("Elements affected"),this.data
["elementCount"]);callStackLabel=WebInspector.UIString("Styles recalculation for
ced");break;case recordTypes.Layout:if(this.data["dirtyObjects"]) |
| 489 contentHelper.appendTextRow(WebInspector.UIString("Nodes that need layout"),this
.data["dirtyObjects"]);if(this.data["totalObjects"]) | 494 contentHelper.appendTextRow(WebInspector.UIString("Nodes that need layout"),this
.data["dirtyObjects"]);if(this.data["totalObjects"]) |
| 490 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"));} | 495 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"));} |
| 491 callSiteStackTraceLabel=WebInspector.UIString("Layout invalidated");if(this.stac
kTrace){callStackLabel=WebInspector.UIString("Layout forced");contentHelper.appe
ndTextRow(WebInspector.UIString("Note"),WebInspector.UIString("Forced synchronou
s layout is a possible performance bottleneck."));} | 496 callSiteStackTraceLabel=WebInspector.UIString("Layout invalidated");if(this.stac
kTrace){callStackLabel=WebInspector.UIString("Layout forced");contentHelper.appe
ndTextRow(WebInspector.UIString("Note"),WebInspector.UIString("Forced synchronou
s layout is a possible performance bottleneck."));} |
| 492 if(this._relatedNode) | 497 if(this._relatedNode) |
| 493 contentHelper.appendElementRow(WebInspector.UIString("Layout root"),this._create
NodeAnchor(this._relatedNode));break;case recordTypes.Time:case recordTypes.Time
End:contentHelper.appendTextRow(WebInspector.UIString("Message"),this.data["mess
age"]);if(typeof this.intervalDuration==="number") | 498 contentHelper.appendElementRow(WebInspector.UIString("Layout root"),this._create
NodeAnchor(this._relatedNode));break;case recordTypes.Time:case recordTypes.Time
End:contentHelper.appendTextRow(WebInspector.UIString("Message"),this.data["mess
age"]);if(typeof this.intervalDuration==="number") |
| 494 contentHelper.appendTextRow(WebInspector.UIString("Interval Duration"),Number.se
condsToString(this.intervalDuration,true));break;case recordTypes.WebSocketCreat
e:case recordTypes.WebSocketSendHandshakeRequest:case recordTypes.WebSocketRecei
veHandshakeResponse:case recordTypes.WebSocketDestroy:if(typeof this.webSocketUR
L!=="undefined") | 499 contentHelper.appendTextRow(WebInspector.UIString("Interval Duration"),Number.se
condsToString(this.intervalDuration,true));break;case recordTypes.WebSocketCreat
e:case recordTypes.WebSocketSendHandshakeRequest:case recordTypes.WebSocketRecei
veHandshakeResponse:case recordTypes.WebSocketDestroy:if(typeof this.webSocketUR
L!=="undefined") |
| 495 contentHelper.appendTextRow(WebInspector.UIString("URL"),this.webSocketURL);if(t
ypeof this.webSocketProtocol!=="undefined") | 500 contentHelper.appendTextRow(WebInspector.UIString("URL"),this.webSocketURL);if(t
ypeof this.webSocketProtocol!=="undefined") |
| 496 contentHelper.appendTextRow(WebInspector.UIString("WebSocket Protocol"),this.web
SocketProtocol);if(typeof this.data["message"]!=="undefined") | 501 contentHelper.appendTextRow(WebInspector.UIString("WebSocket Protocol"),this.web
SocketProtocol);if(typeof this.data["message"]!=="undefined") |
| 497 contentHelper.appendTextRow(WebInspector.UIString("Message"),this.data["message"
]) | 502 contentHelper.appendTextRow(WebInspector.UIString("Message"),this.data["message"
]) |
| 498 break;default:if(this.detailsNode()) | 503 break;default:if(this.detailsNode()) |
| 499 contentHelper.appendElementRow(WebInspector.UIString("Details"),this.detailsNode
().childNodes[1].cloneNode());break;} | 504 contentHelper.appendElementRow(WebInspector.UIString("Details"),this.detailsNode
().childNodes[1].cloneNode());break;} |
| 500 if(this.scriptName&&this.type!==recordTypes.FunctionCall) | 505 if(this.scriptName&&this.type!==recordTypes.FunctionCall) |
| 501 contentHelper.appendElementRow(WebInspector.UIString("Function Call"),this._link
ifyScriptLocation());if(this.usedHeapSize){if(this.usedHeapSizeDelta){var sign=t
his.usedHeapSizeDelta>0?"+":"-";contentHelper.appendTextRow(WebInspector.UIStrin
g("Used Heap Size"),WebInspector.UIString("%s (%s%s)",Number.bytesToString(this.
usedHeapSize),sign,Number.bytesToString(Math.abs(this.usedHeapSizeDelta))));}els
e if(this.category===WebInspector.TimelinePresentationModel.categories().scripti
ng) | 506 contentHelper.appendElementRow(WebInspector.UIString("Function Call"),this._link
ifyScriptLocation());if(this.usedHeapSize){if(this.usedHeapSizeDelta){var sign=t
his.usedHeapSizeDelta>0?"+":"-";contentHelper.appendTextRow(WebInspector.UIStrin
g("Used Heap Size"),WebInspector.UIString("%s (%s%s)",Number.bytesToString(this.
usedHeapSize),sign,Number.bytesToString(Math.abs(this.usedHeapSizeDelta))));}els
e if(this.category===WebInspector.TimelinePresentationModel.categories().scripti
ng) |
| 502 contentHelper.appendTextRow(WebInspector.UIString("Used Heap Size"),Number.bytes
ToString(this.usedHeapSize));} | 507 contentHelper.appendTextRow(WebInspector.UIString("Used Heap Size"),Number.bytes
ToString(this.usedHeapSize));} |
| 503 if(this.callSiteStackTrace) | 508 if(this.callSiteStackTrace) |
| 504 contentHelper.appendStackTrace(callSiteStackTraceLabel||WebInspector.UIString("C
all Site stack"),this.callSiteStackTrace,this._linkifyCallFrame.bind(this));if(t
his.stackTrace) | 509 contentHelper.appendStackTrace(callSiteStackTraceLabel||WebInspector.UIString("C
all Site stack"),this.callSiteStackTrace,this._linkifyCallFrame.bind(this));if(t
his.stackTrace) |
| 505 contentHelper.appendStackTrace(callStackLabel||WebInspector.UIString("Call Stack
"),this.stackTrace,this._linkifyCallFrame.bind(this));return contentHelper.conte
ntTable();},_createNodeAnchor:function(node) | 510 contentHelper.appendStackTrace(callStackLabel||WebInspector.UIString("Call Stack
"),this.stackTrace,this._linkifyCallFrame.bind(this));return contentHelper.conte
ntTable();},_createNodeAnchor:function(node) |
| 506 {var span=document.createElement("span");span.classList.add("node-link");span.ad
dEventListener("click",onClick,false);WebInspector.DOMPresentationUtils.decorate
NodeLabel(node,span);function onClick() | 511 {var span=document.createElement("span");span.classList.add("node-link");span.ad
dEventListener("click",onClick,false);WebInspector.DOMPresentationUtils.decorate
NodeLabel(node,span);function onClick() |
| 507 {WebInspector.showPanel("elements").revealAndSelectNode(node.id);} | 512 {WebInspector.showPanel("elements").revealAndSelectNode(node.id);} |
| 508 return span;},_refreshDetails:function() | 513 return span;},_refreshDetails:function() |
| 509 {delete this._detailsNode;},detailsNode:function() | 514 {delete this._detailsNode;},detailsNode:function() |
| 510 {if(typeof this._detailsNode==="undefined"){this._detailsNode=this._getRecordDet
ails();if(this._detailsNode&&!this.coalesced){this._detailsNode.insertBefore(doc
ument.createTextNode("("),this._detailsNode.firstChild);this._detailsNode.append
Child(document.createTextNode(")"));}} | 515 {if(typeof this._detailsNode==="undefined"){this._detailsNode=this._getRecordDet
ails();if(this._detailsNode&&!this.coalesced){this._detailsNode.insertBefore(doc
ument.createTextNode("("),this._detailsNode.firstChild);this._detailsNode.append
Child(document.createTextNode(")"));}} |
| 511 return this._detailsNode;},_createSpanWithText:function(textContent) | 516 return this._detailsNode;},_createSpanWithText:function(textContent) |
| 512 {var node=document.createElement("span");node.textContent=textContent;return nod
e;},_getRecordDetails:function() | 517 {var node=document.createElement("span");node.textContent=textContent;return nod
e;},_getRecordDetails:function() |
| 513 {var details;if(this.coalesced) | 518 {var details;if(this.coalesced) |
| 514 return this._createSpanWithText(WebInspector.UIString("× %d",this.children.lengt
h));switch(this.type){case WebInspector.TimelineModel.RecordType.GCEvent:details
=WebInspector.UIString("%s collected",Number.bytesToString(this.data["usedHeapSi
zeDelta"]));break;case WebInspector.TimelineModel.RecordType.TimerFire:details=t
his._linkifyScriptLocation(this.data["timerId"]);break;case WebInspector.Timelin
eModel.RecordType.FunctionCall:details=this._linkifyScriptLocation();break;case
WebInspector.TimelineModel.RecordType.FireAnimationFrame:details=this._linkifySc
riptLocation(this.data["id"]);break;case WebInspector.TimelineModel.RecordType.E
ventDispatch:details=this.data?this.data["type"]:null;break;case WebInspector.Ti
melineModel.RecordType.Paint:var width=this.data.clip?WebInspector.TimelinePrese
ntationModel.quadWidth(this.data.clip):this.data.width;var height=this.data.clip
?WebInspector.TimelinePresentationModel.quadHeight(this.data.clip):this.data.hei
ght;if(width&&height) | 519 return this._createSpanWithText(WebInspector.UIString("× %d",this.children.lengt
h));switch(this.type){case WebInspector.TimelineModel.RecordType.GCEvent:details
=WebInspector.UIString("%s collected",Number.bytesToString(this.data["usedHeapSi
zeDelta"]));break;case WebInspector.TimelineModel.RecordType.TimerFire:details=t
his._linkifyScriptLocation(this.data["timerId"]);break;case WebInspector.Timelin
eModel.RecordType.FunctionCall:details=this._linkifyScriptLocation();break;case
WebInspector.TimelineModel.RecordType.FireAnimationFrame:details=this._linkifySc
riptLocation(this.data["id"]);break;case WebInspector.TimelineModel.RecordType.E
ventDispatch:details=this.data?this.data["type"]:null;break;case WebInspector.Ti
melineModel.RecordType.Paint:var width=this.data.clip?WebInspector.TimelinePrese
ntationModel.quadWidth(this.data.clip):this.data.width;var height=this.data.clip
?WebInspector.TimelinePresentationModel.quadHeight(this.data.clip):this.data.hei
ght;if(width&&height) |
| 515 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");br
eak;case WebInspector.TimelineModel.RecordType.TimerInstall:case WebInspector.Ti
melineModel.RecordType.TimerRemove:details=this._linkifyTopCallFrame(this.data["
timerId"]);break;case WebInspector.TimelineModel.RecordType.RequestAnimationFram
e:case WebInspector.TimelineModel.RecordType.CancelAnimationFrame:details=this._
linkifyTopCallFrame(this.data["id"]);break;case WebInspector.TimelineModel.Recor
dType.ParseHTML:case WebInspector.TimelineModel.RecordType.RecalculateStyles:det
ails=this._linkifyTopCallFrame();break;case WebInspector.TimelineModel.RecordTyp
e.EvaluateScript:details=this.url?this._linkifyLocation(this.url,this.data["line
Number"],0):null;break;case WebInspector.TimelineModel.RecordType.XHRReadyStateC
hange:case WebInspector.TimelineModel.RecordType.XHRLoad:case WebInspector.Timel
ineModel.RecordType.ScheduleResourceRequest:case WebInspector.TimelineModel.Reco
rdType.ResourceSendRequest:case WebInspector.TimelineModel.RecordType.ResourceRe
ceivedData:case WebInspector.TimelineModel.RecordType.ResourceReceiveResponse:ca
se WebInspector.TimelineModel.RecordType.ResourceFinish:details=WebInspector.dis
playNameForURL(this.url);break;case WebInspector.TimelineModel.RecordType.Time:c
ase WebInspector.TimelineModel.RecordType.TimeEnd:details=this.data["message"];b
reak;default:details=this._linkifyScriptLocation()||this._linkifyTopCallFrame()|
|null;break;} | 520 details=WebInspector.UIString("%d\u2009\u00d7\u2009%d",width,height);break;case
WebInspector.TimelineModel.RecordType.TimerInstall:case WebInspector.TimelineMod
el.RecordType.TimerRemove:details=this._linkifyTopCallFrame(this.data["timerId"]
);break;case WebInspector.TimelineModel.RecordType.RequestAnimationFrame:case We
bInspector.TimelineModel.RecordType.CancelAnimationFrame:details=this._linkifyTo
pCallFrame(this.data["id"]);break;case WebInspector.TimelineModel.RecordType.Par
seHTML:case WebInspector.TimelineModel.RecordType.RecalculateStyles:details=this
._linkifyTopCallFrame();break;case WebInspector.TimelineModel.RecordType.Evaluat
eScript:details=this.url?this._linkifyLocation(this.url,this.data["lineNumber"],
0):null;break;case WebInspector.TimelineModel.RecordType.XHRReadyStateChange:cas
e WebInspector.TimelineModel.RecordType.XHRLoad:case WebInspector.TimelineModel.
RecordType.ScheduleResourceRequest:case WebInspector.TimelineModel.RecordType.Re
sourceSendRequest:case WebInspector.TimelineModel.RecordType.ResourceReceivedDat
a:case WebInspector.TimelineModel.RecordType.ResourceReceiveResponse:case WebIns
pector.TimelineModel.RecordType.ResourceFinish:case WebInspector.TimelineModel.R
ecordType.DecodeImage:case WebInspector.TimelineModel.RecordType.ResizeImage:det
ails=WebInspector.displayNameForURL(this.url);break;case WebInspector.TimelineMo
del.RecordType.Time:case WebInspector.TimelineModel.RecordType.TimeEnd:details=t
his.data["message"];break;default:details=this._linkifyScriptLocation()||this._l
inkifyTopCallFrame()||null;break;} |
| 516 if(details){if(details instanceof Node) | 521 if(details){if(details instanceof Node) |
| 517 details.tabIndex=-1;else | 522 details.tabIndex=-1;else |
| 518 return this._createSpanWithText(""+details);} | 523 return this._createSpanWithText(""+details);} |
| 519 return details||null;},_linkifyLocation:function(url,lineNumber,columnNumber) | 524 return details||null;},_linkifyLocation:function(url,lineNumber,columnNumber) |
| 520 {columnNumber=columnNumber?columnNumber-1:0;return this._linkifier.linkifyLocati
on(url,lineNumber-1,columnNumber,"timeline-details");},_linkifyCallFrame:functio
n(callFrame) | 525 {columnNumber=columnNumber?columnNumber-1:0;return this._linkifier.linkifyLocati
on(url,lineNumber-1,columnNumber,"timeline-details");},_linkifyCallFrame:functio
n(callFrame) |
| 521 {return this._linkifyLocation(callFrame.url,callFrame.lineNumber,callFrame.colum
nNumber);},_linkifyTopCallFrame:function(defaultValue) | 526 {return this._linkifyLocation(callFrame.url,callFrame.lineNumber,callFrame.colum
nNumber);},_linkifyTopCallFrame:function(defaultValue) |
| 522 {if(this.stackTrace) | 527 {if(this.stackTrace) |
| 523 return this._linkifyCallFrame(this.stackTrace[0]);if(this.callSiteStackTrace) | 528 return this._linkifyCallFrame(this.stackTrace[0]);if(this.callSiteStackTrace) |
| 524 return this._linkifyCallFrame(this.callSiteStackTrace[0]);return defaultValue;},
_linkifyScriptLocation:function(defaultValue) | 529 return this._linkifyCallFrame(this.callSiteStackTrace[0]);return defaultValue;},
_linkifyScriptLocation:function(defaultValue) |
| 525 {if(this.scriptName) | 530 {if(this.scriptName) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 this._lastFrame=this._createFrame(record,programTimeCarryover);if(!record.thread
) | 586 this._lastFrame=this._createFrame(record,programTimeCarryover);if(!record.thread
) |
| 582 WebInspector.TimelineModel.aggregateTimeForRecord(this._lastFrame.timeByCategory
,record);var duration=WebInspector.TimelineModel.durationInSeconds(record);this.
_lastFrame.cpuTime+=duration;this._lastFrame.timeByCategory["other"]-=duration;}
},_flushFrame:function(record,programTimeCarryover) | 587 WebInspector.TimelineModel.aggregateTimeForRecord(this._lastFrame.timeByCategory
,record);var duration=WebInspector.TimelineModel.durationInSeconds(record);this.
_lastFrame.cpuTime+=duration;this._lastFrame.timeByCategory["other"]-=duration;}
},_flushFrame:function(record,programTimeCarryover) |
| 583 {this._lastFrame.endTime=WebInspector.TimelineModel.startTimeInSeconds(record);t
his._lastFrame.duration=this._lastFrame.endTime-this._lastFrame.startTime;this._
lastFrame.timeByCategory["other"]-=programTimeCarryover;this._lastFrame.cpuTime+
=this._lastFrame.timeByCategory["other"];this._overviewPane.addFrame(this._lastF
rame);this._presentationModel.addFrame(this._lastFrame);this._lastFrame=this._cr
eateFrame(record,programTimeCarryover);},_createFrame:function(record,programTim
eCarryover) | 588 {this._lastFrame.endTime=WebInspector.TimelineModel.startTimeInSeconds(record);t
his._lastFrame.duration=this._lastFrame.endTime-this._lastFrame.startTime;this._
lastFrame.timeByCategory["other"]-=programTimeCarryover;this._lastFrame.cpuTime+
=this._lastFrame.timeByCategory["other"];this._overviewPane.addFrame(this._lastF
rame);this._presentationModel.addFrame(this._lastFrame);this._lastFrame=this._cr
eateFrame(record,programTimeCarryover);},_createFrame:function(record,programTim
eCarryover) |
| 584 {var frame=new WebInspector.TimelineFrame();frame.startTime=WebInspector.Timelin
eModel.startTimeInSeconds(record);frame.startTimeOffset=this._model.recordOffset
InSeconds(record);frame.timeByCategory["other"]=programTimeCarryover;return fram
e;},dispose:function() | 589 {var frame=new WebInspector.TimelineFrame();frame.startTime=WebInspector.Timelin
eModel.startTimeInSeconds(record);frame.startTimeOffset=this._model.recordOffset
InSeconds(record);frame.timeByCategory["other"]=programTimeCarryover;return fram
e;},dispose:function() |
| 585 {this._model.removeEventListener(WebInspector.TimelineModel.Events.RecordAdded,t
his._onRecordAdded,this);this._model.removeEventListener(WebInspector.TimelineMo
del.Events.RecordsCleared,this._onRecordsCleared,this);}} | 590 {this._model.removeEventListener(WebInspector.TimelineModel.Events.RecordAdded,t
his._onRecordAdded,this);this._model.removeEventListener(WebInspector.TimelineMo
del.Events.RecordsCleared,this._onRecordsCleared,this);}} |
| 586 WebInspector.FrameStatistics=function(frames) | 591 WebInspector.FrameStatistics=function(frames) |
| 587 {this.frameCount=frames.length;this.minDuration=Infinity;this.maxDuration=0;this
.timeByCategory={};this.startOffset=frames[0].startTimeOffset;var lastFrame=fram
es[this.frameCount-1];this.endOffset=lastFrame.startTimeOffset+lastFrame.duratio
n;var totalDuration=0;var sumOfSquares=0;for(var i=0;i<this.frameCount;++i){var
duration=frames[i].duration;totalDuration+=duration;sumOfSquares+=duration*durat
ion;this.minDuration=Math.min(this.minDuration,duration);this.maxDuration=Math.m
ax(this.maxDuration,duration);WebInspector.TimelineModel.aggregateTimeByCategory
(this.timeByCategory,frames[i].timeByCategory);} | 592 {this.frameCount=frames.length;this.minDuration=Infinity;this.maxDuration=0;this
.timeByCategory={};this.startOffset=frames[0].startTimeOffset;var lastFrame=fram
es[this.frameCount-1];this.endOffset=lastFrame.startTimeOffset+lastFrame.duratio
n;var totalDuration=0;var sumOfSquares=0;for(var i=0;i<this.frameCount;++i){var
duration=frames[i].duration;totalDuration+=duration;sumOfSquares+=duration*durat
ion;this.minDuration=Math.min(this.minDuration,duration);this.maxDuration=Math.m
ax(this.maxDuration,duration);WebInspector.TimelineModel.aggregateTimeByCategory
(this.timeByCategory,frames[i].timeByCategory);} |
| 588 this.average=totalDuration/this.frameCount;var variance=sumOfSquares/this.frameC
ount-this.average*this.average;this.stddev=Math.sqrt(variance);} | 593 this.average=totalDuration/this.frameCount;var variance=sumOfSquares/this.frameC
ount-this.average*this.average;this.stddev=Math.sqrt(variance);} |
| 589 WebInspector.TimelineFrame=function() | 594 WebInspector.TimelineFrame=function() |
| 590 {this.timeByCategory={};this.cpuTime=0;};WebInspector.TimelinePanel=function() | 595 {this.timeByCategory={};this.cpuTime=0;};WebInspector.TimelinePanel=function() |
| 591 {WebInspector.Panel.call(this,"timeline");this.registerRequiredCSS("timelinePane
l.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("time
lineGlueRecords",false);this._overviewPane=new WebInspector.TimelineOverviewPane
(this._model);this._overviewPane.addEventListener(WebInspector.TimelineOverviewP
ane.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),fal
se);this._timelineMemorySplitter=this.element.createChild("div");this._timelineM
emorySplitter.id="timeline-memory-splitter";WebInspector.installDragHandle(this.
_timelineMemorySplitter,this._startSplitterDragging.bind(this),this._splitterDra
gging.bind(this),this._endSplitterDragging.bind(this),"ns-resize");this._timelin
eMemorySplitter.addStyleClass("hidden");this._includeDomCounters=false;this._mem
oryStatistics=new WebInspector.DOMCountersGraph(this,this._model,this.splitView.
sidebarWidth());this._includeDomCounters=true;WebInspector.settings.memoryCounte
rGraphsHeight=WebInspector.settings.createSetting("memoryCounterGraphsHeight",15
0);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._containe
rContentElement=this.splitView.mainElement;this._containerContentElement.id="res
ources-container-content";this._timelineGrid=new WebInspector.TimelineGrid();thi
s._itemsGraphsElement=this._timelineGrid.itemsGraphsElement;this._itemsGraphsEle
ment.id="timeline-graphs";this._containerContentElement.appendChild(this._timeli
neGrid.element);this._timelineGrid.gridHeaderElement.id="timeline-grid-header";t
his._memoryStatistics.setMainTimelineGrid(this._timelineGrid);this.element.appen
dChild(this._timelineGrid.gridHeaderElement);this._topGapElement=document.create
Element("div");this._topGapElement.className="timeline-gap";this._itemsGraphsEle
ment.appendChild(this._topGapElement);this._graphRowsElement=document.createElem
ent("div");this._itemsGraphsElement.appendChild(this._graphRowsElement);this._bo
ttomGapElement=document.createElement("div");this._bottomGapElement.className="t
imeline-gap";this._itemsGraphsElement.appendChild(this._bottomGapElement);this._
expandElements=document.createElement("div");this._expandElements.id="orphan-exp
and-elements";this._itemsGraphsElement.appendChild(this._expandElements);this._c
alculator=new WebInspector.TimelineCalculator(this._model);this._createStatusBar
Items();this._frameMode=false;this._boundariesAreValid=true;this._scrollTop=0;th
is._popoverHelper=new WebInspector.PopoverHelper(this.element,this._getPopoverAn
chor.bind(this),this._showPopover.bind(this));this.element.addEventListener("mou
semove",this._mouseMove.bind(this),false);this.element.addEventListener("mouseou
t",this._mouseOut.bind(this),false);this._durationFilter=new WebInspector.Timeli
neIsLongFilter();this._expandOffset=15;this._headerLineCount=1;this._adjustHeade
rHeight();this._mainThreadTasks=([]);this._cpuBarsElement=this._timelineGrid.gri
dHeaderElement.createChild("div","timeline-cpu-bars");this._mainThreadMonitoring
Enabled=WebInspector.settings.showCpuOnTimelineRuler.get();WebInspector.settings
.showCpuOnTimelineRuler.addChangeListener(this._showCpuOnTimelineRulerChanged,th
is);this._createFileSelector();this._model.addEventListener(WebInspector.Timelin
eModel.Events.RecordAdded,this._onTimelineEventRecorded,this);this._model.addEve
ntListener(WebInspector.TimelineModel.Events.RecordsCleared,this._onRecordsClear
ed,this);this._registerShortcuts();this._allRecordsCount=0;this._presentationMod
el.addFilter(new WebInspector.TimelineWindowFilter(this._overviewPane));this._pr
esentationModel.addFilter(new WebInspector.TimelineCategoryFilter());this._prese
ntationModel.addFilter(this._durationFilter);} | 596 {WebInspector.Panel.call(this,"timeline");this.registerRequiredCSS("timelinePane
l.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("time
lineGlueRecords",false);this._overviewPane=new WebInspector.TimelineOverviewPane
(this._model);this._overviewPane.addEventListener(WebInspector.TimelineOverviewP
ane.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),fal
se);this._timelineMemorySplitter=this.element.createChild("div");this._timelineM
emorySplitter.id="timeline-memory-splitter";WebInspector.installDragHandle(this.
_timelineMemorySplitter,this._startSplitterDragging.bind(this),this._splitterDra
gging.bind(this),this._endSplitterDragging.bind(this),"ns-resize");this._timelin
eMemorySplitter.addStyleClass("hidden");this._includeDomCounters=false;this._mem
oryStatistics=new WebInspector.DOMCountersGraph(this,this._model,this.splitView.
sidebarWidth());this._includeDomCounters=true;WebInspector.settings.memoryCounte
rGraphsHeight=WebInspector.settings.createSetting("memoryCounterGraphsHeight",15
0);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._containe
rContentElement=this.splitView.mainElement;this._containerContentElement.id="res
ources-container-content";this._timelineGrid=new WebInspector.TimelineGrid();thi
s._itemsGraphsElement=this._timelineGrid.itemsGraphsElement;this._itemsGraphsEle
ment.id="timeline-graphs";this._containerContentElement.appendChild(this._timeli
neGrid.element);this._timelineGrid.gridHeaderElement.id="timeline-grid-header";t
his._memoryStatistics.setMainTimelineGrid(this._timelineGrid);this.element.appen
dChild(this._timelineGrid.gridHeaderElement);this._topGapElement=document.create
Element("div");this._topGapElement.className="timeline-gap";this._itemsGraphsEle
ment.appendChild(this._topGapElement);this._graphRowsElement=document.createElem
ent("div");this._itemsGraphsElement.appendChild(this._graphRowsElement);this._bo
ttomGapElement=document.createElement("div");this._bottomGapElement.className="t
imeline-gap";this._itemsGraphsElement.appendChild(this._bottomGapElement);this._
expandElements=document.createElement("div");this._expandElements.id="orphan-exp
and-elements";this._itemsGraphsElement.appendChild(this._expandElements);this._c
alculator=new WebInspector.TimelineCalculator(this._model);this._createStatusBar
Items();this._frameMode=false;this._boundariesAreValid=true;this._scrollTop=0;th
is._popoverHelper=new WebInspector.PopoverHelper(this.element,this._getPopoverAn
chor.bind(this),this._showPopover.bind(this));this.element.addEventListener("mou
semove",this._mouseMove.bind(this),false);this.element.addEventListener("mouseou
t",this._mouseOut.bind(this),false);this._durationFilter=new WebInspector.Timeli
neIsLongFilter();this._expandOffset=15;this._headerLineCount=1;this._adjustHeade
rHeight();this._mainThreadTasks=([]);this._cpuBarsElement=this._timelineGrid.gri
dHeaderElement.createChild("div","timeline-cpu-bars");this._mainThreadMonitoring
Enabled=WebInspector.settings.showCpuOnTimelineRuler.get();WebInspector.settings
.showCpuOnTimelineRuler.addChangeListener(this._showCpuOnTimelineRulerChanged,th
is);this._createFileSelector();this._model.addEventListener(WebInspector.Timelin
eModel.Events.RecordAdded,this._onTimelineEventRecorded,this);this._model.addEve
ntListener(WebInspector.TimelineModel.Events.RecordsCleared,this._onRecordsClear
ed,this);this._model.addEventListener(WebInspector.TimelineModel.Events.Recordin
gStarted,this._onRecordingStarted,this);this._model.addEventListener(WebInspecto
r.TimelineModel.Events.RecordingStopped,this._onRecordingStopped,this);this._reg
isterShortcuts();this._allRecordsCount=0;this._presentationModel.addFilter(new W
ebInspector.TimelineWindowFilter(this._overviewPane));this._presentationModel.ad
dFilter(new WebInspector.TimelineCategoryFilter());this._presentationModel.addFi
lter(this._durationFilter);} |
| 592 WebInspector.TimelinePanel.rowHeight=18;WebInspector.TimelinePanel.durationFilte
rPresetsMs=[0,1,15];WebInspector.TimelinePanel.prototype={_showCpuOnTimelineRule
rChanged:function() | 597 WebInspector.TimelinePanel.rowHeight=18;WebInspector.TimelinePanel.durationFilte
rPresetsMs=[0,1,15];WebInspector.TimelinePanel.prototype={_showCpuOnTimelineRule
rChanged:function() |
| 593 {var mainThreadMonitoringEnabled=WebInspector.settings.showCpuOnTimelineRuler.ge
t();if(this._mainThreadMonitoringEnabled!==mainThreadMonitoringEnabled){this._ma
inThreadMonitoringEnabled=mainThreadMonitoringEnabled;this._refreshMainThreadBar
s();}},_startSplitterDragging:function(event) | 598 {var mainThreadMonitoringEnabled=WebInspector.settings.showCpuOnTimelineRuler.ge
t();if(this._mainThreadMonitoringEnabled!==mainThreadMonitoringEnabled){this._ma
inThreadMonitoringEnabled=mainThreadMonitoringEnabled;this._refreshMainThreadBar
s();}},_startSplitterDragging:function(event) |
| 594 {this._dragOffset=this._timelineMemorySplitter.offsetTop+2-event.pageY;return tr
ue;},_splitterDragging:function(event) | 599 {this._dragOffset=this._timelineMemorySplitter.offsetTop+2-event.pageY;return tr
ue;},_splitterDragging:function(event) |
| 595 {var top=event.pageY+this._dragOffset | 600 {var top=event.pageY+this._dragOffset |
| 596 this._setSplitterPosition(top);event.preventDefault();},_endSplitterDragging:fun
ction(event) | 601 this._setSplitterPosition(top);event.preventDefault();},_endSplitterDragging:fun
ction(event) |
| 597 {delete this._dragOffset;this._memoryStatistics.show();WebInspector.settings.mem
oryCounterGraphsHeight.set(this.splitView.element.offsetHeight);},_setSplitterPo
sition:function(top) | 602 {delete this._dragOffset;this._memoryStatistics.show();WebInspector.settings.mem
oryCounterGraphsHeight.set(this.splitView.element.offsetHeight);},_setSplitterPo
sition:function(top) |
| 598 {const overviewHeight=90;const sectionMinHeight=100;top=Number.constrain(top,ove
rviewHeight+sectionMinHeight,this.element.offsetHeight-sectionMinHeight);this.sp
litView.element.style.height=(top-overviewHeight)+"px";this._timelineMemorySplit
ter.style.top=(top-2)+"px";this._memoryStatistics.setTopPosition(top);this._cont
ainerElementHeight=this._containerElement.clientHeight;this.onResize();},get cal
culator() | 603 {const overviewHeight=90;const sectionMinHeight=100;top=Number.constrain(top,ove
rviewHeight+sectionMinHeight,this.element.offsetHeight-sectionMinHeight);this.sp
litView.element.style.height=(top-overviewHeight)+"px";this._timelineMemorySplit
ter.style.top=(top-2)+"px";this._memoryStatistics.setTopPosition(top);this._cont
ainerElementHeight=this._containerElement.clientHeight;this.onResize();},get cal
culator() |
| 599 {return this._calculator;},get statusBarItems() | 604 {return this._calculator;},get statusBarItems() |
| 600 {return this._statusBarItems.select("element").concat([this._miscStatusBarItems]
);},defaultFocusedElement:function() | 605 {return this._statusBarItems.select("element").concat([this._miscStatusBarItems]
);},defaultFocusedElement:function() |
| 601 {return this.element;},_createStatusBarItems:function() | 606 {return this.element;},_createStatusBarItems:function() |
| 602 {this._statusBarItems=([]);this.toggleTimelineButton=new WebInspector.StatusBarB
utton(WebInspector.UIString("Record"),"record-profile-status-bar-item");this.tog
gleTimelineButton.addEventListener("click",this._toggleTimelineButtonClicked,thi
s);this._statusBarItems.push(this.toggleTimelineButton);this.clearButton=new Web
Inspector.StatusBarButton(WebInspector.UIString("Clear"),"clear-status-bar-item"
);this.clearButton.addEventListener("click",this._clearPanel,this);this._statusB
arItems.push(this.clearButton);this.garbageCollectButton=new WebInspector.Status
BarButton(WebInspector.UIString("Collect Garbage"),"garbage-collect-status-bar-i
tem");this.garbageCollectButton.addEventListener("click",this._garbageCollectBut
tonClicked,this);this._statusBarItems.push(this.garbageCollectButton);this._glue
ParentButton=new WebInspector.StatusBarButton(WebInspector.UIString("Glue asynch
ronous events to causes"),"glue-async-status-bar-item");this._glueParentButton.t
oggled=this._glueRecordsSetting.get();this._presentationModel.setGlueRecords(thi
s._glueParentButton.toggled);this._glueParentButton.addEventListener("click",thi
s._glueParentButtonClicked,this);this._statusBarItems.push(this._glueParentButto
n);this._durationFilterSelector=new WebInspector.StatusBarComboBox(this._duratio
nFilterChanged.bind(this));for(var presetIndex=0;presetIndex<WebInspector.Timeli
nePanel.durationFilterPresetsMs.length;++presetIndex){var durationMs=WebInspecto
r.TimelinePanel.durationFilterPresetsMs[presetIndex];var option=document.createE
lement("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 reco
rds shorter than %dms",durationMs);} | 607 {this._statusBarItems=([]);this.toggleTimelineButton=new WebInspector.StatusBarB
utton(WebInspector.UIString("Record"),"record-profile-status-bar-item");this.tog
gleTimelineButton.addEventListener("click",this._toggleTimelineButtonClicked,thi
s);this._statusBarItems.push(this.toggleTimelineButton);this.clearButton=new Web
Inspector.StatusBarButton(WebInspector.UIString("Clear"),"clear-status-bar-item"
);this.clearButton.addEventListener("click",this._clearPanel,this);this._statusB
arItems.push(this.clearButton);this.garbageCollectButton=new WebInspector.Status
BarButton(WebInspector.UIString("Collect Garbage"),"garbage-collect-status-bar-i
tem");this.garbageCollectButton.addEventListener("click",this._garbageCollectBut
tonClicked,this);this._statusBarItems.push(this.garbageCollectButton);this._glue
ParentButton=new WebInspector.StatusBarButton(WebInspector.UIString("Glue asynch
ronous events to causes"),"glue-async-status-bar-item");this._glueParentButton.t
oggled=this._glueRecordsSetting.get();this._presentationModel.setGlueRecords(thi
s._glueParentButton.toggled);this._glueParentButton.addEventListener("click",thi
s._glueParentButtonClicked,this);this._statusBarItems.push(this._glueParentButto
n);this._durationFilterSelector=new WebInspector.StatusBarComboBox(this._duratio
nFilterChanged.bind(this));for(var presetIndex=0;presetIndex<WebInspector.Timeli
nePanel.durationFilterPresetsMs.length;++presetIndex){var durationMs=WebInspecto
r.TimelinePanel.durationFilterPresetsMs[presetIndex];var option=document.createE
lement("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 reco
rds shorter than %dms",durationMs);} |
| 603 option._durationMs=durationMs;this._durationFilterSelector.addOption(option);thi
s._durationFilterSelector.element.title=this._durationFilterSelector.selectedOpt
ion().title;} | 608 option._durationMs=durationMs;this._durationFilterSelector.addOption(option);thi
s._durationFilterSelector.element.title=this._durationFilterSelector.selectedOpt
ion().title;} |
| 604 this._statusBarItems.push(this._durationFilterSelector);this._miscStatusBarItems
=document.createElement("div");this._miscStatusBarItems.className="status-bar-it
ems timeline-misc-status-bar-items";this._statusBarFilters=this._miscStatusBarIt
ems.createChild("div","timeline-misc-status-bar-filters");var categories=WebInsp
ector.TimelinePresentationModel.categories();for(var categoryName in categories)
{var category=categories[categoryName];if(category.overviewStripGroupIndex<0) | 609 this._statusBarItems.push(this._durationFilterSelector);this._miscStatusBarItems
=document.createElement("div");this._miscStatusBarItems.className="status-bar-it
ems timeline-misc-status-bar-items";this._statusBarFilters=this._miscStatusBarIt
ems.createChild("div","timeline-misc-status-bar-filters");var categories=WebInsp
ector.TimelinePresentationModel.categories();for(var categoryName in categories)
{var category=categories[categoryName];if(category.overviewStripGroupIndex<0) |
| 605 continue;this._statusBarFilters.appendChild(this._createTimelineCategoryStatusBa
rCheckbox(category,this._onCategoryCheckboxClicked.bind(this,category)));} | 610 continue;this._statusBarFilters.appendChild(this._createTimelineCategoryStatusBa
rCheckbox(category));} |
| 606 var statsContainer=this._statusBarFilters.createChild("div");statsContainer.clas
sName="timeline-records-stats-container";this.recordsCounter=statsContainer.crea
teChild("div");this.recordsCounter.className="timeline-records-stats";this.frame
Statistics=statsContainer.createChild("div");this.frameStatistics.className="tim
eline-records-stats hidden";function getAnchor() | 611 var statsContainer=this._statusBarFilters.createChild("div","timeline-records-st
ats-container");this.recordsCounter=statsContainer.createChild("div","timeline-r
ecords-stats");this.frameStatistics=statsContainer.createChild("div","timeline-r
ecords-stats hidden");function getAnchor() |
| 607 {return this.frameStatistics;} | 612 {return this.frameStatistics;} |
| 608 this._frameStatisticsPopoverHelper=new WebInspector.PopoverHelper(this.frameStat
istics,getAnchor.bind(this),this._showFrameStatistics.bind(this));},_createTimel
ineCategoryStatusBarCheckbox:function(category,onCheckboxClicked) | 613 this._frameStatisticsPopoverHelper=new WebInspector.PopoverHelper(this.frameStat
istics,getAnchor.bind(this),this._showFrameStatistics.bind(this));},_createTimel
ineCategoryStatusBarCheckbox:function(category) |
| 609 {var labelContainer=document.createElement("div");labelContainer.addStyleClass("
timeline-category-statusbar-item");labelContainer.addStyleClass("timeline-catego
ry-"+category.name);labelContainer.addStyleClass("status-bar-item");var label=do
cument.createElement("label");var checkBorder=label.createChild("div","timeline-
category-checkbox");var checkElement=checkBorder.createChild("div","timeline-cat
egory-checkbox-check timeline-category-checkbox-checked");checkElement.type="che
ckbox";checkElement.checked=true;checkElement.addEventListener("click",listener,
false);function listener(event) | 614 {var labelContainer=document.createElement("div");labelContainer.addStyleClass("
timeline-category-statusbar-item");labelContainer.addStyleClass("timeline-catego
ry-"+category.name);labelContainer.addStyleClass("status-bar-item");var label=la
belContainer.createChild("label");var checkBorder=label.createChild("div","timel
ine-category-checkbox");var checkElement=checkBorder.createChild("div","timeline
-category-checkbox-check timeline-category-checkbox-checked");checkElement.type=
"checkbox";checkElement.checked=true;labelContainer.addEventListener("click",lis
tener.bind(this),false);function listener(event) |
| 610 {checkElement.checked=!checkElement.checked;checkElement.enableStyleClass("timel
ine-category-checkbox-checked",checkElement.checked);onCheckboxClicked(event);} | 615 {var checked=!checkElement.checked;checkElement.checked=checked;category.hidden=
!checked;checkElement.enableStyleClass("timeline-category-checkbox-checked",chec
kElement.checked);this._invalidateAndScheduleRefresh(true,true);} |
| 611 var typeElement=document.createElement("span");typeElement.className="type";type
Element.textContent=category.title;label.appendChild(typeElement);labelContainer
.appendChild(label);return labelContainer;},_onCategoryCheckboxClicked:function(
category,event) | 616 var typeElement=label.createChild("span","type");typeElement.textContent=categor
y.title;return labelContainer;},_setOperationInProgress:function(indicator) |
| 612 {category.hidden=!event.target.checked;this._invalidateAndScheduleRefresh(true,t
rue);},_setOperationInProgress:function(indicator) | |
| 613 {this._operationInProgress=!!indicator;for(var i=0;i<this._statusBarItems.length
;++i) | 617 {this._operationInProgress=!!indicator;for(var i=0;i<this._statusBarItems.length
;++i) |
| 614 this._statusBarItems[i].setEnabled(!this._operationInProgress);this._glueParentB
utton.setEnabled(!this._operationInProgress&&!this._frameController);this._miscS
tatusBarItems.removeChildren();this._miscStatusBarItems.appendChild(indicator?in
dicator.element:this._statusBarFilters);},_registerShortcuts:function() | 618 this._statusBarItems[i].setEnabled(!this._operationInProgress);this._glueParentB
utton.setEnabled(!this._operationInProgress&&!this._frameController);this._miscS
tatusBarItems.removeChildren();this._miscStatusBarItems.appendChild(indicator?in
dicator.element:this._statusBarFilters);},_registerShortcuts:function() |
| 615 {this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.StartS
topRecording,this._toggleTimelineButtonClicked.bind(this));this.registerShortcut
s(WebInspector.TimelinePanelDescriptor.ShortcutKeys.SaveToFile,this._saveToFile.
bind(this));this.registerShortcuts(WebInspector.TimelinePanelDescriptor.Shortcut
Keys.LoadFromFile,this._selectFileToLoad.bind(this));},_createFileSelector:funct
ion() | 619 {this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.StartS
topRecording,this._toggleTimelineButtonClicked.bind(this));this.registerShortcut
s(WebInspector.TimelinePanelDescriptor.ShortcutKeys.SaveToFile,this._saveToFile.
bind(this));this.registerShortcuts(WebInspector.TimelinePanelDescriptor.Shortcut
Keys.LoadFromFile,this._selectFileToLoad.bind(this));},_createFileSelector:funct
ion() |
| 616 {if(this._fileSelectorElement) | 620 {if(this._fileSelectorElement) |
| 617 this.element.removeChild(this._fileSelectorElement);this._fileSelectorElement=We
bInspector.createFileSelectorElement(this._loadFromFile.bind(this));this.element
.appendChild(this._fileSelectorElement);},_contextMenu:function(event) | 621 this.element.removeChild(this._fileSelectorElement);this._fileSelectorElement=We
bInspector.createFileSelectorElement(this._loadFromFile.bind(this));this.element
.appendChild(this._fileSelectorElement);},_contextMenu:function(event) |
| 618 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebI
nspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Save Timeline data\u202
6":"Save Timeline Data\u2026"),this._saveToFile.bind(this),this._operationInProg
ress);contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenu
Titles()?"Load Timeline data\u2026":"Load Timeline Data\u2026"),this._selectFile
ToLoad.bind(this),this._operationInProgress);contextMenu.show();},_saveToFile:fu
nction(event) | 622 {var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebI
nspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Save Timeline data\u202
6":"Save Timeline Data\u2026"),this._saveToFile.bind(this),this._operationInProg
ress);contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenu
Titles()?"Load Timeline data\u2026":"Load Timeline Data\u2026"),this._selectFile
ToLoad.bind(this),this._operationInProgress);contextMenu.show();},_saveToFile:fu
nction(event) |
| 619 {if(this._operationInProgress) | 623 {if(this._operationInProgress) |
| 620 return true;this._model.saveToFile();return true;},_selectFileToLoad:function(ev
ent){this._fileSelectorElement.click();return true;},_loadFromFile:function(file
) | 624 return true;this._model.saveToFile();return true;},_selectFileToLoad:function(ev
ent){this._fileSelectorElement.click();return true;},_loadFromFile:function(file
) |
| 621 {var progressIndicator=this._prepareToLoadTimeline();if(!progressIndicator) | 625 {var progressIndicator=this._prepareToLoadTimeline();if(!progressIndicator) |
| 622 return;this._model.loadFromFile(file,progressIndicator);this._createFileSelector
();},loadFromURL:function(url) | 626 return;this._model.loadFromFile(file,progressIndicator);this._createFileSelector
();},loadFromURL:function(url) |
| 623 {var progressIndicator=this._prepareToLoadTimeline();if(!progressIndicator) | 627 {var progressIndicator=this._prepareToLoadTimeline();if(!progressIndicator) |
| 624 return;this._model.loadFromURL(url,progressIndicator);},_prepareToLoadTimeline:f
unction() | 628 return;this._model.loadFromURL(url,progressIndicator);},_prepareToLoadTimeline:f
unction() |
| 625 {if(this._operationInProgress) | 629 {if(this._operationInProgress) |
| 626 return null;if(this.toggleTimelineButton.toggled){this.toggleTimelineButton.togg
led=false;this._model.stopRecord();} | 630 return null;if(this.toggleTimelineButton.toggled){this.toggleTimelineButton.togg
led=false;this._model.stopRecording();} |
| 627 var progressIndicator=new WebInspector.ProgressIndicator();progressIndicator.add
EventListener(WebInspector.ProgressIndicator.Events.Done,this._setOperationInPro
gress.bind(this,null));this._setOperationInProgress(progressIndicator);return pr
ogressIndicator;},_rootRecord:function() | 631 var progressIndicator=new WebInspector.ProgressIndicator();progressIndicator.add
EventListener(WebInspector.ProgressIndicator.Events.Done,this._setOperationInPro
gress.bind(this,null));this._setOperationInProgress(progressIndicator);return pr
ogressIndicator;},_rootRecord:function() |
| 628 {return this._presentationModel.rootRecord();},_updateRecordsCounter:function(re
cordsInWindowCount) | 632 {return this._presentationModel.rootRecord();},_updateRecordsCounter:function(re
cordsInWindowCount) |
| 629 {this.recordsCounter.textContent=WebInspector.UIString("%d of %d records shown",
recordsInWindowCount,this._allRecordsCount);},_updateFrameStatistics:function(fr
ames) | 633 {this.recordsCounter.textContent=WebInspector.UIString("%d of %d records shown",
recordsInWindowCount,this._allRecordsCount);},_updateFrameStatistics:function(fr
ames) |
| 630 {if(frames.length){this._lastFrameStatistics=new WebInspector.FrameStatistics(fr
ames);var details=WebInspector.UIString("avg: %s, \u03c3: %s",Number.secondsToSt
ring(this._lastFrameStatistics.average,true),Number.secondsToString(this._lastFr
ameStatistics.stddev,true));}else | 634 {if(frames.length){this._lastFrameStatistics=new WebInspector.FrameStatistics(fr
ames);var details=WebInspector.UIString("avg: %s, \u03c3: %s",Number.secondsToSt
ring(this._lastFrameStatistics.average,true),Number.secondsToString(this._lastFr
ameStatistics.stddev,true));}else |
| 631 this._lastFrameStatistics=null;this.frameStatistics.textContent=WebInspector.UIS
tring("%d of %d frames shown",frames.length,this._presentationModel.frames().len
gth);if(details){this.frameStatistics.appendChild(document.createTextNode(" ("))
;this.frameStatistics.createChild("span","timeline-frames-stats").textContent=de
tails;this.frameStatistics.appendChild(document.createTextNode(")"));}},_showFra
meStatistics:function(anchor,popover) | 635 this._lastFrameStatistics=null;this.frameStatistics.textContent=WebInspector.UIS
tring("%d of %d frames shown",frames.length,this._presentationModel.frames().len
gth);if(details){this.frameStatistics.appendChild(document.createTextNode(" ("))
;this.frameStatistics.createChild("span","timeline-frames-stats").textContent=de
tails;this.frameStatistics.appendChild(document.createTextNode(")"));}},_showFra
meStatistics:function(anchor,popover) |
| 632 {popover.show(WebInspector.TimelinePresentationModel.generatePopupContentForFram
eStatistics(this._lastFrameStatistics),anchor);},_updateEventDividers:function() | 636 {popover.show(WebInspector.TimelinePresentationModel.generatePopupContentForFram
eStatistics(this._lastFrameStatistics),anchor);},_updateEventDividers:function() |
| 633 {this._timelineGrid.removeEventDividers();var clientWidth=this._graphRowsElement
Width;var dividers=[];var eventDividerRecords=this._presentationModel.eventDivid
erRecords();for(var i=0;i<eventDividerRecords.length;++i){var record=eventDivide
rRecords[i];var positions=this._calculator.computeBarGraphWindowPosition(record)
;var dividerPosition=Math.round(positions.left);if(dividerPosition<0||dividerPos
ition>=clientWidth||dividers[dividerPosition]) | 637 {this._timelineGrid.removeEventDividers();var clientWidth=this._graphRowsElement
Width;var dividers=[];var eventDividerRecords=this._presentationModel.eventDivid
erRecords();for(var i=0;i<eventDividerRecords.length;++i){var record=eventDivide
rRecords[i];var positions=this._calculator.computeBarGraphWindowPosition(record)
;var dividerPosition=Math.round(positions.left);if(dividerPosition<0||dividerPos
ition>=clientWidth||dividers[dividerPosition]) |
| 634 continue;var divider=WebInspector.TimelinePresentationModel.createEventDivider(r
ecord.type,record.title);divider.style.left=dividerPosition+"px";dividers[divide
rPosition]=divider;} | 638 continue;var divider=WebInspector.TimelinePresentationModel.createEventDivider(r
ecord.type,record.title);divider.style.left=dividerPosition+"px";dividers[divide
rPosition]=divider;} |
| 635 this._timelineGrid.addEventDividers(dividers);},_updateFrameBars:function(frames
) | 639 this._timelineGrid.addEventDividers(dividers);},_updateFrameBars:function(frames
) |
| 636 {var clientWidth=this._graphRowsElementWidth;if(this._frameContainer) | 640 {var clientWidth=this._graphRowsElementWidth;if(this._frameContainer) |
| 637 this._frameContainer.removeChildren();else{const frameContainerBorderWidth=1;thi
s._frameContainer=document.createElement("div");this._frameContainer.addStyleCla
ss("fill");this._frameContainer.addStyleClass("timeline-frame-container");this._
frameContainer.style.height=this._headerLineCount*WebInspector.TimelinePanel.row
Height+frameContainerBorderWidth+"px";this._frameContainer.addEventListener("dbl
click",this._onFrameDoubleClicked.bind(this),false);} | 641 this._frameContainer.removeChildren();else{const frameContainerBorderWidth=1;thi
s._frameContainer=document.createElement("div");this._frameContainer.addStyleCla
ss("fill");this._frameContainer.addStyleClass("timeline-frame-container");this._
frameContainer.style.height=this._headerLineCount*WebInspector.TimelinePanel.row
Height+frameContainerBorderWidth+"px";this._frameContainer.addEventListener("dbl
click",this._onFrameDoubleClicked.bind(this),false);} |
| 638 var dividers=[this._frameContainer];for(var i=0;i<frames.length;++i){var frame=f
rames[i];var frameStart=this._calculator.computePosition(frame.startTime);var fr
ameEnd=this._calculator.computePosition(frame.endTime);var frameStrip=document.c
reateElement("div");frameStrip.className="timeline-frame-strip";var actualStart=
Math.max(frameStart,0);var width=frameEnd-actualStart;frameStrip.style.left=actu
alStart+"px";frameStrip.style.width=width+"px";frameStrip._frame=frame;const min
WidthForFrameInfo=60;if(width>minWidthForFrameInfo) | 642 var dividers=[this._frameContainer];for(var i=0;i<frames.length;++i){var frame=f
rames[i];var frameStart=this._calculator.computePosition(frame.startTime);var fr
ameEnd=this._calculator.computePosition(frame.endTime);var frameStrip=document.c
reateElement("div");frameStrip.className="timeline-frame-strip";var actualStart=
Math.max(frameStart,0);var width=frameEnd-actualStart;frameStrip.style.left=actu
alStart+"px";frameStrip.style.width=width+"px";frameStrip._frame=frame;const min
WidthForFrameInfo=60;if(width>minWidthForFrameInfo) |
| 639 frameStrip.textContent=Number.secondsToString(frame.endTime-frame.startTime,true
);this._frameContainer.appendChild(frameStrip);if(actualStart>0){var frameMarker
=WebInspector.TimelinePresentationModel.createEventDivider(WebInspector.Timeline
Model.RecordType.BeginFrame);frameMarker.style.left=frameStart+"px";dividers.pus
h(frameMarker);}} | 643 frameStrip.textContent=Number.secondsToString(frame.endTime-frame.startTime,true
);this._frameContainer.appendChild(frameStrip);if(actualStart>0){var frameMarker
=WebInspector.TimelinePresentationModel.createEventDivider(WebInspector.Timeline
Model.RecordType.BeginFrame);frameMarker.style.left=frameStart+"px";dividers.pus
h(frameMarker);}} |
| 640 this._timelineGrid.addEventDividers(dividers);},_onFrameDoubleClicked:function(e
vent) | 644 this._timelineGrid.addEventDividers(dividers);},_onFrameDoubleClicked:function(e
vent) |
| 641 {var frameBar=event.target.enclosingNodeOrSelfWithClass("timeline-frame-strip");
if(!frameBar) | 645 {var frameBar=event.target.enclosingNodeOrSelfWithClass("timeline-frame-strip");
if(!frameBar) |
| 642 return;this._overviewPane.zoomToFrame(frameBar._frame);},_overviewModeChanged:fu
nction(event) | 646 return;this._overviewPane.zoomToFrame(frameBar._frame);},_overviewModeChanged:fu
nction(event) |
| 643 {var mode=event.data;var shouldShowMemory=mode===WebInspector.TimelineOverviewPa
ne.Mode.Memory;var frameMode=mode===WebInspector.TimelineOverviewPane.Mode.Frame
s;this._overviewModeSetting.set(mode);if(frameMode!==this._frameMode){this._fram
eMode=frameMode;this._glueParentButton.setEnabled(!frameMode);this._presentation
Model.setGlueRecords(this._glueParentButton.toggled&&!frameMode);this._repopulat
eRecords();if(frameMode){this.element.addStyleClass("timeline-frame-overview");t
his.recordsCounter.addStyleClass("hidden");this.frameStatistics.removeStyleClass
("hidden");this._frameController=new WebInspector.TimelineFrameController(this._
model,this._overviewPane,this._presentationModel);}else{this._frameController.di
spose();this._frameController=null;this.element.removeStyleClass("timeline-frame
-overview");this.recordsCounter.removeStyleClass("hidden");this.frameStatistics.
addStyleClass("hidden");}} | 647 {var mode=event.data;var shouldShowMemory=mode===WebInspector.TimelineOverviewPa
ne.Mode.Memory;var frameMode=mode===WebInspector.TimelineOverviewPane.Mode.Frame
s;this._overviewModeSetting.set(mode);if(frameMode!==this._frameMode){this._fram
eMode=frameMode;this._glueParentButton.setEnabled(!frameMode);this._presentation
Model.setGlueRecords(this._glueParentButton.toggled&&!frameMode);this._repopulat
eRecords();if(frameMode){this.element.addStyleClass("timeline-frame-overview");t
his.recordsCounter.addStyleClass("hidden");this.frameStatistics.removeStyleClass
("hidden");this._frameController=new WebInspector.TimelineFrameController(this._
model,this._overviewPane,this._presentationModel);}else{this._frameController.di
spose();this._frameController=null;this.element.removeStyleClass("timeline-frame
-overview");this.recordsCounter.removeStyleClass("hidden");this.frameStatistics.
addStyleClass("hidden");}} |
| 644 if(shouldShowMemory===this._memoryStatistics.visible()) | 648 if(shouldShowMemory===this._memoryStatistics.visible()) |
| 645 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._timelineMemorySpl
itter.removeStyleClass("hidden");this._memoryStatistics.show();this.splitView.el
ement.style.bottom="auto";this._setSplitterPosition(WebInspector.settings.memory
CounterGraphsHeight.get());}},_toggleTimelineButtonClicked:function() | 649 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._timelineMemorySpl
itter.removeStyleClass("hidden");this._memoryStatistics.show();this.splitView.el
ement.style.bottom="auto";this._setSplitterPosition(WebInspector.settings.memory
CounterGraphsHeight.get());}},_toggleTimelineButtonClicked:function() |
| 646 {if(this._operationInProgress) | 650 {if(this._operationInProgress) |
| 647 return true;if(this.toggleTimelineButton.toggled){this._model.stopRecord();this.
toggleTimelineButton.title=WebInspector.UIString("Record");}else{this._model.sta
rtRecord(this._includeDomCounters);this.toggleTimelineButton.title=WebInspector.
UIString("Stop");WebInspector.userMetrics.TimelineStarted.record();} | 651 return true;if(this.toggleTimelineButton.toggled){this._model.stopRecording();}e
lse{this._model.startRecording(this._includeDomCounters);WebInspector.userMetric
s.TimelineStarted.record();} |
| 648 this.toggleTimelineButton.toggled=!this.toggleTimelineButton.toggled;return true
;},_durationFilterChanged:function() | 652 return true;},_durationFilterChanged:function() |
| 649 {var option=this._durationFilterSelector.selectedOption();var minimumRecordDurat
ion=+option._durationMs/1000.0;this._durationFilter.setMinimumRecordDuration(min
imumRecordDuration);this._durationFilterSelector.element.title=option.title;this
._invalidateAndScheduleRefresh(true,true);},_garbageCollectButtonClicked:functio
n() | 653 {var option=this._durationFilterSelector.selectedOption();var minimumRecordDurat
ion=+option._durationMs/1000.0;this._durationFilter.setMinimumRecordDuration(min
imumRecordDuration);this._durationFilterSelector.element.title=option.title;this
._invalidateAndScheduleRefresh(true,true);},_garbageCollectButtonClicked:functio
n() |
| 650 {HeapProfilerAgent.collectGarbage();},_glueParentButtonClicked:function() | 654 {HeapProfilerAgent.collectGarbage();},_glueParentButtonClicked:function() |
| 651 {var newValue=!this._glueParentButton.toggled;this._glueParentButton.toggled=new
Value;this._presentationModel.setGlueRecords(newValue);this._glueRecordsSetting.
set(newValue);this._repopulateRecords();},_repopulateRecords:function() | 655 {var newValue=!this._glueParentButton.toggled;this._glueParentButton.toggled=new
Value;this._presentationModel.setGlueRecords(newValue);this._glueRecordsSetting.
set(newValue);this._repopulateRecords();},_repopulateRecords:function() |
| 652 {this._resetPanel();this._automaticallySizeWindow=false;var records=this._model.
records;for(var i=0;i<records.length;++i) | 656 {this._resetPanel();this._automaticallySizeWindow=false;var records=this._model.
records;for(var i=0;i<records.length;++i) |
| 653 this._innerAddRecordToTimeline(records[i]);this._invalidateAndScheduleRefresh(fa
lse,false);},_onTimelineEventRecorded:function(event) | 657 this._innerAddRecordToTimeline(records[i]);this._invalidateAndScheduleRefresh(fa
lse,false);},_onTimelineEventRecorded:function(event) |
| 654 {if(this._innerAddRecordToTimeline(event.data)) | 658 {if(this._innerAddRecordToTimeline((event.data))) |
| 655 this._invalidateAndScheduleRefresh(false,false);},_innerAddRecordToTimeline:func
tion(record) | 659 this._invalidateAndScheduleRefresh(false,false);},_innerAddRecordToTimeline:func
tion(record) |
| 656 {if(record.type===WebInspector.TimelineModel.RecordType.Program){this._mainThrea
dTasks.push({startTime:WebInspector.TimelineModel.startTimeInSeconds(record),end
Time:WebInspector.TimelineModel.endTimeInSeconds(record)});} | 660 {if(record.type===WebInspector.TimelineModel.RecordType.Program){this._mainThrea
dTasks.push({startTime:WebInspector.TimelineModel.startTimeInSeconds(record),end
Time:WebInspector.TimelineModel.endTimeInSeconds(record)});} |
| 657 var records=this._presentationModel.addRecord(record);this._allRecordsCount+=rec
ords.length;var hasVisibleRecords=false;var presentationModel=this._presentation
Model;function checkVisible(record) | 661 var records=this._presentationModel.addRecord(record);this._allRecordsCount+=rec
ords.length;var hasVisibleRecords=false;var presentationModel=this._presentation
Model;function checkVisible(record) |
| 658 {hasVisibleRecords|=presentationModel.isVisible(record);} | 662 {hasVisibleRecords|=presentationModel.isVisible(record);} |
| 659 WebInspector.TimelinePresentationModel.forAllRecords(records,checkVisible);funct
ion isAdoptedRecord(record) | 663 WebInspector.TimelinePresentationModel.forAllRecords(records,checkVisible);funct
ion isAdoptedRecord(record) |
| 660 {return record.parent!==presentationModel.rootRecord;} | 664 {return record.parent!==presentationModel.rootRecord;} |
| 661 return hasVisibleRecords||records.some(isAdoptedRecord);},sidebarResized:functio
n(event) | 665 return hasVisibleRecords||records.some(isAdoptedRecord);},sidebarResized:functio
n(event) |
| 662 {var width=event.data;this._resize(width);this._overviewPane.sidebarResized(widt
h);this._memoryStatistics.setSidebarWidth(width);this._timelineGrid.gridHeaderEl
ement.style.left=width+"px";},onResize:function() | 666 {var width=event.data;this._resize(width);this._overviewPane.sidebarResized(widt
h);this._memoryStatistics.setSidebarWidth(width);this._timelineGrid.gridHeaderEl
ement.style.left=width+"px";},onResize:function() |
| 663 {this._resize(this.splitView.sidebarWidth());},_resize:function(sidebarWidth) | 667 {this._resize(this.splitView.sidebarWidth());},_resize:function(sidebarWidth) |
| 664 {this._closeRecordDetails();this._graphRowsElementWidth=this._graphRowsElement.o
ffsetWidth;this._containerElementHeight=this._containerElement.clientHeight;this
._scheduleRefresh(false,true);var lastItemElement=this._statusBarItems[this._sta
tusBarItems.length-1].element;var minFloatingStatusBarItemsOffset=lastItemElemen
t.totalOffsetLeft()+lastItemElement.offsetWidth;this._timelineGrid.gridHeaderEle
ment.style.width=this._itemsGraphsElement.offsetWidth+"px";this._miscStatusBarIt
ems.style.left=Math.max(minFloatingStatusBarItemsOffset,sidebarWidth)+"px";},_cl
earPanel:function() | 668 {this._closeRecordDetails();this._graphRowsElementWidth=this._graphRowsElement.o
ffsetWidth;this._containerElementHeight=this._containerElement.clientHeight;this
._scheduleRefresh(false,true);var lastItemElement=this._statusBarItems[this._sta
tusBarItems.length-1].element;var minFloatingStatusBarItemsOffset=lastItemElemen
t.totalOffsetLeft()+lastItemElement.offsetWidth;this._timelineGrid.gridHeaderEle
ment.style.width=this._itemsGraphsElement.offsetWidth+"px";this._miscStatusBarIt
ems.style.left=Math.max(minFloatingStatusBarItemsOffset,sidebarWidth)+"px";},_cl
earPanel:function() |
| 665 {this._model.reset();},_onRecordsCleared:function() | 669 {this._model.reset();},_onRecordsCleared:function() |
| 666 {this._resetPanel();this._invalidateAndScheduleRefresh(true,true);},_resetPanel:
function() | 670 {this._resetPanel();this._invalidateAndScheduleRefresh(true,true);},_onRecording
Started:function() |
| 671 {this.toggleTimelineButton.title=WebInspector.UIString("Stop");this.toggleTimeli
neButton.toggled=true;},_onRecordingStopped:function() |
| 672 {this.toggleTimelineButton.title=WebInspector.UIString("Record");this.toggleTime
lineButton.toggled=false;},_resetPanel:function() |
| 667 {this._presentationModel.reset();this._boundariesAreValid=false;this._adjustScro
llPosition(0);this._closeRecordDetails();this._allRecordsCount=0;this._automatic
allySizeWindow=true;this._mainThreadTasks=[];},elementsToRestoreScrollPositionsF
or:function() | 673 {this._presentationModel.reset();this._boundariesAreValid=false;this._adjustScro
llPosition(0);this._closeRecordDetails();this._allRecordsCount=0;this._automatic
allySizeWindow=true;this._mainThreadTasks=[];},elementsToRestoreScrollPositionsF
or:function() |
| 668 {return[this._containerElement];},wasShown:function() | 674 {return[this._containerElement];},wasShown:function() |
| 669 {WebInspector.Panel.prototype.wasShown.call(this);if(!WebInspector.TimelinePanel
._categoryStylesInitialized){WebInspector.TimelinePanel._categoryStylesInitializ
ed=true;this._injectCategoryStyles();} | 675 {WebInspector.Panel.prototype.wasShown.call(this);if(!WebInspector.TimelinePanel
._categoryStylesInitialized){WebInspector.TimelinePanel._categoryStylesInitializ
ed=true;this._injectCategoryStyles();} |
| 670 this._overviewPane.setMode(this._overviewModeSetting.get());this._refresh();},wi
llHide:function() | 676 this._overviewPane.setMode(this._overviewModeSetting.get());this._refresh();},wi
llHide:function() |
| 671 {this._closeRecordDetails();WebInspector.Panel.prototype.willHide.call(this);},_
onScroll:function(event) | 677 {this._closeRecordDetails();WebInspector.Panel.prototype.willHide.call(this);},_
onScroll:function(event) |
| 672 {this._closeRecordDetails();this._scrollTop=this._containerElement.scrollTop;var
dividersTop=Math.max(0,this._scrollTop);this._timelineGrid.setScrollAndDividerT
op(this._scrollTop,dividersTop);this._scheduleRefresh(true,true);},_invalidateAn
dScheduleRefresh:function(preserveBoundaries,userGesture) | 678 {this._closeRecordDetails();this._scrollTop=this._containerElement.scrollTop;var
dividersTop=Math.max(0,this._scrollTop);this._timelineGrid.setScrollAndDividerT
op(this._scrollTop,dividersTop);this._scheduleRefresh(true,true);},_invalidateAn
dScheduleRefresh:function(preserveBoundaries,userGesture) |
| 673 {this._presentationModel.invalidateFilteredRecords();delete this._searchResults;
this._scheduleRefresh(preserveBoundaries,userGesture);},_scheduleRefresh:functio
n(preserveBoundaries,userGesture) | 679 {this._presentationModel.invalidateFilteredRecords();delete this._searchResults;
this._scheduleRefresh(preserveBoundaries,userGesture);},_scheduleRefresh:functio
n(preserveBoundaries,userGesture) |
| 674 {this._closeRecordDetails();this._boundariesAreValid&=preserveBoundaries;if(!thi
s.isShowing()) | 680 {this._closeRecordDetails();this._boundariesAreValid&=preserveBoundaries;if(!thi
s.isShowing()) |
| 675 return;if(preserveBoundaries||userGesture) | 681 return;if(preserveBoundaries||userGesture) |
| 676 this._refresh();else{if(!this._refreshTimeout) | 682 this._refresh();else{if(!this._refreshTimeout) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 if(!this._searchResults) | 752 if(!this._searchResults) |
| 747 this._updateSearchResults(shouldJump);this._highlightSelectedSearchResult(reveal
Record);},_updateSearchResults:function(shouldJump) | 753 this._updateSearchResults(shouldJump);this._highlightSelectedSearchResult(reveal
Record);},_updateSearchResults:function(shouldJump) |
| 748 {var searchRegExp=this._searchRegExp;if(!searchRegExp) | 754 {var searchRegExp=this._searchRegExp;if(!searchRegExp) |
| 749 return;var matches=[];var presentationModel=this._presentationModel;function pro
cessRecord(record) | 755 return;var matches=[];var presentationModel=this._presentationModel;function pro
cessRecord(record) |
| 750 {if(presentationModel.isVisible(record)&&WebInspector.TimelineRecordListRow.test
ContentMatching(record,searchRegExp)) | 756 {if(presentationModel.isVisible(record)&&WebInspector.TimelineRecordListRow.test
ContentMatching(record,searchRegExp)) |
| 751 matches.push(record);return false;} | 757 matches.push(record);return false;} |
| 752 WebInspector.TimelinePresentationModel.forAllRecords(presentationModel.rootRecor
d().children,processRecord);var matchesCount=matches.length;if(matchesCount){thi
s._searchResults=matches;WebInspector.searchController.updateSearchMatchesCount(
matchesCount,this);var selectedIndex=matches.indexOf(this._selectedSearchResult)
;if(shouldJump&&selectedIndex===-1) | 758 WebInspector.TimelinePresentationModel.forAllRecords(presentationModel.rootRecor
d().children,processRecord);var matchesCount=matches.length;if(matchesCount){thi
s._searchResults=matches;WebInspector.searchController.updateSearchMatchesCount(
matchesCount,this);var selectedIndex=matches.indexOf(this._selectedSearchResult)
;if(shouldJump&&selectedIndex===-1) |
| 753 selectedIndex=0;this._selectSearchResult(selectedIndex);}else{WebInspector.searc
hController.updateSearchMatchesCount(0,this);delete this._selectedSearchResult;}
},searchCanceled:function() | 759 selectedIndex=0;this._selectSearchResult(selectedIndex);}else{WebInspector.searc
hController.updateSearchMatchesCount(0,this);delete this._selectedSearchResult;}
},searchCanceled:function() |
| 754 {this._clearHighlight();delete this._searchResults;delete this._selectedSearchRe
sult;delete this._searchRegExp;},canFilter:function() | 760 {this._clearHighlight();delete this._searchResults;delete this._selectedSearchRe
sult;delete this._searchRegExp;},canFilter:function() |
| 755 {return true;},performFilter:function(searchQuery) | 761 {return true;},performFilter:function(searchQuery) |
| 756 {this._presentationModel.removeFilter(this._searchFilter);delete this._searchFil
ter;this.searchCanceled();if(searchQuery){this._searchFilter=new WebInspector.Ti
melineSearchFilter(createPlainTextSearchRegex(searchQuery,"i"));this._presentati
onModel.addFilter(this._searchFilter);} | 762 {this._presentationModel.setSearchFilter(null);delete this._searchFilter;functio
n cleanRecord(record) |
| 763 {delete record.clicked;} |
| 764 WebInspector.TimelinePresentationModel.forAllRecords(this._presentationModel.roo
tRecord().children,cleanRecord);this.searchCanceled();if(searchQuery){this._sear
chFilter=new WebInspector.TimelineSearchFilter(createPlainTextSearchRegex(search
Query,"i"));this._presentationModel.setSearchFilter(this._searchFilter);} |
| 757 this._invalidateAndScheduleRefresh(true,true);},performSearch:function(query,sho
uldJump) | 765 this._invalidateAndScheduleRefresh(true,true);},performSearch:function(query,sho
uldJump) |
| 758 {this._searchRegExp=createPlainTextSearchRegex(query,"i");delete this._searchRes
ults;this._updateSearchHighlight(true,shouldJump);},__proto__:WebInspector.Panel
.prototype} | 766 {this._searchRegExp=createPlainTextSearchRegex(query,"i");delete this._searchRes
ults;this._updateSearchHighlight(true,shouldJump);},__proto__:WebInspector.Panel
.prototype} |
| 759 WebInspector.TimelineCalculator=function(model) | 767 WebInspector.TimelineCalculator=function(model) |
| 760 {this._model=model;} | 768 {this._model=model;} |
| 761 WebInspector.TimelineCalculator._minWidth=5;WebInspector.TimelineCalculator.prot
otype={computePosition:function(time) | 769 WebInspector.TimelineCalculator._minWidth=5;WebInspector.TimelineCalculator.prot
otype={computePosition:function(time) |
| 762 {return(time-this._minimumBoundary)/this.boundarySpan()*this._workingArea+this.p
addingLeft;},computeBarGraphPercentages:function(record) | 770 {return(time-this._minimumBoundary)/this.boundarySpan()*this._workingArea+this.p
addingLeft;},computeBarGraphPercentages:function(record) |
| 763 {var start=(record.startTime-this._minimumBoundary)/this.boundarySpan()*100;var
end=(record.startTime+record.selfTime-this._minimumBoundary)/this.boundarySpan()
*100;var endWithChildren=(record.lastChildEndTime-this._minimumBoundary)/this.bo
undarySpan()*100;var cpuWidth=record.coalesced?endWithChildren-start:record.cpuT
ime/this.boundarySpan()*100;return{start:start,end:end,endWithChildren:endWithCh
ildren,cpuWidth:cpuWidth};},computeBarGraphWindowPosition:function(record) | 771 {var start=(record.startTime-this._minimumBoundary)/this.boundarySpan()*100;var
end=(record.startTime+record.selfTime-this._minimumBoundary)/this.boundarySpan()
*100;var endWithChildren=(record.lastChildEndTime-this._minimumBoundary)/this.bo
undarySpan()*100;var cpuWidth=record.coalesced?endWithChildren-start:record.cpuT
ime/this.boundarySpan()*100;return{start:start,end:end,endWithChildren:endWithCh
ildren,cpuWidth:cpuWidth};},computeBarGraphWindowPosition:function(record) |
| 764 {var percentages=this.computeBarGraphPercentages(record);var widthAdjustment=0;v
ar left=this.computePosition(record.startTime);var width=(percentages.end-percen
tages.start)/100*this._workingArea;if(width<WebInspector.TimelineCalculator._min
Width){widthAdjustment=WebInspector.TimelineCalculator._minWidth-width;width=Web
Inspector.TimelineCalculator._minWidth;} | 772 {var percentages=this.computeBarGraphPercentages(record);var widthAdjustment=0;v
ar left=this.computePosition(record.startTime);var width=(percentages.end-percen
tages.start)/100*this._workingArea;if(width<WebInspector.TimelineCalculator._min
Width){widthAdjustment=WebInspector.TimelineCalculator._minWidth-width;width=Web
Inspector.TimelineCalculator._minWidth;} |
| 765 var widthWithChildren=(percentages.endWithChildren-percentages.start)/100*this._
workingArea+widthAdjustment;var cpuWidth=percentages.cpuWidth/100*this._workingA
rea+widthAdjustment;if(percentages.endWithChildren>percentages.end) | 773 var widthWithChildren=(percentages.endWithChildren-percentages.start)/100*this._
workingArea+widthAdjustment;var cpuWidth=percentages.cpuWidth/100*this._workingA
rea+widthAdjustment;if(percentages.endWithChildren>percentages.end) |
| 766 widthWithChildren+=widthAdjustment;return{left:left,width:width,widthWithChildre
n:widthWithChildren,cpuWidth:cpuWidth};},setWindow:function(minimumBoundary,maxi
mumBoundary) | 774 widthWithChildren+=widthAdjustment;return{left:left,width:width,widthWithChildre
n:widthWithChildren,cpuWidth:cpuWidth};},setWindow:function(minimumBoundary,maxi
mumBoundary) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 787 WebInspector.TimelineRecordListRow.testContentMatching=function(record,regExp) | 795 WebInspector.TimelineRecordListRow.testContentMatching=function(record,regExp) |
| 788 {var toSearchText=record.title;if(record.detailsNode()) | 796 {var toSearchText=record.title;if(record.detailsNode()) |
| 789 toSearchText+=" "+record.detailsNode().textContent;return regExp.test(toSearchTe
xt);} | 797 toSearchText+=" "+record.detailsNode().textContent;return regExp.test(toSearchTe
xt);} |
| 790 WebInspector.TimelineRecordGraphRow=function(graphContainer,scheduleRefresh) | 798 WebInspector.TimelineRecordGraphRow=function(graphContainer,scheduleRefresh) |
| 791 {this.element=document.createElement("div");this.element.row=this;this._barAreaE
lement=document.createElement("div");this._barAreaElement.className="timeline-gr
aph-bar-area";this.element.appendChild(this._barAreaElement);this._barWithChildr
enElement=document.createElement("div");this._barWithChildrenElement.className="
timeline-graph-bar with-children";this._barWithChildrenElement.row=this;this._ba
rAreaElement.appendChild(this._barWithChildrenElement);this._barCpuElement=docum
ent.createElement("div");this._barCpuElement.className="timeline-graph-bar cpu" | 799 {this.element=document.createElement("div");this.element.row=this;this._barAreaE
lement=document.createElement("div");this._barAreaElement.className="timeline-gr
aph-bar-area";this.element.appendChild(this._barAreaElement);this._barWithChildr
enElement=document.createElement("div");this._barWithChildrenElement.className="
timeline-graph-bar with-children";this._barWithChildrenElement.row=this;this._ba
rAreaElement.appendChild(this._barWithChildrenElement);this._barCpuElement=docum
ent.createElement("div");this._barCpuElement.className="timeline-graph-bar cpu" |
| 792 this._barCpuElement.row=this;this._barAreaElement.appendChild(this._barCpuElemen
t);this._barElement=document.createElement("div");this._barElement.className="ti
meline-graph-bar";this._barElement.row=this;this._barAreaElement.appendChild(thi
s._barElement);this._expandElement=new WebInspector.TimelineExpandableElement(gr
aphContainer);this._expandElement._element.addEventListener("click",this._onClic
k.bind(this));this._scheduleRefresh=scheduleRefresh;} | 800 this._barCpuElement.row=this;this._barAreaElement.appendChild(this._barCpuElemen
t);this._barElement=document.createElement("div");this._barElement.className="ti
meline-graph-bar";this._barElement.row=this;this._barAreaElement.appendChild(thi
s._barElement);this._expandElement=new WebInspector.TimelineExpandableElement(gr
aphContainer);this._expandElement._element.addEventListener("click",this._onClic
k.bind(this));this._scheduleRefresh=scheduleRefresh;} |
| 793 WebInspector.TimelineRecordGraphRow.prototype={update:function(record,isEven,cal
culator,expandOffset,index) | 801 WebInspector.TimelineRecordGraphRow.prototype={update:function(record,isEven,cal
culator,expandOffset,index) |
| 794 {this._record=record;this.element.className="timeline-graph-side timeline-catego
ry-"+record.category.name;if(isEven) | 802 {this._record=record;this.element.className="timeline-graph-side timeline-catego
ry-"+record.category.name;if(isEven) |
| 795 this.element.addStyleClass("even");if(record.isBackground) | 803 this.element.addStyleClass("even");if(record.isBackground) |
| 796 this.element.addStyleClass("background");var barPosition=calculator.computeBarGr
aphWindowPosition(record);this._barWithChildrenElement.style.left=barPosition.le
ft+"px";this._barWithChildrenElement.style.width=barPosition.widthWithChildren+"
px";this._barElement.style.left=barPosition.left+"px";this._barElement.style.wid
th=barPosition.width+"px";this._barCpuElement.style.left=barPosition.left+"px";t
his._barCpuElement.style.width=barPosition.cpuWidth+"px";this._expandElement._up
date(record,index,barPosition.left-expandOffset,barPosition.width);},_onClick:fu
nction(event) | 804 this.element.addStyleClass("background");var barPosition=calculator.computeBarGr
aphWindowPosition(record);this._barWithChildrenElement.style.left=barPosition.le
ft+"px";this._barWithChildrenElement.style.width=barPosition.widthWithChildren+"
px";this._barElement.style.left=barPosition.left+"px";this._barElement.style.wid
th=barPosition.width+"px";this._barCpuElement.style.left=barPosition.left+"px";t
his._barCpuElement.style.width=barPosition.cpuWidth+"px";this._expandElement._up
date(record,index,barPosition.left-expandOffset,barPosition.width);},_onClick:fu
nction(event) |
| 797 {this._record.collapsed=!this._record.collapsed;this._scheduleRefresh(false,true
);},dispose:function() | 805 {this._record.collapsed=!this._record.collapsed;this._record.clicked=true;this._
scheduleRefresh(false,true);},dispose:function() |
| 798 {this.element.remove();this._expandElement._dispose();}} | 806 {this.element.remove();this._expandElement._dispose();}} |
| 799 WebInspector.TimelineExpandableElement=function(container) | 807 WebInspector.TimelineExpandableElement=function(container) |
| 800 {this._element=container.createChild("div","timeline-expandable");this._element.
createChild("div","timeline-expandable-left");this._element.createChild("div","t
imeline-expandable-arrow");} | 808 {this._element=container.createChild("div","timeline-expandable");this._element.
createChild("div","timeline-expandable-left");this._element.createChild("div","t
imeline-expandable-arrow");} |
| 801 WebInspector.TimelineExpandableElement.prototype={_update:function(record,index,
left,width) | 809 WebInspector.TimelineExpandableElement.prototype={_update:function(record,index,
left,width) |
| 802 {const rowHeight=WebInspector.TimelinePanel.rowHeight;if(record.visibleChildrenC
ount||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.visibleChildr
enCount+1)*rowHeight+"px";this._element.addStyleClass("timeline-expandable-expan
ded");this._element.removeStyleClass("timeline-expandable-collapsed");}else{this
._element.style.height=rowHeight+"px";this._element.addStyleClass("timeline-expa
ndable-collapsed");this._element.removeStyleClass("timeline-expandable-expanded"
);} | 810 {const rowHeight=WebInspector.TimelinePanel.rowHeight;if(record.visibleChildrenC
ount||record.expandable){this._element.style.top=index*rowHeight+"px";this._elem
ent.style.left=left+"px";this._element.style.width=Math.max(12,width+25)+"px";if
(!record.collapsed){this._element.style.height=(record.visibleChildrenCount+1)*r
owHeight+"px";this._element.addStyleClass("timeline-expandable-expanded");this._
element.removeStyleClass("timeline-expandable-collapsed");}else{this._element.st
yle.height=rowHeight+"px";this._element.addStyleClass("timeline-expandable-colla
psed");this._element.removeStyleClass("timeline-expandable-expanded");} |
| 803 this._element.removeStyleClass("hidden");}else | 811 this._element.removeStyleClass("hidden");}else |
| 804 this._element.addStyleClass("hidden");},_dispose:function() | 812 this._element.addStyleClass("hidden");},_dispose:function() |
| 805 {this._element.remove();}} | 813 {this._element.remove();}} |
| 806 WebInspector.TimelineCategoryFilter=function() | 814 WebInspector.TimelineCategoryFilter=function() |
| 807 {} | 815 {} |
| 808 WebInspector.TimelineCategoryFilter.prototype={accept:function(record) | 816 WebInspector.TimelineCategoryFilter.prototype={accept:function(record) |
| 809 {return!record.category.hidden&&record.type!==WebInspector.TimelineModel.RecordT
ype.BeginFrame;}} | 817 {return!record.category.hidden&&record.type!==WebInspector.TimelineModel.RecordT
ype.BeginFrame;}} |
| 810 WebInspector.TimelineIsLongFilter=function() | 818 WebInspector.TimelineIsLongFilter=function() |
| 811 {this._minimumRecordDuration=0;} | 819 {this._minimumRecordDuration=0;} |
| 812 WebInspector.TimelineIsLongFilter.prototype={setMinimumRecordDuration:function(v
alue) | 820 WebInspector.TimelineIsLongFilter.prototype={setMinimumRecordDuration:function(v
alue) |
| 813 {this._minimumRecordDuration=value;},accept:function(record) | 821 {this._minimumRecordDuration=value;},accept:function(record) |
| 814 {return this._minimumRecordDuration?((record.lastChildEndTime-record.startTime)>
=this._minimumRecordDuration):true;}} | 822 {return this._minimumRecordDuration?((record.lastChildEndTime-record.startTime)>
=this._minimumRecordDuration):true;}} |
| 815 WebInspector.TimelineSearchFilter=function(regExp) | 823 WebInspector.TimelineSearchFilter=function(regExp) |
| 816 {this._regExp=regExp;} | 824 {this._regExp=regExp;} |
| 817 WebInspector.TimelineSearchFilter.prototype={accept:function(record) | 825 WebInspector.TimelineSearchFilter.prototype={accept:function(record) |
| 818 {return WebInspector.TimelineRecordListRow.testContentMatching(record,this._regE
xp);}} | 826 {return WebInspector.TimelineRecordListRow.testContentMatching(record,this._regE
xp);}} |
| OLD | NEW |