Changeset 56108 in webkit
- Timestamp:
- Mar 17, 2010 7:08:54 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r56106 r56108 1 2010-03-17 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 WebInspector: Timeline improvements - next iteration. 6 7 The top level records should be collapsed. 8 Virtually linked events should be nested in Timeline like Send Request and 9 corresponding Received Responce, Timer Install and Timer Fire etc. 10 It should be possible to see Main Resource request. 11 12 https://bugs.webkit.org/show_bug.cgi?id=36122 13 14 * inspector/timeline-network-resource-expected.txt: 15 * inspector/timeline-test.js: 16 (frontend_getTimelineResults): 17 1 18 2010-03-17 Csaba Osztrogonác <ossy@webkit.org> 2 19 -
trunk/LayoutTests/inspector/timeline-enum-stability-expected.txt
r55277 r56108 19 19 WebInspector.TimelineAgent.RecordType.ResourceFinish : 14 20 20 WebInspector.TimelineAgent.RecordType.FunctionCall : 15 21 WebInspector.TimelineAgent.RecordType.ResourceReceiveData : 16 21 22 -
trunk/LayoutTests/inspector/timeline-network-resource-expected.txt
r55614 r56108 21 21 +- url : * DEFINED * 22 22 + } 23 + children : * DEFINED * 24 + endTime : * DEFINED * 23 25 + type : 13 24 26 -
trunk/LayoutTests/inspector/timeline-test.js
r55365 r56108 137 137 } 138 138 } 139 addRecords(WebInspector.panels.timeline._r ecords);139 addRecords(WebInspector.panels.timeline._rootRecord.children); 140 140 return result; 141 141 } -
trunk/WebCore/ChangeLog
r56107 r56108 1 2010-03-17 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 WebInspector: Timeline improvements - next iteration. 6 7 The top level records should be collapsed. 8 Virtually linked events should be nested in Timeline like Send Request and 9 corresponding Received Responce, Timer Install and Timer Fire etc. 10 It should be possible to see Main Resource request. 11 12 https://bugs.webkit.org/show_bug.cgi?id=36122 13 14 * inspector/InspectorController.cpp: 15 (WebCore::InspectorController::resetScriptObjects): 16 (WebCore::InspectorController::didReceiveResponse): 17 * inspector/InspectorTimelineAgent.cpp: 18 (WebCore::InspectorTimelineAgent::willReceiveResourceResponse): 19 (WebCore::InspectorTimelineAgent::didReceiveResourceResponse): 20 * inspector/InspectorTimelineAgent.h: 21 * inspector/front-end/TimelinePanel.js: 22 (WebInspector.TimelinePanel): 23 (WebInspector.TimelinePanel.prototype._createStatusbarButtons): 24 (WebInspector.TimelinePanel.prototype.addRecordToTimeline): 25 (WebInspector.TimelinePanel.prototype._findParentRecord): 26 (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): 27 (WebInspector.TimelinePanel.prototype.resize): 28 (WebInspector.TimelinePanel.prototype._createTopLevelRecord): 29 (WebInspector.TimelinePanel.prototype.reset): 30 (WebInspector.TimelinePanel.prototype._clean): 31 (WebInspector.TimelinePanel.prototype._refresh): 32 (WebInspector.TimelinePanel.prototype._refreshRecords): 33 (WebInspector.TimelinePanel.prototype._addToRecordsWindow): 34 (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages): 35 (WebInspector.TimelineCalculator.prototype.updateBoundaries): 36 (WebInspector.TimelineRecordGraphRow): 37 (WebInspector.TimelineRecordGraphRow.prototype.update): 38 (WebInspector.TimelinePanel.FormattedRecord): 39 (WebInspector.TimelinePanel.FormattedRecord.prototype.get children): 40 (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): 41 * inspector/front-end/inspector.css: 42 * loader/ResourceLoader.cpp: 43 (WebCore::ResourceLoader::didReceiveResponse): 44 1 45 2010-03-17 Alexander Pavlov <apavlov@chromium.org> 2 46 -
trunk/WebCore/inspector/InspectorController.cpp
r56104 r56108 676 676 // resources are cleared so that it has a chance to unbind them. 677 677 if (m_frontend) { 678 if (m_timelineAgent)679 m_timelineAgent->reset();680 681 678 m_frontend->reset(); 682 679 m_domAgent->reset(); … … 901 898 void InspectorController::didReceiveResponse(unsigned long identifier, const ResourceResponse& response) 902 899 { 903 if (m_timelineAgent)904 m_timelineAgent->didReceiveResourceResponse(identifier, response);905 906 900 RefPtr<InspectorResource> resource = getTrackedResource(identifier); 907 901 if (!resource) -
trunk/WebCore/inspector/InspectorTimelineAgent.cpp
r55277 r56108 188 188 } 189 189 190 void InspectorTimelineAgent::didReceiveResourceResponse(unsigned long identifier, const ResourceResponse& response) 191 { 192 ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()); 193 record.set("data", TimelineRecordFactory::createResourceReceiveResponseData(m_frontend, identifier, response)); 194 record.set("type", ResourceReceiveResponseTimelineRecordType); 195 m_frontend->addRecordToTimeline(record); 190 void InspectorTimelineAgent::willReceiveResourceData(unsigned long identifier) 191 { 192 pushCurrentRecord(TimelineRecordFactory::createReceiveResourceData(m_frontend, identifier), ReceiveResourceDataTimelineRecordType); 193 } 194 195 void InspectorTimelineAgent::didReceiveResourceData() 196 { 197 didCompleteCurrentRecord(ReceiveResourceDataTimelineRecordType); 198 } 199 200 void InspectorTimelineAgent::willReceiveResourceResponse(unsigned long identifier, const ResourceResponse& response) 201 { 202 pushCurrentRecord(TimelineRecordFactory::createResourceReceiveResponseData(m_frontend, identifier, response), ResourceReceiveResponseTimelineRecordType); 203 } 204 205 void InspectorTimelineAgent::didReceiveResourceResponse() 206 { 207 didCompleteCurrentRecord(ResourceReceiveResponseTimelineRecordType); 196 208 } 197 209 -
trunk/WebCore/inspector/InspectorTimelineAgent.h
r55277 r56108 65 65 ResourceFinishTimelineRecordType = 14, 66 66 FunctionCallTimelineRecordType = 15, 67 ReceiveResourceDataTimelineRecordType = 16, 67 68 }; 68 69 … … 110 111 111 112 void willSendResourceRequest(unsigned long, bool isMainResource, const ResourceRequest&); 112 void didReceiveResourceResponse(unsigned long, const ResourceResponse&); 113 void willReceiveResourceResponse(unsigned long, const ResourceResponse&); 114 void didReceiveResourceResponse(); 113 115 void didFinishLoadingResource(unsigned long, bool didFail); 114 116 void willReceiveResourceData(unsigned long identifier); 117 void didReceiveResourceData(); 118 115 119 static int instanceCount() { return s_instanceCount; } 116 120 static InspectorTimelineAgent* retrieve(ScriptExecutionContext*); -
trunk/WebCore/inspector/TimelineRecordFactory.cpp
r55277 r56108 149 149 } 150 150 151 ScriptObject TimelineRecordFactory::createReceiveResourceData(InspectorFrontend* frontend, unsigned long identifier) 152 { 153 ScriptObject data = frontend->newScriptObject(); 154 data.set("identifier", identifier); 155 return data; 156 } 157 151 158 ScriptObject TimelineRecordFactory::createPaintData(InspectorFrontend* frontend, const IntRect& rect) 152 159 { -
trunk/WebCore/inspector/TimelineRecordFactory.h
r55277 r56108 68 68 static ScriptObject createResourceReceiveResponseData(InspectorFrontend*, unsigned long identifier, const ResourceResponse&); 69 69 70 static ScriptObject createReceiveResourceData(InspectorFrontend*, unsigned long identifier); 71 70 72 static ScriptObject createResourceFinishData(InspectorFrontend*, unsigned long identifier, bool didFail); 71 73 -
trunk/WebCore/inspector/front-end/TimelineAgent.js
r55277 r56108 50 50 ResourceReceiveResponse : 13, 51 51 ResourceFinish : 14, 52 FunctionCall : 15 52 FunctionCall : 15, 53 ResourceReceiveData: 16 53 54 }; 54 55 -
trunk/WebCore/inspector/front-end/TimelinePanel.js
r56103 r56108 79 79 this._createStatusbarButtons(); 80 80 81 this._r ecords = [];81 this._rootRecord = this._createRootRecord(); 82 82 this._sendRequestRecords = {}; 83 83 this._timerRecords = {}; … … 141 141 recordStyles[recordTypes.ResourceFinish] = { title: WebInspector.UIString("Finish Loading"), category: this.categories.loading }; 142 142 recordStyles[recordTypes.FunctionCall] = { title: WebInspector.UIString("Function Call"), category: this.categories.scripting }; 143 recordStyles[recordTypes.ResourceReceiveData] = { title: WebInspector.UIString("Receive Data"), category: this.categories.loading }; 143 144 this._recordStylesArray = recordStyles; 144 145 } … … 186 187 } 187 188 } 188 this._innerAddRecordToTimeline(record, this._r ecords);189 this._innerAddRecordToTimeline(record, this._rootRecord); 189 190 this._scheduleRefresh(); 190 191 }, 191 192 192 _innerAddRecordToTimeline: function(record, collection) 193 { 194 var formattedRecord = new WebInspector.TimelinePanel.FormattedRecord(record, this._recordStyles, this._sendRequestRecords, this._timerRecords); 193 _findParentRecord: function(record) 194 { 195 var recordTypes = WebInspector.TimelineAgent.RecordType; 196 var parentRecord; 197 if (record.type === recordTypes.ResourceReceiveResponse || 198 record.type === recordTypes.ResourceFinish || 199 record.type === recordTypes.ResourceReceiveData) 200 parentRecord = this._sendRequestRecords[record.data.identifier]; 201 else if (record.type === recordTypes.TimerFire) 202 parentRecord = this._timerRecords[record.data.timerId]; 203 return parentRecord; 204 }, 205 206 _innerAddRecordToTimeline: function(record, parentRecord) 207 { 208 var connectedToOldRecord = false; 209 if (parentRecord === this._rootRecord) { 210 var newParentRecord = this._findParentRecord(record); 211 if (newParentRecord) { 212 parentRecord = newParentRecord; 213 connectedToOldRecord = true; 214 } 215 } 216 217 var formattedRecord = new WebInspector.TimelinePanel.FormattedRecord(record, parentRecord, this._recordStyles, this._sendRequestRecords, this._timerRecords); 218 if (parentRecord === this._rootRecord) 219 formattedRecord.collapsed = true; 195 220 196 221 // Glue subsequent records with same category and title together if they are closer than 100ms to each other. 197 if (this._lastRecord && (!record.children || !record.children.length) && 198 this._lastRecord.category == formattedRecord.category && 199 this._lastRecord.title == formattedRecord.title && 200 this._lastRecord.details == formattedRecord.details && 201 this._lastRecord.callerScriptName == formattedRecord.callerScriptName && 202 this._lastRecord.callerScriptLine == formattedRecord.callerScriptLine && 203 formattedRecord.startTime - this._lastRecord.endTime < 0.1) { 204 this._lastRecord.endTime = formattedRecord.endTime; 205 this._lastRecord.count++; 222 var lastRecord = parentRecord._lastRecord; 223 if (lastRecord && (!record.children || !record.children.length) && 224 lastRecord.category == formattedRecord.category && 225 lastRecord.title == formattedRecord.title && 226 lastRecord.details == formattedRecord.details && 227 lastRecord.callerScriptName == formattedRecord.callerScriptName && 228 lastRecord.callerScriptLine == formattedRecord.callerScriptLine && 229 formattedRecord.startTime - lastRecord.endTime < 0.1) { 230 lastRecord.endTime = formattedRecord.endTime; 231 lastRecord.count++; 206 232 } else { 207 collection.push(formattedRecord); 208 for (var i = 0; record.children && i < record.children.length; ++i) { 209 if (!formattedRecord.children) 210 formattedRecord.children = []; 211 var formattedChild = this._innerAddRecordToTimeline(record.children[i], formattedRecord.children); 212 formattedChild.parent = formattedRecord; 233 for (var i = 0; record.children && i < record.children.length; ++i) 234 this._innerAddRecordToTimeline(record.children[i], formattedRecord); 235 parentRecord._lastRecord = record.children && record.children.length ? null : formattedRecord; 236 } 237 238 if (connectedToOldRecord) { 239 var record = formattedRecord; 240 while (record.parent && record.parent._lastChildEndTime < record._lastChildEndTime) { 241 record.parent._lastChildEndTime = record._lastChildEndTime; 242 record = record.parent; 213 243 } 214 this._lastRecord = record.children && record.children.length ? null : formattedRecord; 215 } 216 return formattedRecord; 244 } 217 245 }, 218 246 … … 231 259 }, 232 260 233 resize: function() { 261 resize: function() 262 { 234 263 this._closeRecordDetails(); 235 264 this._scheduleRefresh(); 236 265 }, 237 266 267 _createRootRecord: function() 268 { 269 var rootRecord = {}; 270 rootRecord.children = []; 271 rootRecord._lastRecord = null; 272 return rootRecord; 273 }, 274 238 275 _clearPanel: function() 239 276 { 240 this._lastRecord = null;241 277 this._sendRequestRecords = {}; 242 278 this._timerRecords = {}; 243 this._r ecords = [];279 this._rootRecord = this._createRootRecord(); 244 280 this._boundariesAreValid = false; 245 281 this._overviewPane.reset(); … … 305 341 306 342 if (!this._boundariesAreValid) 307 this._overviewPane.update(this._r ecords);343 this._overviewPane.update(this._rootRecord.children); 308 344 this._refreshRecords(!this._boundariesAreValid); 309 345 this._boundariesAreValid = true; … … 317 353 this._calculator.windowRight = this._overviewPane.windowRight; 318 354 319 for (var i = 0; i < this._r ecords.length; ++i)320 this._calculator.updateBoundaries(this._r ecords[i]);355 for (var i = 0; i < this._rootRecord.children.length; ++i) 356 this._calculator.updateBoundaries(this._rootRecord.children[i]); 321 357 322 358 this._calculator.calculateWindow(); … … 324 360 325 361 var recordsInWindow = []; 326 for (var i = 0; i < this._r ecords.length; ++i) {327 var record = this._r ecords[i];362 for (var i = 0; i < this._rootRecord.children.length; ++i) { 363 var record = this._rootRecord.children[i]; 328 364 var percentages = this._calculator.computeBarGraphPercentages(record); 329 if (percentages.start < 100 && percentages.end >= 0 && !record.category.hidden)365 if (percentages.start < 100 && percentages.endWithChildren >= 0 && !record.category.hidden) 330 366 this._addToRecordsWindow(record, recordsInWindow); 331 367 } … … 408 444 if (!record.collapsed) { 409 445 var index = recordsWindow.length; 410 for (var i = 0; record.children &&i < record.children.length; ++i)446 for (var i = 0; i < record.children.length; ++i) 411 447 this._addToRecordsWindow(record.children[i], recordsWindow); 412 448 record.visibleChildrenCount = recordsWindow.length - index; … … 462 498 var start = (record.startTime - this.minimumBoundary) / this.boundarySpan * 100; 463 499 var end = (record.endTime - this.minimumBoundary) / this.boundarySpan * 100; 464 return {start: start, end: end}; 500 var endWithChildren = (record._lastChildEndTime - this.minimumBoundary) / this.boundarySpan * 100; 501 return {start: start, end: end, endWithChildren: endWithChildren}; 502 }, 503 504 computeBarGraphWindowPosition: function(record, clientWidth, expandOffset) 505 { 506 const minWidth = 5; 507 const borderWidth = 4; 508 var workingArea = clientWidth - expandOffset - minWidth - borderWidth; 509 var percentages = this.computeBarGraphPercentages(record); 510 var left = percentages.start / 100 * workingArea; 511 var width = (percentages.end - percentages.start) / 100 * workingArea + minWidth; 512 var widthWithChildren = (percentages.endWithChildren - percentages.start) / 100 * workingArea; 513 if (percentages.endWithChildren > percentages.end) 514 widthWithChildren += borderWidth + minWidth; 515 return {left: left, width: width, widthWithChildren: widthWithChildren}; 465 516 }, 466 517 … … 484 535 this._absoluteMinimumBoundary = lowerBound; 485 536 486 var upperBound = record. endTime;537 var upperBound = record._lastChildEndTime; 487 538 if (this._absoluteMaximumBoundary === -1 || upperBound > this._absoluteMaximumBoundary) 488 539 this._absoluteMaximumBoundary = upperBound; … … 560 611 this.element.appendChild(this._barAreaElement); 561 612 613 this._barWithChildrenElement = document.createElement("div"); 614 this._barWithChildrenElement.className = "timeline-graph-bar with-children"; 615 this._barWithChildrenElement.row = this; 616 this._barAreaElement.appendChild(this._barWithChildrenElement); 617 562 618 this._barElement = document.createElement("div"); 563 619 this._barElement.className = "timeline-graph-bar"; … … 582 638 update: function(record, isEven, calculator, clientWidth, expandOffset, index) 583 639 { 584 const minWidth = 5;585 const borderWidth = 4;586 var workingArea = clientWidth - expandOffset - minWidth - borderWidth;587 640 this._record = record; 588 641 this.element.className = "timeline-graph-side timeline-category-" + record.category.name + (isEven ? " even" : ""); 589 var percentages = calculator.computeBarGraphPercentages(record); 590 var left = percentages.start / 100 * workingArea; 591 var width = (percentages.end - percentages.start) / 100 * workingArea; 592 width = width > minWidth ? width : minWidth; 593 this._barElement.style.left = (left + expandOffset) + "px"; 594 this._barElement.style.width = width + "px"; 595 596 if (record.visibleChildrenCount) { 642 var barPosition = calculator.computeBarGraphWindowPosition(record, clientWidth, expandOffset); 643 this._barWithChildrenElement.style.left = barPosition.left + expandOffset + "px"; 644 this._barWithChildrenElement.style.width = barPosition.widthWithChildren + "px"; 645 this._barElement.style.left = barPosition.left + expandOffset + "px"; 646 this._barElement.style.width = barPosition.width + "px"; 647 648 if (record.children.length) { 597 649 this._expandElement.style.top = index * this._rowHeight + "px"; 598 this._expandElement.style.left = left + "px";599 this._expandElement.style.width = Math.max(12, width + 25) + "px";650 this._expandElement.style.left = barPosition.left + "px"; 651 this._expandElement.style.width = Math.max(12, barPosition.width + 25) + "px"; 600 652 if (!record.collapsed) { 601 653 this._expandElement.style.height = (record.visibleChildrenCount + 1) * this._rowHeight + "px"; … … 626 678 } 627 679 628 WebInspector.TimelinePanel.FormattedRecord = function(record, recordStyles, sendRequestRecords, timerRecords)680 WebInspector.TimelinePanel.FormattedRecord = function(record, parentRecord, recordStyles, sendRequestRecords, timerRecords) 629 681 { 630 682 var recordTypes = WebInspector.TimelineAgent.RecordType; 631 683 var style = recordStyles[record.type]; 632 684 685 this.parent = parentRecord; 686 parentRecord.children.push(this); 633 687 this.category = style.category; 634 688 this.title = style.title; … … 638 692 this.type = record.type; 639 693 this.endTime = (typeof record.endTime !== "undefined") ? record.endTime / 1000 : this.startTime; 694 this._lastChildEndTime = this.endTime; 640 695 this.originalRecordForTests = record; 641 696 this.callerScriptName = record.callerScriptName; … … 648 703 var sendRequestRecord = sendRequestRecords[record.data.identifier]; 649 704 if (sendRequestRecord) { // False if we started instrumentation in the middle of request. 650 sendRequestRecord._responseReceivedFormattedTime = this.startTime;651 705 record.data.url = sendRequestRecord.data.url; 652 this.startTime = sendRequestRecord.startTime;653 706 // Now that we have resource in the collection, recalculate details in order to display short url. 654 707 sendRequestRecord.details = this._getRecordDetails(sendRequestRecord, sendRequestRecords); 655 this.callerScriptName = sendRequestRecord.callerScriptName; 656 this.callerScriptLine = sendRequestRecord.callerScriptLine; 657 } 708 } 709 } else if (record.type === recordTypes.ResourceReceiveData) { 710 var sendRequestRecord = sendRequestRecords[record.data.identifier]; 711 if (sendRequestRecord) // False for main resource. 712 record.data.url = sendRequestRecord.data.url; 658 713 } else if (record.type === recordTypes.ResourceFinish) { 659 714 var sendRequestRecord = sendRequestRecords[record.data.identifier]; 660 if (sendRequestRecord) {// False for main resource.715 if (sendRequestRecord) // False for main resource. 661 716 record.data.url = sendRequestRecord.data.url; 662 this.startTime = sendRequestRecord._responseReceivedFormattedTime;663 this.callerScriptName = sendRequestRecord.callerScriptName;664 this.callerScriptLine = sendRequestRecord.callerScriptLine;665 }666 717 } else if (record.type === recordTypes.TimerInstall) { 667 718 this.timeout = record.data.timeout; … … 693 744 }, 694 745 746 get children() 747 { 748 if (!this._children) 749 this._children = []; 750 return this._children; 751 }, 752 695 753 _createRow: function(title, content) 696 754 { … … 729 787 this.type === recordTypes.TimerRemove) { 730 788 recordContentTable.appendChild(this._createRow(WebInspector.UIString("Timer Id"), this.data.timerId)); 731 if (t his.timeout) {789 if (typeof this.timeout === "number") { 732 790 recordContentTable.appendChild(this._createRow(WebInspector.UIString("Timeout"), this.timeout)); 733 791 recordContentTable.appendChild(this._createRow(WebInspector.UIString("Repeats"), !this.singleShot)); 734 792 } 735 if (t his.callSiteScriptLine) {793 if (typeof this.callSiteScriptLine === "number") { 736 794 var link = WebInspector.linkifyResourceAsNode(this.callSiteScriptName, "scripts", this.callSiteScriptLine, "timeline-details"); 737 795 recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Call Site"), link)); … … 740 798 var link = WebInspector.linkifyResourceAsNode(this.data.scriptName, "scripts", this.data.scriptLine, "timeline-details"); 741 799 recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Location"), link)); 742 } else if (this.type === recordTypes.ResourceSendRequest || this.type === recordTypes.ResourceReceiveResponse || this.type === recordTypes.ResourceFinish) { 800 } else if (this.type === recordTypes.ResourceSendRequest || 801 this.type === recordTypes.ResourceReceiveResponse || 802 this.type === recordTypes.ResourceReceiveData || 803 this.type === recordTypes.ResourceFinish) { 743 804 var link = WebInspector.linkifyResourceAsNode(this.data.url, "resources", null, "timeline-details"); 744 805 recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Resource"), link)); 806 if (this.data.requestMethod) 807 recordContentTable.appendChild(this._createRow(WebInspector.UIString("Request Method"), this.data.requestMethod)); 808 if (typeof this.data.statusCode === "number") 809 recordContentTable.appendChild(this._createRow(WebInspector.UIString("Status Code"), this.data.statusCode)); 810 if (this.data.mimeType) 811 recordContentTable.appendChild(this._createRow(WebInspector.UIString("Mime Type"), this.data.mimeType)); 812 if (typeof this.data.expectedContentLength === "number" && this.data.expectedContentLength !== -1) 813 recordContentTable.appendChild(this._createRow(WebInspector.UIString("Expected Content Length"), this.data.expectedContentLength)); 745 814 } else if (this.type === recordTypes.EvaluateScript) { 746 815 var link = WebInspector.linkifyResourceAsNode(this.data.url, "scripts", null, "timeline-details"); … … 777 846 case WebInspector.TimelineAgent.RecordType.EvaluateScript: 778 847 case WebInspector.TimelineAgent.RecordType.ResourceSendRequest: 848 case WebInspector.TimelineAgent.RecordType.ResourceReceiveData: 779 849 case WebInspector.TimelineAgent.RecordType.ResourceReceiveResponse: 780 850 case WebInspector.TimelineAgent.RecordType.ResourceFinish: -
trunk/WebCore/inspector/front-end/inspector.css
r55790 r56108 3596 3596 } 3597 3597 3598 .timeline-graph-bar.with-children { 3599 opacity: 0.3; 3600 } 3601 3598 3602 .timeline-graph-side.even { 3599 3603 background-color: rgba(0, 0, 0, 0.05); -
trunk/WebCore/loader/ResourceLoader.cpp
r55738 r56108 35 35 #include "Frame.h" 36 36 #include "FrameLoader.h" 37 #include "InspectorTimelineAgent.h" 37 38 #include "Page.h" 38 39 #include "ProgressTracker.h" … … 398 399 void ResourceLoader::didReceiveResponse(ResourceHandle*, const ResourceResponse& response) 399 400 { 401 #if ENABLE(INSPECTOR) 402 if (InspectorTimelineAgent::instanceCount()) { 403 InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0; 404 if (timelineAgent) 405 timelineAgent->willReceiveResourceResponse(identifier(), response); 406 } 407 #endif 400 408 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 401 409 if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForResponse(this, response)) … … 403 411 #endif 404 412 didReceiveResponse(response); 413 #if ENABLE(INSPECTOR) 414 if (InspectorTimelineAgent::instanceCount()) { 415 InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0; 416 if (timelineAgent) 417 timelineAgent->didReceiveResourceResponse(); 418 } 419 #endif 405 420 } 406 421 407 422 void ResourceLoader::didReceiveData(ResourceHandle*, const char* data, int length, int lengthReceived) 408 423 { 424 #if ENABLE(INSPECTOR) 425 if (InspectorTimelineAgent::instanceCount()) { 426 InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0; 427 if (timelineAgent) 428 timelineAgent->willReceiveResourceData(identifier()); 429 } 430 #endif 409 431 didReceiveData(data, length, lengthReceived, false); 432 #if ENABLE(INSPECTOR) 433 if (InspectorTimelineAgent::instanceCount()) { 434 InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0; 435 if (timelineAgent) 436 timelineAgent->didReceiveResourceData(); 437 } 438 #endif 410 439 } 411 440
Note: See TracChangeset
for help on using the changeset viewer.