Changeset 94287 in webkit
- Timestamp:
- Sep 1, 2011 5:16:10 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r94286 r94287 1 2011-09-01 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Network error messages in console should link to the respective request in network panel if there is one. 4 https://bugs.webkit.org/show_bug.cgi?id=65550 5 6 Reviewed by Yury Semikhatsky. 7 8 * http/tests/inspector/console-resource-errors-expected.txt: 9 * http/tests/inspector/console-xhr-logging-expected.txt: 10 1 11 2011-09-01 Cary Clark <caryclark@google.com> 2 12 -
trunk/LayoutTests/http/tests/inspector/console-resource-errors-expected.txt
r82106 r94287 2 2 3 3 4 missing.cssGET http://127.0.0.1:8000/inspector/missing.css 404 (Not Found) console-message console-error-level5 non-existent-iframe.htmlGET http://127.0.0.1:8000/inspector/non-existent-iframe.html 404 (Not Found) console-message console-error-level6 non-existent-script.jsGET http://127.0.0.1:8000/inspector/non-existent-script.js 404 (Not Found) console-message console-error-level7 non-existent-xhrGET http://127.0.0.1:8000/inspector/non-existent-xhr 404 (Not Found) console-message console-error-level4 GET http://127.0.0.1:8000/inspector/missing.css 404 (Not Found) console-message console-error-level 5 GET http://127.0.0.1:8000/inspector/non-existent-iframe.html 404 (Not Found) console-message console-error-level 6 GET http://127.0.0.1:8000/inspector/non-existent-script.js 404 (Not Found) console-message console-error-level 7 GET http://127.0.0.1:8000/inspector/non-existent-xhr 404 (Not Found) console-message console-error-level 8 8 -
trunk/LayoutTests/http/tests/inspector/console-xhr-logging-expected.txt
r92698 r94287 14 14 XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-exists.html". 15 15 console-xhr-logging.html:10sending a GET request to resources/xhr-does-not-exist.html 16 resources/xhr-does-not-exist.htmlGET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found)16 GET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found) 17 17 XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html". 18 18 console-xhr-logging.html:10sending a POST request to resources/post-target.cgi … … 22 22 console-xhr-logging.html:10sending a GET request to resources/xhr-exists.html 23 23 console-xhr-logging.html:10sending a GET request to resources/xhr-does-not-exist.html 24 resources/xhr-does-not-exist.htmlGET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found)24 GET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found) 25 25 console-xhr-logging.html:10sending a POST request to resources/post-target.cgi 26 26 console-xhr-logging.html:10sending a GET request to http://localhost:8000/inspector/resources/xhr-exists.html -
trunk/Source/WebCore/ChangeLog
r94284 r94287 1 2011-09-01 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Network error messages in console should link to the respective request in network panel if there is one. 4 https://bugs.webkit.org/show_bug.cgi?id=65550 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/front-end/ConsoleMessage.js: 9 (WebInspector.ConsoleMessage.prototype._formatMessage): 10 * inspector/front-end/NetworkPanel.js: 11 (WebInspector.NetworkLogView.prototype.refresh): 12 (WebInspector.NetworkLogView.prototype.switchToBriefView): 13 (WebInspector.NetworkLogView.prototype.searchCanceled): 14 (WebInspector.NetworkLogView.prototype.revealAndHighlightResource): 15 (WebInspector.NetworkLogView.prototype._removeAllNodeHighlights): 16 (WebInspector.NetworkLogView.prototype._highlightNode): 17 (WebInspector.NetworkPanel.prototype._resourceByAnchor): 18 (WebInspector.NetworkPanel.prototype.canShowAnchorLocation): 19 (WebInspector.NetworkPanel.prototype.showAnchorLocation): 20 * inspector/front-end/networkLogView.css: 21 (.network-log-grid tr.highlighted-row): 22 (from): 23 (to): 24 1 25 2011-09-01 Patrick Gansterer <paroga@webkit.org> 2 26 -
trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js
r93769 r94287 81 81 { 82 82 var stackTrace = this._stackTrace; 83 84 this._formattedMessage = document.createElement("span"); 85 this._formattedMessage.className = "console-message-text source-code"; 86 83 87 var messageText; 84 88 switch (this.type) { … … 95 99 messageText = document.createElement("span"); 96 100 messageText.appendChild(document.createTextNode(this._request.requestMethod + " ")); 97 messageText.appendChild(WebInspector.linkifyURLAsNode(this._request.url)); 101 var anchor = WebInspector.linkifyURLAsNode(this._request.url); 102 anchor.setAttribute("request_id", this._request.requestId); 103 anchor.setAttribute("preferred_panel", "network"); 104 messageText.appendChild(anchor); 98 105 if (this._request.failed) 99 106 messageText.appendChild(document.createTextNode(" " + this._request.localizedFailDescription)); 100 107 else 101 108 messageText.appendChild(document.createTextNode(" " + this._request.statusCode + " (" + this._request.statusText + ")")); 102 } else 109 } else { 110 var isExternal = !WebInspector.resourceForURL(this.url); 111 var anchor = WebInspector.linkifyURLAsNode(this.url, this.url, "console-message-url", isExternal); 112 this._formattedMessage.appendChild(anchor); 103 113 messageText = this._format([this._messageText]); 114 } 104 115 break; 105 116 case WebInspector.ConsoleMessage.MessageType.Assert: … … 120 131 } 121 132 122 this._formattedMessage = document.createElement("span"); 123 this._formattedMessage.className = "console-message-text source-code"; 124 125 if (this._stackTrace && this._stackTrace.length && this._stackTrace[0].url) { 126 var urlElement = this._linkifyCallFrame(this._stackTrace[0]); 127 this._formattedMessage.appendChild(urlElement); 128 } else if (this.url && this.url !== "undefined") { 129 var urlElement = this._linkifyLocation(this.url, this.line, 0); 130 this._formattedMessage.appendChild(urlElement); 133 if (this.type !== WebInspector.ConsoleMessage.MessageType.NetworkError) { 134 if (this._stackTrace && this._stackTrace.length && this._stackTrace[0].url) { 135 var urlElement = this._linkifyCallFrame(this._stackTrace[0]); 136 this._formattedMessage.appendChild(urlElement); 137 } else if (this.url && this.url !== "undefined") { 138 var urlElement = this._linkifyLocation(this.url, this.line, 0); 139 this._formattedMessage.appendChild(urlElement); 140 } 131 141 } 132 142 -
trunk/Source/WebCore/inspector/front-end/NetworkPanel.js
r93974 r94287 655 655 } 656 656 657 this._removeAllNodeHighlights(); 657 658 var wasScrolledToLastRow = this._dataGrid.isScrolledToLastRow(); 658 659 var staleItemsLength = this._staleResources.length; … … 849 850 { 850 851 this.element.addStyleClass("brief-mode"); 852 this._removeAllNodeHighlights(); 851 853 852 854 this._dataGrid.hideColumn("method"); … … 1223 1225 this._clearSearchMatchedList(); 1224 1226 this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.SearchCountUpdated, 0); 1227 }, 1228 1229 revealAndHighlightResource: function(resource) 1230 { 1231 this._removeAllNodeHighlights(); 1232 1233 var node = this._resourceGridNode(resource); 1234 if (node) { 1235 this._dataGrid.element.focus(); 1236 node.reveal(); 1237 this._highlightNode(node); 1238 } 1239 }, 1240 1241 _removeAllNodeHighlights: function(node, decoration) 1242 { 1243 if (this._highlightedNode) { 1244 this._highlightedNode.element.removeStyleClass("highlighted-row"); 1245 delete this._highlightedNode; 1246 } 1247 }, 1248 1249 _highlightNode: function(node) 1250 { 1251 node.element.addStyleClass("highlighted-row"); 1252 this._highlightedNode = node; 1225 1253 } 1226 1254 }; … … 1331 1359 }, 1332 1360 1361 _resourceByAnchor: function(anchor) 1362 { 1363 var resource; 1364 if (anchor.getAttribute("request_id")) 1365 resource = this.resourceById(anchor.getAttribute("request_id")); 1366 if (!resource) 1367 resource = this._resourcesByURL[anchor.href]; 1368 1369 return resource; 1370 }, 1371 1333 1372 canShowAnchorLocation: function(anchor) 1334 1373 { 1335 return !!this. resourceById(anchor.href);1374 return !!this._resourceByAnchor(anchor); 1336 1375 }, 1337 1376 1338 1377 showAnchorLocation: function(anchor) 1339 1378 { 1340 this._showResource(this._resourcesByURL[anchor.href]); 1379 var resource = this._resourceByAnchor(anchor); 1380 1381 this._toggleGridMode(); 1382 if (resource) 1383 this._networkLogView.revealAndHighlightResource(resource); 1341 1384 }, 1342 1385 -
trunk/Source/WebCore/inspector/front-end/networkLogView.css
r92184 r94287 124 124 .network-log-grid tr.selected .network-cell-subtitle { 125 125 color: white; 126 } 127 128 .network-log-grid tr.highlighted-row { 129 -webkit-animation: "fadeout" 2s 0s; 130 } 131 132 @-webkit-keyframes fadeout { 133 from {background-color: rgba(56, 121, 217, 1); } 134 to { background-color: rgba(56, 121, 217, 0); } 126 135 } 127 136
Note: See TracChangeset
for help on using the changeset viewer.