| OLD | NEW |
| 1 WebInspector.RequestView=function(request) | 1 WebInspector.RequestView=function(request) |
| 2 {WebInspector.View.call(this);this.registerRequiredCSS("resourceView.css");this.
element.addStyleClass("resource-view");this.request=request;} | 2 {WebInspector.View.call(this);this.registerRequiredCSS("resourceView.css");this.
element.addStyleClass("resource-view");this.request=request;} |
| 3 WebInspector.RequestView.prototype={hasContent:function() | 3 WebInspector.RequestView.prototype={hasContent:function() |
| 4 {return false;},__proto__:WebInspector.View.prototype} | 4 {return false;},__proto__:WebInspector.View.prototype} |
| 5 WebInspector.RequestView.hasTextContent=function(request) | 5 WebInspector.RequestView.hasTextContent=function(request) |
| 6 {if(request.type.isTextType()) | 6 {if(request.type.isTextType()) |
| 7 return true;if(request.type===WebInspector.resourceTypes.Other||request.hasError
StatusCode()) | 7 return true;if(request.type===WebInspector.resourceTypes.Other||request.hasError
StatusCode()) |
| 8 return request.content&&!request.contentEncoded;return false;} | 8 return request.content&&!request.contentEncoded;return false;} |
| 9 WebInspector.RequestView.nonSourceViewForRequest=function(request) | 9 WebInspector.RequestView.nonSourceViewForRequest=function(request) |
| 10 {switch(request.type){case WebInspector.resourceTypes.Image:return new WebInspec
tor.ImageView(request);case WebInspector.resourceTypes.Font:return new WebInspec
tor.FontView(request);default:return new WebInspector.RequestView(request);}};We
bInspector.NetworkItemView=function(request) | 10 {switch(request.type){case WebInspector.resourceTypes.Image:return new WebInspec
tor.ImageView(request);case WebInspector.resourceTypes.Font:return new WebInspec
tor.FontView(request);default:return new WebInspector.RequestView(request);}};We
bInspector.NetworkItemView=function(request) |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 {var tableElement=document.createElement("table");var rows=[];function addRow(ti
tle,className,start,end) | 150 {var tableElement=document.createElement("table");var rows=[];function addRow(ti
tle,className,start,end) |
| 151 {var row={};row.title=title;row.className=className;row.start=start;row.end=end;
rows.push(row);} | 151 {var row={};row.title=title;row.className=className;row.start=start;row.end=end;
rows.push(row);} |
| 152 if(request.timing.proxyStart!==-1) | 152 if(request.timing.proxyStart!==-1) |
| 153 addRow(WebInspector.UIString("Proxy"),"proxy",request.timing.proxyStart,request.
timing.proxyEnd);if(request.timing.dnsStart!==-1) | 153 addRow(WebInspector.UIString("Proxy"),"proxy",request.timing.proxyStart,request.
timing.proxyEnd);if(request.timing.dnsStart!==-1) |
| 154 addRow(WebInspector.UIString("DNS Lookup"),"dns",request.timing.dnsStart,request
.timing.dnsEnd);if(request.timing.connectStart!==-1){var label=request.connectio
nReused?WebInspector.UIString("Blocking"):WebInspector.UIString("Connecting");ad
dRow(label,"connecting",request.timing.connectStart,request.timing.connectEnd);} | 154 addRow(WebInspector.UIString("DNS Lookup"),"dns",request.timing.dnsStart,request
.timing.dnsEnd);if(request.timing.connectStart!==-1){var label=request.connectio
nReused?WebInspector.UIString("Blocking"):WebInspector.UIString("Connecting");ad
dRow(label,"connecting",request.timing.connectStart,request.timing.connectEnd);} |
| 155 if(request.timing.sslStart!==-1) | 155 if(request.timing.sslStart!==-1) |
| 156 addRow(WebInspector.UIString("SSL"),"ssl",request.timing.sslStart,request.timing
.sslEnd);addRow(WebInspector.UIString("Sending"),"sending",request.timing.sendSt
art,request.timing.sendEnd);addRow(WebInspector.UIString("Waiting"),"waiting",re
quest.timing.sendEnd,request.timing.receiveHeadersEnd);addRow(WebInspector.UIStr
ing("Receiving"),"receiving",(request.responseReceivedTime-request.timing.reques
tTime)*1000,(request.endTime-request.timing.requestTime)*1000);const chartWidth=
200;var total=(request.endTime-request.timing.requestTime)*1000;var scale=chartW
idth/total;for(var i=0;i<rows.length;++i){var tr=document.createElement("tr");ta
bleElement.appendChild(tr);var td=document.createElement("td");td.textContent=ro
ws[i].title;tr.appendChild(td);td=document.createElement("td");td.width=chartWid
th+"px";var row=document.createElement("div");row.className="network-timing-row"
;td.appendChild(row);var bar=document.createElement("span");bar.className="netwo
rk-timing-bar "+rows[i].className;bar.style.left=scale*rows[i].start+"px";bar.st
yle.right=scale*(total-rows[i].end)+"px";bar.style.backgroundColor=rows[i].color
;bar.textContent="\u200B";row.appendChild(bar);var title=document.createElement(
"span");title.className="network-timing-bar-title";if(total-rows[i].end<rows[i].
start) | 156 addRow(WebInspector.UIString("SSL"),"ssl",request.timing.sslStart,request.timing
.sslEnd);addRow(WebInspector.UIString("Sending"),"sending",request.timing.sendSt
art,request.timing.sendEnd);addRow(WebInspector.UIString("Waiting"),"waiting",re
quest.timing.sendEnd,request.timing.receiveHeadersEnd);addRow(WebInspector.UIStr
ing("Receiving"),"receiving",(request.responseReceivedTime-request.timing.reques
tTime)*1000,(request.endTime-request.timing.requestTime)*1000);const chartWidth=
200;var total=(request.endTime-request.timing.requestTime)*1000;var scale=chartW
idth/total;for(var i=0;i<rows.length;++i){var tr=document.createElement("tr");ta
bleElement.appendChild(tr);var td=document.createElement("td");td.textContent=ro
ws[i].title;tr.appendChild(td);td=document.createElement("td");td.width=chartWid
th+"px";var row=document.createElement("div");row.className="network-timing-row"
;td.appendChild(row);var bar=document.createElement("span");bar.className="netwo
rk-timing-bar "+rows[i].className;bar.style.left=scale*rows[i].start+"px";bar.st
yle.right=scale*(total-rows[i].end)+"px";bar.style.backgroundColor=rows[i].color
;bar.textContent="\u200B";row.appendChild(bar);var title=document.createElement(
"span");title.className="network-timing-bar-title";if(total-rows[i].end<rows[i].
start) |
| 157 title.style.right=(scale*(total-rows[i].end)+3)+"px";else | 157 title.style.right=(scale*(total-rows[i].end)+3)+"px";else |
| 158 title.style.left=(scale*rows[i].start+3)+"px";title.textContent=Number.secondsTo
String((rows[i].end-rows[i].start)/1000);row.appendChild(title);tr.appendChild(t
d);} | 158 title.style.left=(scale*rows[i].start+3)+"px";title.textContent=Number.secondsTo
String((rows[i].end-rows[i].start)/1000);row.appendChild(title);tr.appendChild(t
d);} |
| 159 return tableElement;};WebInspector.ResourceWebSocketFrameView=function(resource) | 159 return tableElement;};WebInspector.ResourceWebSocketFrameView=function(resource) |
| 160 {WebInspector.View.call(this);this.element.addStyleClass("resource-websocket");t
his.resource=resource;this.element.removeChildren();this._dataGrid=new WebInspec
tor.DataGrid([{id:"data",title:WebInspector.UIString("Data"),sortable:false,weig
ht:88},{id:"length",title:WebInspector.UIString("Length"),sortable:false,alig:We
bInspector.DataGrid.Align.Right,weight:5},{id:"time",title:WebInspector.UIString
("Time"),weight:7}]);this.refresh();this._dataGrid.setName("ResourceWebSocketFra
meView");this._dataGrid.show(this.element);} | 160 {WebInspector.View.call(this);this.element.addStyleClass("resource-websocket");t
his.resource=resource;this.element.removeChildren();this._dataGrid=new WebInspec
tor.DataGrid([{id:"data",title:WebInspector.UIString("Data"),sortable:false,weig
ht:88,longText:true},{id:"length",title:WebInspector.UIString("Length"),sortable
:false,alig:WebInspector.DataGrid.Align.Right,weight:5},{id:"time",title:WebInsp
ector.UIString("Time"),weight:7}],undefined,undefined,undefined,this._onContextM
enu.bind(this));this.refresh();this._dataGrid.setName("ResourceWebSocketFrameVie
w");this._dataGrid.show(this.element);} |
| 161 WebInspector.ResourceWebSocketFrameView.OpCodes={ContinuationFrame:0,TextFrame:1
,BinaryFrame:2,ConnectionCloseFrame:8,PingFrame:9,PongFrame:10};WebInspector.Res
ourceWebSocketFrameView.prototype={appendFrame:function(frame) | 161 WebInspector.ResourceWebSocketFrameView.OpCodes={ContinuationFrame:0,TextFrame:1
,BinaryFrame:2,ConnectionCloseFrame:8,PingFrame:9,PongFrame:10};WebInspector.Res
ourceWebSocketFrameView.prototype={appendFrame:function(frame) |
| 162 {var payload=frame;var date=new Date(payload.time*1000);var row={data:"",length:
typeof payload.payloadData==="undefined"?payload.errorMessage.length.toString():
payload.payloadData.length.toString(),time:date.toLocaleTimeString()};var rowCla
ss="";if(payload.errorMessage){rowClass="error";row.data=payload.errorMessage;}e
lse if(payload.opcode==WebInspector.ResourceWebSocketFrameView.OpCodes.TextFrame
){if(payload.sent) | 162 {var payload=frame;var date=new Date(payload.time*1000);var row={data:"",length:
typeof payload.payloadData==="undefined"?payload.errorMessage.length.toString():
payload.payloadData.length.toString(),time:date.toLocaleTimeString()};var rowCla
ss="";if(payload.errorMessage){rowClass="error";row.data=payload.errorMessage;}e
lse if(payload.opcode==WebInspector.ResourceWebSocketFrameView.OpCodes.TextFrame
){if(payload.sent) |
| 163 rowClass="outcoming";row.data=payload.payloadData;}else{rowClass="opcode";var op
codeMeaning="";switch(payload.opcode){case WebInspector.ResourceWebSocketFrameVi
ew.OpCodes.ContinuationFrame:opcodeMeaning=WebInspector.UIString("Continuation F
rame");break;case WebInspector.ResourceWebSocketFrameView.OpCodes.BinaryFrame:op
codeMeaning=WebInspector.UIString("Binary Frame");break;case WebInspector.Resour
ceWebSocketFrameView.OpCodes.ConnectionCloseFrame:opcodeMeaning=WebInspector.UIS
tring("Connection Close Frame");break;case WebInspector.ResourceWebSocketFrameVi
ew.OpCodes.PingFrame:opcodeMeaning=WebInspector.UIString("Ping Frame");break;cas
e WebInspector.ResourceWebSocketFrameView.OpCodes.PongFrame:opcodeMeaning=WebIns
pector.UIString("Pong Frame");break;} | 163 rowClass="outcoming";row.data=payload.payloadData;}else{rowClass="opcode";var op
codeMeaning="";switch(payload.opcode){case WebInspector.ResourceWebSocketFrameVi
ew.OpCodes.ContinuationFrame:opcodeMeaning=WebInspector.UIString("Continuation F
rame");break;case WebInspector.ResourceWebSocketFrameView.OpCodes.BinaryFrame:op
codeMeaning=WebInspector.UIString("Binary Frame");break;case WebInspector.Resour
ceWebSocketFrameView.OpCodes.ConnectionCloseFrame:opcodeMeaning=WebInspector.UIS
tring("Connection Close Frame");break;case WebInspector.ResourceWebSocketFrameVi
ew.OpCodes.PingFrame:opcodeMeaning=WebInspector.UIString("Ping Frame");break;cas
e WebInspector.ResourceWebSocketFrameView.OpCodes.PongFrame:opcodeMeaning=WebIns
pector.UIString("Pong Frame");break;} |
| 164 row.data=WebInspector.UIString("%s (Opcode %d%s)",opcodeMeaning,payload.opcode,(
payload.mask?", mask":""));} | 164 row.data=WebInspector.UIString("%s (Opcode %d%s)",opcodeMeaning,payload.opcode,(
payload.mask?", mask":""));} |
| 165 var node=new WebInspector.DataGridNode(row,false);this._dataGrid.rootNode().appe
ndChild(node);if(rowClass) | 165 var node=new WebInspector.DataGridNode(row,false);this._dataGrid.rootNode().appe
ndChild(node);if(rowClass) |
| 166 node.element.classList.add("resource-websocket-row-"+rowClass);},refresh:functio
n() | 166 node.element.classList.add("resource-websocket-row-"+rowClass);},refresh:functio
n() |
| 167 {this._dataGrid.rootNode().removeChildren();var frames=this.resource.frames();fo
r(var i=frames.length-1;i>=0;i--){this.appendFrame(frames[i]);}},show:function(p
arentElement,insertBefore) | 167 {this._dataGrid.rootNode().removeChildren();var frames=this.resource.frames();fo
r(var i=frames.length-1;i>=0;i--){this.appendFrame(frames[i]);}},show:function(p
arentElement,insertBefore) |
| 168 {this.refresh();WebInspector.View.prototype.show.call(this,parentElement,insertB
efore);},__proto__:WebInspector.View.prototype};WebInspector.NetworkLogView=func
tion(coulmnsVisibilitySetting) | 168 {this.refresh();WebInspector.View.prototype.show.call(this,parentElement,insertB
efore);},_onContextMenu:function(contextMenu,node) |
| 169 {contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitle
s()?"Copy message":"Copy Message"),this._copyMessage.bind(this,node.data));},_co
pyMessage:function(row) |
| 170 {InspectorFrontendHost.copyText(row.data);},__proto__:WebInspector.View.prototyp
e};WebInspector.NetworkLogView=function(coulmnsVisibilitySetting) |
| 169 {WebInspector.View.call(this);this.registerRequiredCSS("networkLogView.css");thi
s._coulmnsVisibilitySetting=coulmnsVisibilitySetting;this._allowRequestSelection
=false;this._requests=[];this._requestsById={};this._requestsByURL={};this._stal
eRequests={};this._requestGridNodes={};this._lastRequestGridNodeId=0;this._mainR
equestLoadTime=-1;this._mainRequestDOMContentLoadedTime=-1;this._typeFilterEleme
nts={};this._typeFilter=WebInspector.NetworkLogView._trivialTypeFilter;this._mat
chedRequests=[];this._highlightedSubstringChanges=[];this._filteredOutRequests=n
ew Map();this._matchedRequestsMap={};this._currentMatchedRequestIndex=-1;this._c
reateStatusbarButtons();this._createStatusBarItems();this._linkifier=new WebInsp
ector.Linkifier();WebInspector.networkManager.addEventListener(WebInspector.Netw
orkManager.EventTypes.RequestStarted,this._onRequestStarted,this);WebInspector.n
etworkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestUpd
ated,this._onRequestUpdated,this);WebInspector.networkManager.addEventListener(W
ebInspector.NetworkManager.EventTypes.RequestFinished,this._onRequestUpdated,thi
s);WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMode
l.EventTypes.MainFrameNavigated,this._mainFrameNavigated,this);WebInspector.reso
urceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.Load,th
is._loadEventFired,this);WebInspector.resourceTreeModel.addEventListener(WebInsp
ector.ResourceTreeModel.EventTypes.DOMContentLoaded,this._domContentLoadedEventF
ired,this);this._initializeView();WebInspector.networkLog.requests.forEach(this.
_appendRequest.bind(this));} | 171 {WebInspector.View.call(this);this.registerRequiredCSS("networkLogView.css");thi
s._coulmnsVisibilitySetting=coulmnsVisibilitySetting;this._allowRequestSelection
=false;this._requests=[];this._requestsById={};this._requestsByURL={};this._stal
eRequests={};this._requestGridNodes={};this._lastRequestGridNodeId=0;this._mainR
equestLoadTime=-1;this._mainRequestDOMContentLoadedTime=-1;this._typeFilterEleme
nts={};this._typeFilter=WebInspector.NetworkLogView._trivialTypeFilter;this._mat
chedRequests=[];this._highlightedSubstringChanges=[];this._filteredOutRequests=n
ew Map();this._matchedRequestsMap={};this._currentMatchedRequestIndex=-1;this._c
reateStatusbarButtons();this._createStatusBarItems();this._linkifier=new WebInsp
ector.Linkifier();WebInspector.networkManager.addEventListener(WebInspector.Netw
orkManager.EventTypes.RequestStarted,this._onRequestStarted,this);WebInspector.n
etworkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestUpd
ated,this._onRequestUpdated,this);WebInspector.networkManager.addEventListener(W
ebInspector.NetworkManager.EventTypes.RequestFinished,this._onRequestUpdated,thi
s);WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMode
l.EventTypes.MainFrameNavigated,this._mainFrameNavigated,this);WebInspector.reso
urceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.Load,th
is._loadEventFired,this);WebInspector.resourceTreeModel.addEventListener(WebInsp
ector.ResourceTreeModel.EventTypes.DOMContentLoaded,this._domContentLoadedEventF
ired,this);this._initializeView();WebInspector.networkLog.requests.forEach(this.
_appendRequest.bind(this));} |
| 170 WebInspector.NetworkLogView.HTTPSchemas={"http":true,"https":true,"ws":true,"wss
":true};WebInspector.NetworkLogView._responseHeaderColumns=["Cache-Control","Con
nection","Content-Encoding","Content-Length","ETag","Keep-Alive","Last-Modified"
,"Server","Vary"];WebInspector.NetworkLogView._defaultColumnsVisibility={method:
true,status:true,domain:false,type:true,initiator:true,cookies:false,setCookies:
false,size:true,time:true,"Cache-Control":false,"Connection":false,"Content-Enco
ding":false,"Content-Length":false,"ETag":false,"Keep-Alive":false,"Last-Modifie
d":false,"Server":false,"Vary":false};WebInspector.NetworkLogView._defaultRefres
hDelay=500;WebInspector.NetworkLogView.ALL_TYPES="all";WebInspector.NetworkLogVi
ew.prototype={_initializeView:function() | 172 WebInspector.NetworkLogView.HTTPSchemas={"http":true,"https":true,"ws":true,"wss
":true};WebInspector.NetworkLogView._responseHeaderColumns=["Cache-Control","Con
nection","Content-Encoding","Content-Length","ETag","Keep-Alive","Last-Modified"
,"Server","Vary"];WebInspector.NetworkLogView._defaultColumnsVisibility={method:
true,status:true,scheme:false,domain:false,type:true,initiator:true,cookies:fals
e,setCookies:false,size:true,time:true,"Cache-Control":false,"Connection":false,
"Content-Encoding":false,"Content-Length":false,"ETag":false,"Keep-Alive":false,
"Last-Modified":false,"Server":false,"Vary":false};WebInspector.NetworkLogView._
defaultRefreshDelay=500;WebInspector.NetworkLogView.ALL_TYPES="all";WebInspector
.NetworkLogView.prototype={_initializeView:function() |
| 171 {this.element.id="network-container";this._createSortingFunctions();this._create
Table();this._createTimelineGrid();this._createSummaryBar();if(!this.useLargeRow
s) | 173 {this.element.id="network-container";this._createSortingFunctions();this._create
Table();this._createTimelineGrid();this._createSummaryBar();if(!this.useLargeRow
s) |
| 172 this._setLargerRequests(this.useLargeRows);this._allowPopover=true;this._popover
Helper=new WebInspector.PopoverHelper(this.element,this._getPopoverAnchor.bind(t
his),this._showPopover.bind(this),this._onHidePopover.bind(this));this._popoverH
elper.setTimeout(100);this.calculator=new WebInspector.NetworkTransferTimeCalcul
ator();this._toggleTypeFilter(WebInspector.NetworkLogView.ALL_TYPES,false);this.
switchToDetailedView();},get statusBarItems() | 174 this._setLargerRequests(this.useLargeRows);this._allowPopover=true;this._popover
Helper=new WebInspector.PopoverHelper(this.element,this._getPopoverAnchor.bind(t
his),this._showPopover.bind(this),this._onHidePopover.bind(this));this._popoverH
elper.setTimeout(100);this.calculator=new WebInspector.NetworkTransferTimeCalcul
ator();this._toggleTypeFilter(WebInspector.NetworkLogView.ALL_TYPES,false);this.
switchToDetailedView();},get statusBarItems() |
| 173 {return[this._largerRequestsButton.element,this._preserveLogToggle.element,this.
_clearButton.element,this._filterBarElement,this._progressBarContainer];},get us
eLargeRows() | 175 {return[this._largerRequestsButton.element,this._preserveLogToggle.element,this.
_clearButton.element,this._filterBarElement,this._progressBarContainer];},get us
eLargeRows() |
| 174 {return WebInspector.settings.resourcesLargeRows.get();},set allowPopover(flag) | 176 {return WebInspector.settings.resourcesLargeRows.get();},set allowPopover(flag) |
| 175 {this._allowPopover=flag;},elementsToRestoreScrollPositionsFor:function() | 177 {this._allowPopover=flag;},elementsToRestoreScrollPositionsFor:function() |
| 176 {if(!this._dataGrid) | 178 {if(!this._dataGrid) |
| 177 return[];return[this._dataGrid.scrollContainer];},onResize:function() | 179 return[];return[this._dataGrid.scrollContainer];},onResize:function() |
| 178 {this._updateOffscreenRows();},_createTimelineGrid:function() | 180 {this._updateOffscreenRows();},_createTimelineGrid:function() |
| 179 {this._timelineGrid=new WebInspector.TimelineGrid();this._timelineGrid.element.a
ddStyleClass("network-timeline-grid");this._dataGrid.element.appendChild(this._t
imelineGrid.element);},_createTable:function() | 181 {this._timelineGrid=new WebInspector.TimelineGrid();this._timelineGrid.element.a
ddStyleClass("network-timeline-grid");this._dataGrid.element.appendChild(this._t
imelineGrid.element);},_createTable:function() |
| 180 {var columns=[];columns.push({id:"name",titleDOMFragment:this._makeHeaderFragmen
t(WebInspector.UIString("Name"),WebInspector.UIString("Path")),title:WebInspecto
r.UIString("Name"),sortable:true,weight:20,disclosure:true});columns.push({id:"m
ethod",title:WebInspector.UIString("Method"),sortable:true,weight:6});columns.pu
sh({id:"status",titleDOMFragment:this._makeHeaderFragment(WebInspector.UIString(
"Status"),WebInspector.UIString("Text")),title:WebInspector.UIString("Status"),s
ortable:true,weight:6});columns.push({id:"domain",title:WebInspector.UIString("D
omain"),sortable:true,weight:6});columns.push({id:"type",title:WebInspector.UISt
ring("Type"),sortable:true,weight:6});columns.push({id:"initiator",title:WebInsp
ector.UIString("Initiator"),sortable:true,weight:10});columns.push({id:"cookies"
,title:WebInspector.UIString("Cookies"),sortable:true,weight:6,align:WebInspecto
r.DataGrid.Align.Right});columns.push({id:"setCookies",title:WebInspector.UIStri
ng("Set-Cookies"),sortable:true,weight:6,align:WebInspector.DataGrid.Align.Right
});columns.push({id:"size",titleDOMFragment:this._makeHeaderFragment(WebInspecto
r.UIString("Size"),WebInspector.UIString("Content")),title:WebInspector.UIString
("Size"),sortable:true,weight:6,align:WebInspector.DataGrid.Align.Right});column
s.push({id:"time",titleDOMFragment:this._makeHeaderFragment(WebInspector.UIStrin
g("Time"),WebInspector.UIString("Latency")),title:WebInspector.UIString("Time"),
sortable:true,weight:6,align:WebInspector.DataGrid.Align.Right});var responseHea
derColumns=WebInspector.NetworkLogView._responseHeaderColumns;for(var i=0;i<resp
onseHeaderColumns.length;++i){var headerName=responseHeaderColumns[i];var descri
ptor={id:headerName,title:WebInspector.UIString(headerName),weight:6} | 182 {var columns=[];columns.push({id:"name",titleDOMFragment:this._makeHeaderFragmen
t(WebInspector.UIString("Name"),WebInspector.UIString("Path")),title:WebInspecto
r.UIString("Name"),sortable:true,weight:20,disclosure:true});columns.push({id:"m
ethod",title:WebInspector.UIString("Method"),sortable:true,weight:6});columns.pu
sh({id:"status",titleDOMFragment:this._makeHeaderFragment(WebInspector.UIString(
"Status"),WebInspector.UIString("Text")),title:WebInspector.UIString("Status"),s
ortable:true,weight:6});columns.push({id:"scheme",title:WebInspector.UIString("S
cheme"),sortable:true,weight:6});columns.push({id:"domain",title:WebInspector.UI
String("Domain"),sortable:true,weight:6});columns.push({id:"type",title:WebInspe
ctor.UIString("Type"),sortable:true,weight:6});columns.push({id:"initiator",titl
e:WebInspector.UIString("Initiator"),sortable:true,weight:10});columns.push({id:
"cookies",title:WebInspector.UIString("Cookies"),sortable:true,weight:6,align:We
bInspector.DataGrid.Align.Right});columns.push({id:"setCookies",title:WebInspect
or.UIString("Set-Cookies"),sortable:true,weight:6,align:WebInspector.DataGrid.Al
ign.Right});columns.push({id:"size",titleDOMFragment:this._makeHeaderFragment(We
bInspector.UIString("Size"),WebInspector.UIString("Content")),title:WebInspector
.UIString("Size"),sortable:true,weight:6,align:WebInspector.DataGrid.Align.Right
});columns.push({id:"time",titleDOMFragment:this._makeHeaderFragment(WebInspecto
r.UIString("Time"),WebInspector.UIString("Latency")),title:WebInspector.UIString
("Time"),sortable:true,weight:6,align:WebInspector.DataGrid.Align.Right});var re
sponseHeaderColumns=WebInspector.NetworkLogView._responseHeaderColumns;for(var i
=0;i<responseHeaderColumns.length;++i){var headerName=responseHeaderColumns[i];v
ar descriptor={id:headerName,title:WebInspector.UIString(headerName),weight:6} |
| 181 if(headerName==="Content-Length") | 183 if(headerName==="Content-Length") |
| 182 descriptor.align=WebInspector.DataGrid.Align.Right;columns.push(descriptor);} | 184 descriptor.align=WebInspector.DataGrid.Align.Right;columns.push(descriptor);} |
| 183 columns.push({id:"timeline",titleDOMFragment:document.createDocumentFragment(),t
itle:WebInspector.UIString("Timeline"),sortable:false,weight:40,sort:WebInspecto
r.DataGrid.Order.Ascending});this._dataGrid=new WebInspector.DataGrid(columns);t
his._dataGrid.setName("networkLog");this._dataGrid.resizeMethod=WebInspector.Dat
aGrid.ResizeMethod.Last;this._dataGrid.element.addStyleClass("network-log-grid")
;this._dataGrid.element.addEventListener("contextmenu",this._contextMenu.bind(th
is),true);this._dataGrid.show(this.element);this._dataGrid.addEventListener(WebI
nspector.DataGrid.Events.SortingChanged,this._sortItems,this);this._dataGrid.add
EventListener(WebInspector.DataGrid.Events.ColumnsResized,this._updateDividersIf
Needed,this);this._dataGrid.scrollContainer.addEventListener("scroll",this._upda
teOffscreenRows.bind(this));this._patchTimelineHeader();},_makeHeaderFragment:fu
nction(title,subtitle) | 185 columns.push({id:"timeline",titleDOMFragment:document.createDocumentFragment(),t
itle:WebInspector.UIString("Timeline"),sortable:false,weight:40,sort:WebInspecto
r.DataGrid.Order.Ascending});this._dataGrid=new WebInspector.DataGrid(columns);t
his._dataGrid.setName("networkLog");this._dataGrid.resizeMethod=WebInspector.Dat
aGrid.ResizeMethod.Last;this._dataGrid.element.addStyleClass("network-log-grid")
;this._dataGrid.element.addEventListener("contextmenu",this._contextMenu.bind(th
is),true);this._dataGrid.show(this.element);this._dataGrid.addEventListener(WebI
nspector.DataGrid.Events.SortingChanged,this._sortItems,this);this._dataGrid.add
EventListener(WebInspector.DataGrid.Events.ColumnsResized,this._updateDividersIf
Needed,this);this._dataGrid.scrollContainer.addEventListener("scroll",this._upda
teOffscreenRows.bind(this));this._patchTimelineHeader();},_makeHeaderFragment:fu
nction(title,subtitle) |
| 184 {var fragment=document.createDocumentFragment();fragment.createTextChild(title);
var subtitleDiv=fragment.createChild("div","network-header-subtitle");subtitleDi
v.createTextChild(subtitle);return fragment;},_patchTimelineHeader:function() | 186 {var fragment=document.createDocumentFragment();fragment.createTextChild(title);
var subtitleDiv=fragment.createChild("div","network-header-subtitle");subtitleDi
v.createTextChild(subtitle);return fragment;},_patchTimelineHeader:function() |
| 185 {var timelineSorting=document.createElement("select");var option=document.create
Element("option");option.value="startTime";option.label=WebInspector.UIString("T
imeline");timelineSorting.appendChild(option);option=document.createElement("opt
ion");option.value="startTime";option.label=WebInspector.UIString("Start Time");
timelineSorting.appendChild(option);option=document.createElement("option");opti
on.value="responseTime";option.label=WebInspector.UIString("Response Time");time
lineSorting.appendChild(option);option=document.createElement("option");option.v
alue="endTime";option.label=WebInspector.UIString("End Time");timelineSorting.ap
pendChild(option);option=document.createElement("option");option.value="duration
";option.label=WebInspector.UIString("Duration");timelineSorting.appendChild(opt
ion);option=document.createElement("option");option.value="latency";option.label
=WebInspector.UIString("Latency");timelineSorting.appendChild(option);var header
=this._dataGrid.headerTableHeader("timeline");header.replaceChild(timelineSortin
g,header.firstChild);timelineSorting.addEventListener("click",function(event){ev
ent.consume()},false);timelineSorting.addEventListener("change",this._sortByTime
line.bind(this),false);this._timelineSortSelector=timelineSorting;},_createSorti
ngFunctions:function() | 187 {var timelineSorting=document.createElement("select");var option=document.create
Element("option");option.value="startTime";option.label=WebInspector.UIString("T
imeline");timelineSorting.appendChild(option);option=document.createElement("opt
ion");option.value="startTime";option.label=WebInspector.UIString("Start Time");
timelineSorting.appendChild(option);option=document.createElement("option");opti
on.value="responseTime";option.label=WebInspector.UIString("Response Time");time
lineSorting.appendChild(option);option=document.createElement("option");option.v
alue="endTime";option.label=WebInspector.UIString("End Time");timelineSorting.ap
pendChild(option);option=document.createElement("option");option.value="duration
";option.label=WebInspector.UIString("Duration");timelineSorting.appendChild(opt
ion);option=document.createElement("option");option.value="latency";option.label
=WebInspector.UIString("Latency");timelineSorting.appendChild(option);var header
=this._dataGrid.headerTableHeader("timeline");header.replaceChild(timelineSortin
g,header.firstChild);timelineSorting.addEventListener("click",function(event){ev
ent.consume()},false);timelineSorting.addEventListener("change",this._sortByTime
line.bind(this),false);this._timelineSortSelector=timelineSorting;},_createSorti
ngFunctions:function() |
| 186 {this._sortingFunctions={};this._sortingFunctions.name=WebInspector.NetworkDataG
ridNode.NameComparator;this._sortingFunctions.method=WebInspector.NetworkDataGri
dNode.RequestPropertyComparator.bind(null,"method",false);this._sortingFunctions
.status=WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null,"st
atusCode",false);this._sortingFunctions.domain=WebInspector.NetworkDataGridNode.
RequestPropertyComparator.bind(null,"domain",false);this._sortingFunctions.type=
WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null,"mimeType",
false);this._sortingFunctions.initiator=WebInspector.NetworkDataGridNode.Initiat
orComparator;this._sortingFunctions.cookies=WebInspector.NetworkDataGridNode.Req
uestCookiesCountComparator;this._sortingFunctions.setCookies=WebInspector.Networ
kDataGridNode.ResponseCookiesCountComparator;this._sortingFunctions.size=WebInsp
ector.NetworkDataGridNode.SizeComparator;this._sortingFunctions.time=WebInspecto
r.NetworkDataGridNode.RequestPropertyComparator.bind(null,"duration",false);this
._sortingFunctions.timeline=WebInspector.NetworkDataGridNode.RequestPropertyComp
arator.bind(null,"startTime",false);this._sortingFunctions.startTime=WebInspecto
r.NetworkDataGridNode.RequestPropertyComparator.bind(null,"startTime",false);thi
s._sortingFunctions.endTime=WebInspector.NetworkDataGridNode.RequestPropertyComp
arator.bind(null,"endTime",false);this._sortingFunctions.responseTime=WebInspect
or.NetworkDataGridNode.RequestPropertyComparator.bind(null,"responseReceivedTime
",false);this._sortingFunctions.duration=WebInspector.NetworkDataGridNode.Reques
tPropertyComparator.bind(null,"duration",true);this._sortingFunctions.latency=We
bInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null,"latency",tru
e);var timeCalculator=new WebInspector.NetworkTransferTimeCalculator();var durat
ionCalculator=new WebInspector.NetworkTransferDurationCalculator();this._calcula
tors={};this._calculators.timeline=timeCalculator;this._calculators.startTime=ti
meCalculator;this._calculators.endTime=timeCalculator;this._calculators.response
Time=timeCalculator;this._calculators.duration=durationCalculator;this._calculat
ors.latency=durationCalculator;},_sortItems:function() | 188 {this._sortingFunctions={};this._sortingFunctions.name=WebInspector.NetworkDataG
ridNode.NameComparator;this._sortingFunctions.method=WebInspector.NetworkDataGri
dNode.RequestPropertyComparator.bind(null,"method",false);this._sortingFunctions
.status=WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null,"st
atusCode",false);this._sortingFunctions.scheme=WebInspector.NetworkDataGridNode.
RequestPropertyComparator.bind(null,"scheme",false);this._sortingFunctions.domai
n=WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null,"domain",
false);this._sortingFunctions.type=WebInspector.NetworkDataGridNode.RequestPrope
rtyComparator.bind(null,"mimeType",false);this._sortingFunctions.initiator=WebIn
spector.NetworkDataGridNode.InitiatorComparator;this._sortingFunctions.cookies=W
ebInspector.NetworkDataGridNode.RequestCookiesCountComparator;this._sortingFunct
ions.setCookies=WebInspector.NetworkDataGridNode.ResponseCookiesCountComparator;
this._sortingFunctions.size=WebInspector.NetworkDataGridNode.SizeComparator;this
._sortingFunctions.time=WebInspector.NetworkDataGridNode.RequestPropertyComparat
or.bind(null,"duration",false);this._sortingFunctions.timeline=WebInspector.Netw
orkDataGridNode.RequestPropertyComparator.bind(null,"startTime",false);this._sor
tingFunctions.startTime=WebInspector.NetworkDataGridNode.RequestPropertyComparat
or.bind(null,"startTime",false);this._sortingFunctions.endTime=WebInspector.Netw
orkDataGridNode.RequestPropertyComparator.bind(null,"endTime",false);this._sorti
ngFunctions.responseTime=WebInspector.NetworkDataGridNode.RequestPropertyCompara
tor.bind(null,"responseReceivedTime",false);this._sortingFunctions.duration=WebI
nspector.NetworkDataGridNode.RequestPropertyComparator.bind(null,"duration",true
);this._sortingFunctions.latency=WebInspector.NetworkDataGridNode.RequestPropert
yComparator.bind(null,"latency",true);var timeCalculator=new WebInspector.Networ
kTransferTimeCalculator();var durationCalculator=new WebInspector.NetworkTransfe
rDurationCalculator();this._calculators={};this._calculators.timeline=timeCalcul
ator;this._calculators.startTime=timeCalculator;this._calculators.endTime=timeCa
lculator;this._calculators.responseTime=timeCalculator;this._calculators.duratio
n=durationCalculator;this._calculators.latency=durationCalculator;},_sortItems:f
unction() |
| 187 {this._removeAllNodeHighlights();var columnIdentifier=this._dataGrid.sortColumnI
dentifier();if(columnIdentifier==="timeline"){this._sortByTimeline();return;} | 189 {this._removeAllNodeHighlights();var columnIdentifier=this._dataGrid.sortColumnI
dentifier();if(columnIdentifier==="timeline"){this._sortByTimeline();return;} |
| 188 var sortingFunction=this._sortingFunctions[columnIdentifier];if(!sortingFunction
) | 190 var sortingFunction=this._sortingFunctions[columnIdentifier];if(!sortingFunction
) |
| 189 return;this._dataGrid.sortNodes(sortingFunction,!this._dataGrid.isSortOrderAscen
ding());this._timelineSortSelector.selectedIndex=0;this._updateOffscreenRows();t
his.searchCanceled();WebInspector.notifications.dispatchEventToListeners(WebInsp
ector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.Ne
tworkSort,column:columnIdentifier,sortOrder:this._dataGrid.sortOrder()});},_sort
ByTimeline:function() | 191 return;this._dataGrid.sortNodes(sortingFunction,!this._dataGrid.isSortOrderAscen
ding());this._timelineSortSelector.selectedIndex=0;this._updateOffscreenRows();t
his.searchCanceled();WebInspector.notifications.dispatchEventToListeners(WebInsp
ector.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.Ne
tworkSort,column:columnIdentifier,sortOrder:this._dataGrid.sortOrder()});},_sort
ByTimeline:function() |
| 190 {this._removeAllNodeHighlights();var selectedIndex=this._timelineSortSelector.se
lectedIndex;if(!selectedIndex) | 192 {this._removeAllNodeHighlights();var selectedIndex=this._timelineSortSelector.se
lectedIndex;if(!selectedIndex) |
| 191 selectedIndex=1;var selectedOption=this._timelineSortSelector[selectedIndex];var
value=selectedOption.value;var sortingFunction=this._sortingFunctions[value];th
is._dataGrid.sortNodes(sortingFunction);this.calculator=this._calculators[value]
;if(this.calculator.startAtZero) | 193 selectedIndex=1;var selectedOption=this._timelineSortSelector[selectedIndex];var
value=selectedOption.value;var sortingFunction=this._sortingFunctions[value];th
is._dataGrid.sortNodes(sortingFunction);this.calculator=this._calculators[value]
;if(this.calculator.startAtZero) |
| 192 this._timelineGrid.hideEventDividers();else | 194 this._timelineGrid.hideEventDividers();else |
| 193 this._timelineGrid.showEventDividers();this._dataGrid.markColumnAsSortedBy("time
line",WebInspector.DataGrid.Order.Ascending);this._updateOffscreenRows();},_addT
ypeFilter:function(typeName,label) | 195 this._timelineGrid.showEventDividers();this._dataGrid.markColumnAsSortedBy("time
line",WebInspector.DataGrid.Order.Ascending);this._updateOffscreenRows();},_addT
ypeFilter:function(typeName,label) |
| 194 {var typeFilterElement=this._filterBarElement.createChild("li",typeName);typeFil
terElement.typeName=typeName;typeFilterElement.createTextChild(label);typeFilter
Element.addEventListener("click",this._onTypeFilterClicked.bind(this),false);thi
s._typeFilterElements[typeName]=typeFilterElement;},_createStatusBarItems:functi
on() | 196 {var typeFilterElement=this._filterBarElement.createChild("li",typeName);typeFil
terElement.typeName=typeName;typeFilterElement.createTextChild(label);typeFilter
Element.addEventListener("click",this._onTypeFilterClicked.bind(this),false);thi
s._typeFilterElements[typeName]=typeFilterElement;},_createStatusBarItems:functi
on() |
| 195 {var filterBarElement=document.createElement("div");filterBarElement.className="
scope-bar status-bar-item";filterBarElement.title=WebInspector.UIString("Use %s
Click to select multiple types.",WebInspector.KeyboardShortcut.shortcutToString(
"",WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta));this._filterBarElement=f
ilterBarElement;this._addTypeFilter(WebInspector.NetworkLogView.ALL_TYPES,WebIns
pector.UIString("All"));filterBarElement.createChild("div","scope-bar-divider");
for(var typeId in WebInspector.resourceTypes){var type=WebInspector.resourceType
s[typeId];this._addTypeFilter(type.name(),type.categoryTitle());} | 197 {var filterBarElement=document.createElement("div");filterBarElement.className="
scope-bar status-bar-item";filterBarElement.title=WebInspector.UIString("Use %s
Click to select multiple types.",WebInspector.KeyboardShortcut.shortcutToString(
"",WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta));this._filterBarElement=f
ilterBarElement;this._addTypeFilter(WebInspector.NetworkLogView.ALL_TYPES,WebIns
pector.UIString("All"));filterBarElement.createChild("div","scope-bar-divider");
for(var typeId in WebInspector.resourceTypes){var type=WebInspector.resourceType
s[typeId];this._addTypeFilter(type.name(),type.categoryTitle());} |
| 196 this._progressBarContainer=document.createElement("div");this._progressBarContai
ner.className="status-bar-item";},_createSummaryBar:function() | 198 this._progressBarContainer=document.createElement("div");this._progressBarContai
ner.className="status-bar-item";},_createSummaryBar:function() |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 {this._removeAllHighlights();this._filteredOutRequests.clear();var nodes=this._d
ataGrid.rootNode().children;for(var i=0;i<nodes.length;++i) | 352 {this._removeAllHighlights();this._filteredOutRequests.clear();var nodes=this._d
ataGrid.rootNode().children;for(var i=0;i<nodes.length;++i) |
| 351 this._applyFilter(nodes[i]);this._updateSummaryBar();this._updateOffscreenRows()
;},jumpToPreviousSearchResult:function() | 353 this._applyFilter(nodes[i]);this._updateSummaryBar();this._updateOffscreenRows()
;},jumpToPreviousSearchResult:function() |
| 352 {if(!this._matchedRequests.length) | 354 {if(!this._matchedRequests.length) |
| 353 return;this._highlightNthMatchedRequestForSearch((this._currentMatchedRequestInd
ex+this._matchedRequests.length-1)%this._matchedRequests.length,true);},jumpToNe
xtSearchResult:function() | 355 return;this._highlightNthMatchedRequestForSearch((this._currentMatchedRequestInd
ex+this._matchedRequests.length-1)%this._matchedRequests.length,true);},jumpToNe
xtSearchResult:function() |
| 354 {if(!this._matchedRequests.length) | 356 {if(!this._matchedRequests.length) |
| 355 return;this._highlightNthMatchedRequestForSearch((this._currentMatchedRequestInd
ex+1)%this._matchedRequests.length,true);},searchCanceled:function() | 357 return;this._highlightNthMatchedRequestForSearch((this._currentMatchedRequestInd
ex+1)%this._matchedRequests.length,true);},searchCanceled:function() |
| 356 {this._clearSearchMatchedList();this.dispatchEventToListeners(WebInspector.Netwo
rkLogView.EventTypes.SearchCountUpdated,0);},revealAndHighlightRequest:function(
request) | 358 {this._clearSearchMatchedList();this.dispatchEventToListeners(WebInspector.Netwo
rkLogView.EventTypes.SearchCountUpdated,0);},revealAndHighlightRequest:function(
request) |
| 357 {this._removeAllNodeHighlights();var node=this._requestGridNode(request);if(node
){this._dataGrid.element.focus();node.reveal();this._highlightNode(node);}},_rem
oveAllNodeHighlights:function() | 359 {this._removeAllNodeHighlights();var node=this._requestGridNode(request);if(node
){this._dataGrid.element.focus();node.reveal();this._highlightNode(node);}},_rem
oveAllNodeHighlights:function() |
| 358 {if(this._highlightedNode){this._highlightedNode.element.removeStyleClass("highl
ighted-row");delete this._highlightedNode;}},_highlightNode:function(node) | 360 {if(this._highlightedNode){this._highlightedNode.element.removeStyleClass("highl
ighted-row");delete this._highlightedNode;}},_highlightNode:function(node) |
| 359 {node.element.addStyleClass("highlighted-row");this._highlightedNode=node;},_gen
erateCurlCommand:function(request) | 361 {node.element.addStyleClass("highlighted-row");this._highlightedNode=node;},_gen
erateCurlCommand:function(request) |
| 360 {var command=["curl"];var ignoredHeaders={};function escapeCharacter(x) | 362 {var command=["curl"];var ignoredHeaders={};function escapeStringWin(str) |
| 363 {return"\""+str.replace(/"/g,"\"\"").replace(/%/g,"\"%\"").replace(/\\/g,"\\\\")
.replace(/[\r\n]+/g,"\"^$&\"")+"\"";} |
| 364 function escapeStringPosix(str) |
| 365 {function escapeCharacter(x) |
| 361 {var code=x.charCodeAt(0);if(code<256){return code<16?"\\x0"+code.toString(16):"
\\x"+code.toString(16);} | 366 {var code=x.charCodeAt(0);if(code<256){return code<16?"\\x0"+code.toString(16):"
\\x"+code.toString(16);} |
| 362 code=code.toString(16);return"\\u"+("0000"+code).substr(code.length,4);} | 367 code=code.toString(16);return"\\u"+("0000"+code).substr(code.length,4);} |
| 363 function escape(str) | 368 if(/[^\x20-\x7E]|\'/.test(str)){return"$\'"+str.replace(/\\/g,"\\\\").replace(/\
'/g,"\\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[^\x20-\x7E]/g,es
capeCharacter)+"'";}else{return"'"+str+"'";}} |
| 364 {if(/[^\x20-\x7E]|\'/.test(str)){return"$\'"+str.replace(/\\/g,"\\\\").replace(/
\'/g,"\\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[^\x20-\x7E]/g,e
scapeCharacter)+"'";}else{return"'"+str+"'";}} | 369 var escapeString=WebInspector.isWin()?escapeStringWin:escapeStringPosix;command.
push(escapeString(request.url).replace(/[[{}\]]/g,"\\$&"));var inferredMethod="G
ET";var data=[];var requestContentType=request.requestContentType();if(requestCo
ntentType&&requestContentType.startsWith("application/x-www-form-urlencoded")&&r
equest.requestFormData){data.push("--data");data.push(escapeString(request.reque
stFormData));ignoredHeaders["Content-Length"]=true;inferredMethod="POST";}else i
f(request.requestFormData){data.push("--data-binary");data.push(escapeString(req
uest.requestFormData));ignoredHeaders["Content-Length"]=true;inferredMethod="POS
T";} |
| 365 command.push(escape(request.url));var inferredMethod="GET";var data=[];var reque
stContentType=request.requestContentType();if(requestContentType&&requestContent
Type.startsWith("application/x-www-form-urlencoded")&&request.requestFormData){d
ata.push("--data");data.push(escape(request.requestFormData));ignoredHeaders["Co
ntent-Length"]=true;inferredMethod="POST";}else if(request.requestFormData){data
.push("--data-binary");data.push(escape(request.requestFormData));ignoredHeaders
["Content-Length"]=true;inferredMethod="POST";} | |
| 366 if(request.requestMethod!==inferredMethod){command.push("-X");command.push(reque
st.requestMethod);} | 370 if(request.requestMethod!==inferredMethod){command.push("-X");command.push(reque
st.requestMethod);} |
| 367 for(var i=0;i<request.requestHeaders.length;i++){var header=request.requestHeade
rs[i];if(header.name in ignoredHeaders) | 371 for(var i=0;i<request.requestHeaders.length;i++){var header=request.requestHeade
rs[i];if(header.name in ignoredHeaders) |
| 368 continue;command.push("-H");command.push(escape(header.name+": "+header.value));
} | 372 continue;command.push("-H");command.push(escapeString(header.name+": "+header.va
lue));} |
| 369 command=command.concat(data);command.push("--compressed");return command.join("
");},__proto__:WebInspector.View.prototype} | 373 command=command.concat(data);command.push("--compressed");return command.join("
");},__proto__:WebInspector.View.prototype} |
| 370 WebInspector.NetworkLogView.HTTPRequestsFilter=function(request) | 374 WebInspector.NetworkLogView.HTTPRequestsFilter=function(request) |
| 371 {return request.parsedURL.isValid&&(request.parsedURL.scheme in WebInspector.Net
workLogView.HTTPSchemas);} | 375 {return request.parsedURL.isValid&&(request.scheme in WebInspector.NetworkLogVie
w.HTTPSchemas);} |
| 372 WebInspector.NetworkLogView.EventTypes={ViewCleared:"ViewCleared",RowSizeChanged
:"RowSizeChanged",RequestSelected:"RequestSelected",SearchCountUpdated:"SearchCo
untUpdated",SearchIndexUpdated:"SearchIndexUpdated"};WebInspector.NetworkPanel=f
unction() | 376 WebInspector.NetworkLogView.EventTypes={ViewCleared:"ViewCleared",RowSizeChanged
:"RowSizeChanged",RequestSelected:"RequestSelected",SearchCountUpdated:"SearchCo
untUpdated",SearchIndexUpdated:"SearchIndexUpdated"};WebInspector.NetworkPanel=f
unction() |
| 373 {WebInspector.Panel.call(this,"network");this.registerRequiredCSS("networkPanel.
css");this._injectStyles();this.createSidebarView();this.splitView.hideMainEleme
nt();var defaultColumnsVisibility=WebInspector.NetworkLogView._defaultColumnsVis
ibility;var networkLogColumnsVisibilitySetting=WebInspector.settings.createSetti
ng("networkLogColumnsVisibility",defaultColumnsVisibility);var savedColumnsVisib
ility=networkLogColumnsVisibilitySetting.get();var columnsVisibility={};for(var
columnId in defaultColumnsVisibility) | 377 {WebInspector.Panel.call(this,"network");this.registerRequiredCSS("networkPanel.
css");this._injectStyles();this.createSidebarView();this.splitView.hideMainEleme
nt();var defaultColumnsVisibility=WebInspector.NetworkLogView._defaultColumnsVis
ibility;var networkLogColumnsVisibilitySetting=WebInspector.settings.createSetti
ng("networkLogColumnsVisibility",defaultColumnsVisibility);var savedColumnsVisib
ility=networkLogColumnsVisibilitySetting.get();var columnsVisibility={};for(var
columnId in defaultColumnsVisibility) |
| 374 columnsVisibility[columnId]=savedColumnsVisibility.hasOwnProperty(columnId)?save
dColumnsVisibility[columnId]:defaultColumnsVisibility[columnId];networkLogColumn
sVisibilitySetting.set(columnsVisibility);this._networkLogView=new WebInspector.
NetworkLogView(networkLogColumnsVisibilitySetting);this._networkLogView.show(thi
s.sidebarElement);this._viewsContainerElement=this.splitView.mainElement;this._v
iewsContainerElement.id="network-views";this._viewsContainerElement.addStyleClas
s("hidden");if(!this._networkLogView.useLargeRows) | 378 columnsVisibility[columnId]=savedColumnsVisibility.hasOwnProperty(columnId)?save
dColumnsVisibility[columnId]:defaultColumnsVisibility[columnId];networkLogColumn
sVisibilitySetting.set(columnsVisibility);this._networkLogView=new WebInspector.
NetworkLogView(networkLogColumnsVisibilitySetting);this._networkLogView.show(thi
s.sidebarElement);this._viewsContainerElement=this.splitView.mainElement;this._v
iewsContainerElement.id="network-views";this._viewsContainerElement.addStyleClas
s("hidden");if(!this._networkLogView.useLargeRows) |
| 375 this._viewsContainerElement.addStyleClass("small");this._networkLogView.addEvent
Listener(WebInspector.NetworkLogView.EventTypes.ViewCleared,this._onViewCleared,
this);this._networkLogView.addEventListener(WebInspector.NetworkLogView.EventTyp
es.RowSizeChanged,this._onRowSizeChanged,this);this._networkLogView.addEventList
ener(WebInspector.NetworkLogView.EventTypes.RequestSelected,this._onRequestSelec
ted,this);this._networkLogView.addEventListener(WebInspector.NetworkLogView.Even
tTypes.SearchCountUpdated,this._onSearchCountUpdated,this);this._networkLogView.
addEventListener(WebInspector.NetworkLogView.EventTypes.SearchIndexUpdated,this.
_onSearchIndexUpdated,this);this._closeButtonElement=this._viewsContainerElement
.createChild("div","close-button");this._closeButtonElement.id="network-close-bu
tton";this._closeButtonElement.addEventListener("click",this._toggleGridMode.bin
d(this),false);this._viewsContainerElement.appendChild(this._closeButtonElement)
;function viewGetter() | 379 this._viewsContainerElement.addStyleClass("small");this._networkLogView.addEvent
Listener(WebInspector.NetworkLogView.EventTypes.ViewCleared,this._onViewCleared,
this);this._networkLogView.addEventListener(WebInspector.NetworkLogView.EventTyp
es.RowSizeChanged,this._onRowSizeChanged,this);this._networkLogView.addEventList
ener(WebInspector.NetworkLogView.EventTypes.RequestSelected,this._onRequestSelec
ted,this);this._networkLogView.addEventListener(WebInspector.NetworkLogView.Even
tTypes.SearchCountUpdated,this._onSearchCountUpdated,this);this._networkLogView.
addEventListener(WebInspector.NetworkLogView.EventTypes.SearchIndexUpdated,this.
_onSearchIndexUpdated,this);this._closeButtonElement=this._viewsContainerElement
.createChild("div","close-button");this._closeButtonElement.id="network-close-bu
tton";this._closeButtonElement.addEventListener("click",this._toggleGridMode.bin
d(this),false);this._viewsContainerElement.appendChild(this._closeButtonElement)
;function viewGetter() |
| 376 {return this.visibleView;} | 380 {return this.visibleView;} |
| 377 WebInspector.GoToLineDialog.install(this,viewGetter.bind(this));} | 381 WebInspector.GoToLineDialog.install(this,viewGetter.bind(this));} |
| 378 WebInspector.NetworkPanel.prototype={get statusBarItems() | 382 WebInspector.NetworkPanel.prototype={get statusBarItems() |
| 379 {return this._networkLogView.statusBarItems;},elementsToRestoreScrollPositionsFo
r:function() | 383 {return this._networkLogView.statusBarItems;},elementsToRestoreScrollPositionsFo
r:function() |
| 380 {return this._networkLogView.elementsToRestoreScrollPositionsFor();},_reset:func
tion() | 384 {return this._networkLogView.elementsToRestoreScrollPositionsFor();},_reset:func
tion() |
| 381 {this._networkLogView._reset();},handleShortcut:function(event) | 385 {this._networkLogView._reset();},handleShortcut:function(event) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 401 {if(this._viewingRequestMode){this._viewingRequestMode=false;this.element.remove
StyleClass("viewing-resource");this.splitView.hideMainElement();} | 405 {if(this._viewingRequestMode){this._viewingRequestMode=false;this.element.remove
StyleClass("viewing-resource");this.splitView.hideMainElement();} |
| 402 this._networkLogView.switchToDetailedView();this._networkLogView.allowPopover=tr
ue;this._networkLogView._allowRequestSelection=false;},_toggleViewingRequestMode
:function() | 406 this._networkLogView.switchToDetailedView();this._networkLogView.allowPopover=tr
ue;this._networkLogView._allowRequestSelection=false;},_toggleViewingRequestMode
:function() |
| 403 {if(this._viewingRequestMode) | 407 {if(this._viewingRequestMode) |
| 404 return;this._viewingRequestMode=true;this.element.addStyleClass("viewing-resourc
e");this.splitView.showMainElement();this._networkLogView.allowPopover=false;thi
s._networkLogView._allowRequestSelection=true;this._networkLogView.switchToBrief
View();},performSearch:function(query,shouldJump) | 408 return;this._viewingRequestMode=true;this.element.addStyleClass("viewing-resourc
e");this.splitView.showMainElement();this._networkLogView.allowPopover=false;thi
s._networkLogView._allowRequestSelection=true;this._networkLogView.switchToBrief
View();},performSearch:function(query,shouldJump) |
| 405 {this._networkLogView.performSearch(query,shouldJump);},canFilter:function() | 409 {this._networkLogView.performSearch(query,shouldJump);},canFilter:function() |
| 406 {return true;},performFilter:function(query) | 410 {return true;},performFilter:function(query) |
| 407 {this._networkLogView.performFilter(query);},jumpToPreviousSearchResult:function
() | 411 {this._networkLogView.performFilter(query);},jumpToPreviousSearchResult:function
() |
| 408 {this._networkLogView.jumpToPreviousSearchResult();},jumpToNextSearchResult:func
tion() | 412 {this._networkLogView.jumpToPreviousSearchResult();},jumpToNextSearchResult:func
tion() |
| 409 {this._networkLogView.jumpToNextSearchResult();},searchCanceled:function() | 413 {this._networkLogView.jumpToNextSearchResult();},searchCanceled:function() |
| 410 {this._networkLogView.searchCanceled();},appendApplicableItems:function(event,co
ntextMenu,target) | 414 {this._networkLogView.searchCanceled();},appendApplicableItems:function(event,co
ntextMenu,target) |
| 411 {if(!(target instanceof WebInspector.NetworkRequest)) | 415 {function reveal(request) |
| 412 return;if(this.visibleView&&this.visibleView.isShowing()&&this.visibleView.reque
st()===target) | 416 {WebInspector.inspectorView.setCurrentPanel(this);this.revealAndHighlightRequest
(request);} |
| 413 return;function reveal() | 417 function appendRevealItem(request) |
| 414 {WebInspector.inspectorView.setCurrentPanel(this);this.revealAndHighlightRequest
((target));} | 418 {var revealText=WebInspector.UIString(WebInspector.useLowerCaseMenuTitles()?"Rev
eal in Network panel":"Reveal in Network Panel");contextMenu.appendItem(revealTe
xt,reveal.bind(this,request));} |
| 415 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles
()?"Reveal in Network panel":"Reveal in Network Panel"),reveal.bind(this));},_in
jectStyles:function() | 419 if(target instanceof WebInspector.Resource){var resource=(target);if(resource.re
quest) |
| 420 appendRevealItem.call(this,resource.request);return;} |
| 421 if(target instanceof WebInspector.UISourceCode){var uiSourceCode=(target);var re
source=WebInspector.resourceForURL(uiSourceCode.url);if(resource&&resource.reque
st) |
| 422 appendRevealItem.call(this,resource.request);return;} |
| 423 if(!(target instanceof WebInspector.NetworkRequest)) |
| 424 return;var request=(target);if(this.visibleView&&this.visibleView.isShowing()&&t
his.visibleView.request()===request) |
| 425 return;appendRevealItem.call(this,request);},_injectStyles:function() |
| 416 {var style=document.createElement("style");var rules=[];var columns=WebInspector
.NetworkLogView._defaultColumnsVisibility;var hideSelectors=[];var bgSelectors=[
];for(var columnId in columns){hideSelectors.push("#network-container .hide-"+co
lumnId+"-column ."+columnId+"-column");bgSelectors.push(".network-log-grid.data-
grid td."+columnId+"-column");} | 426 {var style=document.createElement("style");var rules=[];var columns=WebInspector
.NetworkLogView._defaultColumnsVisibility;var hideSelectors=[];var bgSelectors=[
];for(var columnId in columns){hideSelectors.push("#network-container .hide-"+co
lumnId+"-column ."+columnId+"-column");bgSelectors.push(".network-log-grid.data-
grid td."+columnId+"-column");} |
| 417 rules.push(hideSelectors.join(", ")+"{border-right: 0 none transparent;}");rules
.push(bgSelectors.join(", ")+"{background-color: rgba(0, 0, 0, 0.07);}");style.t
extContent=rules.join("\n");document.head.appendChild(style);},__proto__:WebInsp
ector.Panel.prototype} | 427 rules.push(hideSelectors.join(", ")+"{border-left: 0 none transparent;}");rules.
push(bgSelectors.join(", ")+"{background-color: rgba(0, 0, 0, 0.07);}");style.te
xtContent=rules.join("\n");document.head.appendChild(style);},__proto__:WebInspe
ctor.Panel.prototype} |
| 418 WebInspector.NetworkBaseCalculator=function() | 428 WebInspector.NetworkBaseCalculator=function() |
| 419 {} | 429 {} |
| 420 WebInspector.NetworkBaseCalculator.prototype={computePosition:function(time) | 430 WebInspector.NetworkBaseCalculator.prototype={computePosition:function(time) |
| 421 {return(time-this._minimumBoundary)/this.boundarySpan()*this._workingArea;},comp
uteBarGraphPercentages:function(item) | 431 {return(time-this._minimumBoundary)/this.boundarySpan()*this._workingArea;},comp
uteBarGraphPercentages:function(item) |
| 422 {return{start:0,middle:0,end:(this._value(item)/this.boundarySpan())*100};},comp
uteBarGraphLabels:function(item) | 432 {return{start:0,middle:0,end:(this._value(item)/this.boundarySpan())*100};},comp
uteBarGraphLabels:function(item) |
| 423 {const label=this.formatTime(this._value(item));return{left:label,right:label,to
oltip:label};},boundarySpan:function() | 433 {const label=this.formatTime(this._value(item));return{left:label,right:label,to
oltip:label};},boundarySpan:function() |
| 424 {return this._maximumBoundary-this._minimumBoundary;},updateBoundaries:function(
item) | 434 {return this._maximumBoundary-this._minimumBoundary;},updateBoundaries:function(
item) |
| 425 {this._minimumBoundary=0;var value=this._value(item);if(typeof this._maximumBoun
dary==="undefined"||value>this._maximumBoundary){this._maximumBoundary=value;ret
urn true;} | 435 {this._minimumBoundary=0;var value=this._value(item);if(typeof this._maximumBoun
dary==="undefined"||value>this._maximumBoundary){this._maximumBoundary=value;ret
urn true;} |
| 426 return false;},reset:function() | 436 return false;},reset:function() |
| 427 {delete this._minimumBoundary;delete this._maximumBoundary;},maximumBoundary:fun
ction() | 437 {delete this._minimumBoundary;delete this._maximumBoundary;},maximumBoundary:fun
ction() |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 {return request.startTime;},_upperBound:function(request) | 480 {return request.startTime;},_upperBound:function(request) |
| 471 {return request.endTime;},__proto__:WebInspector.NetworkTimeCalculator.prototype
} | 481 {return request.endTime;},__proto__:WebInspector.NetworkTimeCalculator.prototype
} |
| 472 WebInspector.NetworkTransferDurationCalculator=function() | 482 WebInspector.NetworkTransferDurationCalculator=function() |
| 473 {WebInspector.NetworkTimeCalculator.call(this,true);} | 483 {WebInspector.NetworkTimeCalculator.call(this,true);} |
| 474 WebInspector.NetworkTransferDurationCalculator.prototype={formatTime:function(va
lue) | 484 WebInspector.NetworkTransferDurationCalculator.prototype={formatTime:function(va
lue) |
| 475 {return Number.secondsToString(value);},_upperBound:function(request) | 485 {return Number.secondsToString(value);},_upperBound:function(request) |
| 476 {return request.duration;},__proto__:WebInspector.NetworkTimeCalculator.prototyp
e} | 486 {return request.duration;},__proto__:WebInspector.NetworkTimeCalculator.prototyp
e} |
| 477 WebInspector.NetworkDataGridNode=function(parentView,request) | 487 WebInspector.NetworkDataGridNode=function(parentView,request) |
| 478 {WebInspector.DataGridNode.call(this,{});this._parentView=parentView;this._reque
st=request;this._linkifier=new WebInspector.Linkifier();} | 488 {WebInspector.DataGridNode.call(this,{});this._parentView=parentView;this._reque
st=request;this._linkifier=new WebInspector.Linkifier();} |
| 479 WebInspector.NetworkDataGridNode.prototype={createCells:function() | 489 WebInspector.NetworkDataGridNode.prototype={createCells:function() |
| 480 {this._element.addStyleClass("offscreen");this._nameCell=this._createDivInTD("na
me");this._methodCell=this._createDivInTD("method");this._statusCell=this._creat
eDivInTD("status");this._domainCell=this._createDivInTD("domain");this._typeCell
=this._createDivInTD("type");this._initiatorCell=this._createDivInTD("initiator"
);this._cookiesCell=this._createDivInTD("cookies");this._setCookiesCell=this._cr
eateDivInTD("setCookies");this._sizeCell=this._createDivInTD("size");this._timeC
ell=this._createDivInTD("time");this._responseHeaderCells={};var responseHeaderC
olumns=WebInspector.NetworkLogView._responseHeaderColumns;for(var i=0;i<response
HeaderColumns.length;++i) | 490 {this._element.addStyleClass("offscreen");this._nameCell=this._createDivInTD("na
me");this._methodCell=this._createDivInTD("method");this._statusCell=this._creat
eDivInTD("status");this._schemeCell=this._createDivInTD("scheme");this._domainCe
ll=this._createDivInTD("domain");this._typeCell=this._createDivInTD("type");this
._initiatorCell=this._createDivInTD("initiator");this._cookiesCell=this._createD
ivInTD("cookies");this._setCookiesCell=this._createDivInTD("setCookies");this._s
izeCell=this._createDivInTD("size");this._timeCell=this._createDivInTD("time");t
his._responseHeaderCells={};var responseHeaderColumns=WebInspector.NetworkLogVie
w._responseHeaderColumns;for(var i=0;i<responseHeaderColumns.length;++i) |
| 481 this._responseHeaderCells[responseHeaderColumns[i]]=this._createDivInTD(response
HeaderColumns[i]);this._timelineCell=this._createDivInTD("timeline");this._creat
eTimelineBar(this._timelineCell);this._nameCell.addEventListener("click",this._o
nClick.bind(this),false);this._nameCell.addEventListener("dblclick",this._openIn
NewTab.bind(this),false);},wasDetached:function() | 491 this._responseHeaderCells[responseHeaderColumns[i]]=this._createDivInTD(response
HeaderColumns[i]);this._timelineCell=this._createDivInTD("timeline");this._creat
eTimelineBar(this._timelineCell);this._nameCell.addEventListener("click",this._o
nClick.bind(this),false);this._nameCell.addEventListener("dblclick",this._openIn
NewTab.bind(this),false);},wasDetached:function() |
| 482 {this._linkifier.reset();},isFilteredOut:function() | 492 {this._linkifier.reset();},isFilteredOut:function() |
| 483 {if(this._parentView._filteredOutRequests.get(this._request)) | 493 {if(this._parentView._filteredOutRequests.get(this._request)) |
| 484 return true;return!this._parentView._typeFilter(this._request);},_onClick:functi
on() | 494 return true;return!this._parentView._typeFilter(this._request);},_onClick:functi
on() |
| 485 {if(!this._parentView._allowRequestSelection) | 495 {if(!this._parentView._allowRequestSelection) |
| 486 this.select();},select:function() | 496 this.select();},select:function() |
| 487 {this._parentView.dispatchEventToListeners(WebInspector.NetworkLogView.EventType
s.RequestSelected,this._request);WebInspector.DataGridNode.prototype.select.appl
y(this,arguments);WebInspector.notifications.dispatchEventToListeners(WebInspect
or.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.Netwo
rkRequestSelected,url:this._request.url});},_highlightMatchedSubstring:function(
regexp) | 497 {this._parentView.dispatchEventToListeners(WebInspector.NetworkLogView.EventType
s.RequestSelected,this._request);WebInspector.DataGridNode.prototype.select.appl
y(this,arguments);WebInspector.notifications.dispatchEventToListeners(WebInspect
or.UserMetrics.UserAction,{action:WebInspector.UserMetrics.UserActionNames.Netwo
rkRequestSelected,url:this._request.url});},_highlightMatchedSubstring:function(
regexp) |
| 488 {var domChanges=[];var matchInfo=this._element.textContent.match(regexp);if(matc
hInfo) | 498 {var domChanges=[];var matchInfo=this._element.textContent.match(regexp);if(matc
hInfo) |
| 489 WebInspector.highlightSearchResult(this._nameCell,matchInfo.index,matchInfo[0].l
ength,domChanges);return domChanges;},_openInNewTab:function() | 499 WebInspector.highlightSearchResult(this._nameCell,matchInfo.index,matchInfo[0].l
ength,domChanges);return domChanges;},_openInNewTab:function() |
| 490 {InspectorFrontendHost.openInNewTab(this._request.url);},get selectable() | 500 {InspectorFrontendHost.openInNewTab(this._request.url);},get selectable() |
| 491 {return this._parentView._allowRequestSelection&&!this.isFilteredOut();},_create
DivInTD:function(columnIdentifier) | 501 {return this._parentView._allowRequestSelection&&!this.isFilteredOut();},_create
DivInTD:function(columnIdentifier) |
| 492 {var td=this.createTD(columnIdentifier);var div=td.createChild("div");this._elem
ent.appendChild(td);return div;},_createTimelineBar:function(cell) | 502 {var td=this.createTD(columnIdentifier);var div=td.createChild("div");this._elem
ent.appendChild(td);return div;},_createTimelineBar:function(cell) |
| 493 {cell.className="network-graph-side";this._barAreaElement=document.createElement
("div");this._barAreaElement.className="network-graph-bar-area";this._barAreaEle
ment.request=this._request;cell.appendChild(this._barAreaElement);this._barLeftE
lement=document.createElement("div");this._barLeftElement.className="network-gra
ph-bar waiting";this._barAreaElement.appendChild(this._barLeftElement);this._bar
RightElement=document.createElement("div");this._barRightElement.className="netw
ork-graph-bar";this._barAreaElement.appendChild(this._barRightElement);this._lab
elLeftElement=document.createElement("div");this._labelLeftElement.className="ne
twork-graph-label waiting";this._barAreaElement.appendChild(this._labelLeftEleme
nt);this._labelRightElement=document.createElement("div");this._labelRightElemen
t.className="network-graph-label";this._barAreaElement.appendChild(this._labelRi
ghtElement);cell.addEventListener("mouseover",this._refreshLabelPositions.bind(t
his),false);},refreshRequest:function() | 503 {cell.className="network-graph-side";this._barAreaElement=document.createElement
("div");this._barAreaElement.className="network-graph-bar-area";this._barAreaEle
ment.request=this._request;cell.appendChild(this._barAreaElement);this._barLeftE
lement=document.createElement("div");this._barLeftElement.className="network-gra
ph-bar waiting";this._barAreaElement.appendChild(this._barLeftElement);this._bar
RightElement=document.createElement("div");this._barRightElement.className="netw
ork-graph-bar";this._barAreaElement.appendChild(this._barRightElement);this._lab
elLeftElement=document.createElement("div");this._labelLeftElement.className="ne
twork-graph-label waiting";this._barAreaElement.appendChild(this._labelLeftEleme
nt);this._labelRightElement=document.createElement("div");this._labelRightElemen
t.className="network-graph-label";this._barAreaElement.appendChild(this._labelRi
ghtElement);cell.addEventListener("mouseover",this._refreshLabelPositions.bind(t
his),false);},refreshRequest:function() |
| 494 {this._refreshNameCell();this._refreshMethodCell();this._refreshStatusCell();thi
s._refreshDomainCell();this._refreshTypeCell();this._refreshInitiatorCell();this
._refreshCookiesCell();this._refreshSetCookiesCell();this._refreshSizeCell();thi
s._refreshTimeCell();var responseHeaderColumns=WebInspector.NetworkLogView._resp
onseHeaderColumns;for(var i=0;i<responseHeaderColumns.length;++i) | 504 {this._refreshNameCell();this._refreshMethodCell();this._refreshStatusCell();thi
s._refreshSchemeCell();this._refreshDomainCell();this._refreshTypeCell();this._r
efreshInitiatorCell();this._refreshCookiesCell();this._refreshSetCookiesCell();t
his._refreshSizeCell();this._refreshTimeCell();var responseHeaderColumns=WebInsp
ector.NetworkLogView._responseHeaderColumns;for(var i=0;i<responseHeaderColumns.
length;++i) |
| 495 this._refreshResponseHeaderCell(responseHeaderColumns[i]);if(this._request.cache
d) | 505 this._refreshResponseHeaderCell(responseHeaderColumns[i]);if(this._request.cache
d) |
| 496 this._timelineCell.addStyleClass("resource-cached");this._element.addStyleClass(
"network-item");this._element.enableStyleClass("network-error-row",this._request
.failed||(this._request.statusCode>=400));this._updateElementStyleClasses(this._
element);},_updateElementStyleClasses:function(element) | 506 this._timelineCell.addStyleClass("resource-cached");this._element.addStyleClass(
"network-item");this._element.enableStyleClass("network-error-row",this._request
.failed||(this._request.statusCode>=400));this._updateElementStyleClasses(this._
element);},_updateElementStyleClasses:function(element) |
| 497 {var typeClassName="network-type-"+this._request.type.name();if(!element.hasStyl
eClass(typeClassName)){element.removeMatchingStyleClasses("network-type-\\w+");e
lement.addStyleClass(typeClassName);}},_refreshResponseHeaderCell:function(heade
rName) | 507 {var typeClassName="network-type-"+this._request.type.name();if(!element.hasStyl
eClass(typeClassName)){element.removeMatchingStyleClasses("network-type-\\w+");e
lement.addStyleClass(typeClassName);}},_refreshResponseHeaderCell:function(heade
rName) |
| 498 {var cell=this._responseHeaderCells[headerName];var value=this._request.response
HeaderValue(headerName);cell.setTextAndTitle(value?value:"");},_refreshNameCell:
function() | 508 {var cell=this._responseHeaderCells[headerName];var value=this._request.response
HeaderValue(headerName);cell.setTextAndTitle(value?value:"");},_refreshNameCell:
function() |
| 499 {this._nameCell.removeChildren();if(this._request.type===WebInspector.resourceTy
pes.Image){var previewImage=document.createElement("img");previewImage.className
="image-network-icon-preview";this._request.populateImageSource(previewImage);va
r iconElement=document.createElement("div");iconElement.className="icon";iconEle
ment.appendChild(previewImage);}else{var iconElement=document.createElement("img
");iconElement.className="icon";} | 509 {this._nameCell.removeChildren();if(this._request.type===WebInspector.resourceTy
pes.Image){var previewImage=document.createElement("img");previewImage.className
="image-network-icon-preview";this._request.populateImageSource(previewImage);va
r iconElement=document.createElement("div");iconElement.className="icon";iconEle
ment.appendChild(previewImage);}else{var iconElement=document.createElement("img
");iconElement.className="icon";} |
| 500 this._nameCell.appendChild(iconElement);this._nameCell.appendChild(document.crea
teTextNode(this._request.name()));this._appendSubtitle(this._nameCell,this._requ
est.path());this._nameCell.title=this._request.url;},_refreshMethodCell:function
() | 510 this._nameCell.appendChild(iconElement);this._nameCell.appendChild(document.crea
teTextNode(this._request.name()));this._appendSubtitle(this._nameCell,this._requ
est.path());this._nameCell.title=this._request.url;},_refreshMethodCell:function
() |
| 501 {this._methodCell.setTextAndTitle(this._request.requestMethod);},_refreshStatusC
ell:function() | 511 {this._methodCell.setTextAndTitle(this._request.requestMethod);},_refreshStatusC
ell:function() |
| 502 {this._statusCell.removeChildren();if(this._request.failed){var failText=this._r
equest.canceled?WebInspector.UIString("(canceled)"):WebInspector.UIString("(fail
ed)");if(this._request.localizedFailDescription){this._statusCell.appendChild(do
cument.createTextNode(failText));this._appendSubtitle(this._statusCell,this._req
uest.localizedFailDescription);this._statusCell.title=failText+" "+this._request
.localizedFailDescription;}else | 512 {this._statusCell.removeChildren();if(this._request.failed){var failText=this._r
equest.canceled?WebInspector.UIString("(canceled)"):WebInspector.UIString("(fail
ed)");if(this._request.localizedFailDescription){this._statusCell.appendChild(do
cument.createTextNode(failText));this._appendSubtitle(this._statusCell,this._req
uest.localizedFailDescription);this._statusCell.title=failText+" "+this._request
.localizedFailDescription;}else |
| 503 this._statusCell.setTextAndTitle(failText);this._statusCell.addStyleClass("netwo
rk-dim-cell");return;} | 513 this._statusCell.setTextAndTitle(failText);this._statusCell.addStyleClass("netwo
rk-dim-cell");return;} |
| 504 this._statusCell.removeStyleClass("network-dim-cell");if(this._request.statusCod
e){this._statusCell.appendChild(document.createTextNode(""+this._request.statusC
ode));this._appendSubtitle(this._statusCell,this._request.statusText);this._stat
usCell.title=this._request.statusCode+" "+this._request.statusText;if(this._requ
est.cached) | 514 this._statusCell.removeStyleClass("network-dim-cell");if(this._request.statusCod
e){this._statusCell.appendChild(document.createTextNode(""+this._request.statusC
ode));this._appendSubtitle(this._statusCell,this._request.statusText);this._stat
usCell.title=this._request.statusCode+" "+this._request.statusText;if(this._requ
est.cached) |
| 505 this._statusCell.addStyleClass("network-dim-cell");}else{if(!this._request.isHtt
pFamily()&&this._request.finished) | 515 this._statusCell.addStyleClass("network-dim-cell");}else{if(!this._request.isHtt
pFamily()&&this._request.finished) |
| 506 this._statusCell.setTextAndTitle(WebInspector.UIString("Success"));else if(this.
_request.isPingRequest()) | 516 this._statusCell.setTextAndTitle(WebInspector.UIString("Success"));else if(this.
_request.isPingRequest()) |
| 507 this._statusCell.setTextAndTitle(WebInspector.UIString("(ping)"));else | 517 this._statusCell.setTextAndTitle(WebInspector.UIString("(ping)"));else |
| 508 this._statusCell.setTextAndTitle(WebInspector.UIString("(pending)"));this._statu
sCell.addStyleClass("network-dim-cell");}},_refreshDomainCell:function() | 518 this._statusCell.setTextAndTitle(WebInspector.UIString("(pending)"));this._statu
sCell.addStyleClass("network-dim-cell");}},_refreshSchemeCell:function() |
| 509 {this._domainCell.removeChildren();this._domainCell.appendChild(document.createT
extNode(this._request.domain));this._domainCell.title=this._request.parsedURL.ho
st;},_refreshTypeCell:function() | 519 {this._schemeCell.setTextAndTitle(this._request.scheme);},_refreshDomainCell:fun
ction() |
| 520 {this._typeCell.setTextAndTitle(this._request.domain);},_refreshTypeCell:functio
n() |
| 510 {if(this._request.mimeType){this._typeCell.removeStyleClass("network-dim-cell");
this._typeCell.setTextAndTitle(this._request.mimeType);}else if(this._request.is
PingRequest()){this._typeCell.removeStyleClass("network-dim-cell");this._typeCel
l.setTextAndTitle(this._request.requestContentType()||"");}else{this._typeCell.a
ddStyleClass("network-dim-cell");this._typeCell.setTextAndTitle(WebInspector.UIS
tring("Pending"));}},_refreshInitiatorCell:function() | 521 {if(this._request.mimeType){this._typeCell.removeStyleClass("network-dim-cell");
this._typeCell.setTextAndTitle(this._request.mimeType);}else if(this._request.is
PingRequest()){this._typeCell.removeStyleClass("network-dim-cell");this._typeCel
l.setTextAndTitle(this._request.requestContentType()||"");}else{this._typeCell.a
ddStyleClass("network-dim-cell");this._typeCell.setTextAndTitle(WebInspector.UIS
tring("Pending"));}},_refreshInitiatorCell:function() |
| 511 {this._initiatorCell.removeChildren();this._initiatorCell.removeStyleClass("netw
ork-dim-cell");this._initiatorCell.removeStyleClass("network-script-initiated");
delete this._initiatorCell.request;var request=this._request;var initiator=reque
st.initiatorInfo();switch(initiator.type){case WebInspector.NetworkRequest.Initi
atorType.Parser:this._initiatorCell.title=initiator.url+":"+initiator.lineNumber
;this._initiatorCell.appendChild(WebInspector.linkifyResourceAsNode(initiator.ur
l,initiator.lineNumber-1));this._appendSubtitle(this._initiatorCell,WebInspector
.UIString("Parser"));break;case WebInspector.NetworkRequest.InitiatorType.Redire
ct:this._initiatorCell.title=initiator.url;this._initiatorCell.appendChild(WebIn
spector.linkifyRequestAsNode(request.redirectSource));this._appendSubtitle(this.
_initiatorCell,WebInspector.UIString("Redirect"));break;case WebInspector.Networ
kRequest.InitiatorType.Script:var urlElement=this._linkifier.linkifyLocation(ini
tiator.url,initiator.lineNumber-1,initiator.columnNumber-1);urlElement.title="";
this._initiatorCell.appendChild(urlElement);this._appendSubtitle(this._initiator
Cell,WebInspector.UIString("Script"));this._initiatorCell.addStyleClass("network
-script-initiated");this._initiatorCell.request=request;break;default:this._init
iatorCell.title="";this._initiatorCell.addStyleClass("network-dim-cell");this._i
nitiatorCell.setTextAndTitle(WebInspector.UIString("Other"));}},_refreshCookiesC
ell:function() | 522 {this._initiatorCell.removeChildren();this._initiatorCell.removeStyleClass("netw
ork-dim-cell");this._initiatorCell.removeStyleClass("network-script-initiated");
delete this._initiatorCell.request;var request=this._request;var initiator=reque
st.initiatorInfo();switch(initiator.type){case WebInspector.NetworkRequest.Initi
atorType.Parser:this._initiatorCell.title=initiator.url+":"+initiator.lineNumber
;this._initiatorCell.appendChild(WebInspector.linkifyResourceAsNode(initiator.ur
l,initiator.lineNumber-1));this._appendSubtitle(this._initiatorCell,WebInspector
.UIString("Parser"));break;case WebInspector.NetworkRequest.InitiatorType.Redire
ct:this._initiatorCell.title=initiator.url;this._initiatorCell.appendChild(WebIn
spector.linkifyRequestAsNode(request.redirectSource));this._appendSubtitle(this.
_initiatorCell,WebInspector.UIString("Redirect"));break;case WebInspector.Networ
kRequest.InitiatorType.Script:var urlElement=this._linkifier.linkifyLocation(ini
tiator.url,initiator.lineNumber-1,initiator.columnNumber-1);urlElement.title="";
this._initiatorCell.appendChild(urlElement);this._appendSubtitle(this._initiator
Cell,WebInspector.UIString("Script"));this._initiatorCell.addStyleClass("network
-script-initiated");this._initiatorCell.request=request;break;default:this._init
iatorCell.title="";this._initiatorCell.addStyleClass("network-dim-cell");this._i
nitiatorCell.setTextAndTitle(WebInspector.UIString("Other"));}},_refreshCookiesC
ell:function() |
| 512 {var requestCookies=this._request.requestCookies;this._cookiesCell.setTextAndTit
le(requestCookies?""+requestCookies.length:"");},_refreshSetCookiesCell:function
() | 523 {var requestCookies=this._request.requestCookies;this._cookiesCell.setTextAndTit
le(requestCookies?""+requestCookies.length:"");},_refreshSetCookiesCell:function
() |
| 513 {var responseCookies=this._request.responseCookies;this._setCookiesCell.setTextA
ndTitle(responseCookies?""+responseCookies.length:"");},_refreshSizeCell:functio
n() | 524 {var responseCookies=this._request.responseCookies;this._setCookiesCell.setTextA
ndTitle(responseCookies?""+responseCookies.length:"");},_refreshSizeCell:functio
n() |
| 514 {if(this._request.cached){this._sizeCell.setTextAndTitle(WebInspector.UIString("
(from cache)"));this._sizeCell.addStyleClass("network-dim-cell");}else{var resou
rceSize=Number.bytesToString(this._request.resourceSize);var transferSize=Number
.bytesToString(this._request.transferSize);this._sizeCell.setTextAndTitle(transf
erSize);this._sizeCell.removeStyleClass("network-dim-cell");this._appendSubtitle
(this._sizeCell,resourceSize);}},_refreshTimeCell:function() | 525 {if(this._request.cached){this._sizeCell.setTextAndTitle(WebInspector.UIString("
(from cache)"));this._sizeCell.addStyleClass("network-dim-cell");}else{var resou
rceSize=Number.bytesToString(this._request.resourceSize);var transferSize=Number
.bytesToString(this._request.transferSize);this._sizeCell.setTextAndTitle(transf
erSize);this._sizeCell.removeStyleClass("network-dim-cell");this._appendSubtitle
(this._sizeCell,resourceSize);}},_refreshTimeCell:function() |
| 515 {if(this._request.duration>0){this._timeCell.removeStyleClass("network-dim-cell"
);this._timeCell.setTextAndTitle(Number.secondsToString(this._request.duration))
;this._appendSubtitle(this._timeCell,Number.secondsToString(this._request.latenc
y));}else{this._timeCell.addStyleClass("network-dim-cell");this._timeCell.setTex
tAndTitle(WebInspector.UIString("Pending"));}},_appendSubtitle:function(cellElem
ent,subtitleText) | 526 {if(this._request.duration>0){this._timeCell.removeStyleClass("network-dim-cell"
);this._timeCell.setTextAndTitle(Number.secondsToString(this._request.duration))
;this._appendSubtitle(this._timeCell,Number.secondsToString(this._request.latenc
y));}else{this._timeCell.addStyleClass("network-dim-cell");this._timeCell.setTex
tAndTitle(WebInspector.UIString("Pending"));}},_appendSubtitle:function(cellElem
ent,subtitleText) |
| 516 {var subtitleElement=document.createElement("div");subtitleElement.className="ne
twork-cell-subtitle";subtitleElement.textContent=subtitleText;cellElement.append
Child(subtitleElement);},refreshGraph:function(calculator) | 527 {var subtitleElement=document.createElement("div");subtitleElement.className="ne
twork-cell-subtitle";subtitleElement.textContent=subtitleText;cellElement.append
Child(subtitleElement);},refreshGraph:function(calculator) |
| 517 {var percentages=calculator.computeBarGraphPercentages(this._request);this._perc
entages=percentages;this._barAreaElement.removeStyleClass("hidden");this._update
ElementStyleClasses(this._timelineCell);this._barLeftElement.style.setProperty("
left",percentages.start+"%");this._barRightElement.style.setProperty("right",(10
0-percentages.end)+"%");this._barLeftElement.style.setProperty("right",(100-perc
entages.end)+"%");this._barRightElement.style.setProperty("left",percentages.mid
dle+"%");var labels=calculator.computeBarGraphLabels(this._request);this._labelL
eftElement.textContent=labels.left;this._labelRightElement.textContent=labels.ri
ght;var tooltip=(labels.tooltip||"");this._barLeftElement.title=tooltip;this._la
belLeftElement.title=tooltip;this._labelRightElement.title=tooltip;this._barRigh
tElement.title=tooltip;},_refreshLabelPositions:function() | 528 {var percentages=calculator.computeBarGraphPercentages(this._request);this._perc
entages=percentages;this._barAreaElement.removeStyleClass("hidden");this._update
ElementStyleClasses(this._timelineCell);this._barLeftElement.style.setProperty("
left",percentages.start+"%");this._barRightElement.style.setProperty("right",(10
0-percentages.end)+"%");this._barLeftElement.style.setProperty("right",(100-perc
entages.end)+"%");this._barRightElement.style.setProperty("left",percentages.mid
dle+"%");var labels=calculator.computeBarGraphLabels(this._request);this._labelL
eftElement.textContent=labels.left;this._labelRightElement.textContent=labels.ri
ght;var tooltip=(labels.tooltip||"");this._barLeftElement.title=tooltip;this._la
belLeftElement.title=tooltip;this._labelRightElement.title=tooltip;this._barRigh
tElement.title=tooltip;},_refreshLabelPositions:function() |
| 518 {if(!this._percentages) | 529 {if(!this._percentages) |
| 519 return;this._labelLeftElement.style.removeProperty("left");this._labelLeftElemen
t.style.removeProperty("right");this._labelLeftElement.removeStyleClass("before"
);this._labelLeftElement.removeStyleClass("hidden");this._labelRightElement.styl
e.removeProperty("left");this._labelRightElement.style.removeProperty("right");t
his._labelRightElement.removeStyleClass("after");this._labelRightElement.removeS
tyleClass("hidden");const labelPadding=10;const barRightElementOffsetWidth=this.
_barRightElement.offsetWidth;const barLeftElementOffsetWidth=this._barLeftElemen
t.offsetWidth;if(this._barLeftElement){var leftBarWidth=barLeftElementOffsetWidt
h-labelPadding;var rightBarWidth=(barRightElementOffsetWidth-barLeftElementOffse
tWidth)-labelPadding;}else{var leftBarWidth=(barLeftElementOffsetWidth-barRightE
lementOffsetWidth)-labelPadding;var rightBarWidth=barRightElementOffsetWidth-lab
elPadding;} | 530 return;this._labelLeftElement.style.removeProperty("left");this._labelLeftElemen
t.style.removeProperty("right");this._labelLeftElement.removeStyleClass("before"
);this._labelLeftElement.removeStyleClass("hidden");this._labelRightElement.styl
e.removeProperty("left");this._labelRightElement.style.removeProperty("right");t
his._labelRightElement.removeStyleClass("after");this._labelRightElement.removeS
tyleClass("hidden");const labelPadding=10;const barRightElementOffsetWidth=this.
_barRightElement.offsetWidth;const barLeftElementOffsetWidth=this._barLeftElemen
t.offsetWidth;if(this._barLeftElement){var leftBarWidth=barLeftElementOffsetWidt
h-labelPadding;var rightBarWidth=(barRightElementOffsetWidth-barLeftElementOffse
tWidth)-labelPadding;}else{var leftBarWidth=(barLeftElementOffsetWidth-barRightE
lementOffsetWidth)-labelPadding;var rightBarWidth=barRightElementOffsetWidth-lab
elPadding;} |
| (...skipping 29 matching lines...) Expand all Loading... |
| 549 return-1;if(aInitiator.columnNumber>bInitiator.columnNumber) | 560 return-1;if(aInitiator.columnNumber>bInitiator.columnNumber) |
| 550 return 1;return 0;} | 561 return 1;return 0;} |
| 551 WebInspector.NetworkDataGridNode.RequestCookiesCountComparator=function(a,b) | 562 WebInspector.NetworkDataGridNode.RequestCookiesCountComparator=function(a,b) |
| 552 {var aScore=a._request.requestCookies?a._request.requestCookies.length:0;var bSc
ore=b._request.requestCookies?b._request.requestCookies.length:0;return aScore-b
Score;} | 563 {var aScore=a._request.requestCookies?a._request.requestCookies.length:0;var bSc
ore=b._request.requestCookies?b._request.requestCookies.length:0;return aScore-b
Score;} |
| 553 WebInspector.NetworkDataGridNode.ResponseCookiesCountComparator=function(a,b) | 564 WebInspector.NetworkDataGridNode.ResponseCookiesCountComparator=function(a,b) |
| 554 {var aScore=a._request.responseCookies?a._request.responseCookies.length:0;var b
Score=b._request.responseCookies?b._request.responseCookies.length:0;return aSco
re-bScore;} | 565 {var aScore=a._request.responseCookies?a._request.responseCookies.length:0;var b
Score=b._request.responseCookies?b._request.responseCookies.length:0;return aSco
re-bScore;} |
| 555 WebInspector.NetworkDataGridNode.RequestPropertyComparator=function(propertyName
,revert,a,b) | 566 WebInspector.NetworkDataGridNode.RequestPropertyComparator=function(propertyName
,revert,a,b) |
| 556 {var aValue=a._request[propertyName];var bValue=b._request[propertyName];if(aVal
ue>bValue) | 567 {var aValue=a._request[propertyName];var bValue=b._request[propertyName];if(aVal
ue>bValue) |
| 557 return revert?-1:1;if(bValue>aValue) | 568 return revert?-1:1;if(bValue>aValue) |
| 558 return revert?1:-1;return 0;} | 569 return revert?1:-1;return 0;} |
| OLD | NEW |