| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2495 * @param {!WebInspector.NetworkRequest} request | 2495 * @param {!WebInspector.NetworkRequest} request |
| 2496 */ | 2496 */ |
| 2497 WebInspector.NetworkDataGridNode = function(parentView, request) | 2497 WebInspector.NetworkDataGridNode = function(parentView, request) |
| 2498 { | 2498 { |
| 2499 WebInspector.SortableDataGridNode.call(this, {}); | 2499 WebInspector.SortableDataGridNode.call(this, {}); |
| 2500 this._parentView = parentView; | 2500 this._parentView = parentView; |
| 2501 this._request = request; | 2501 this._request = request; |
| 2502 this._linkifier = new WebInspector.Linkifier(); | 2502 this._linkifier = new WebInspector.Linkifier(); |
| 2503 this._isFilteredOut = true; | 2503 this._isFilteredOut = true; |
| 2504 this._isMatchingSearchQuery = false; | 2504 this._isMatchingSearchQuery = false; |
| 2505 this._type = null; |
| 2505 } | 2506 } |
| 2506 | 2507 |
| 2507 WebInspector.NetworkDataGridNode.prototype = { | 2508 WebInspector.NetworkDataGridNode.prototype = { |
| 2508 /** | 2509 /** |
| 2509 * @override | 2510 * @override |
| 2510 * @return {number} | 2511 * @return {number} |
| 2511 */ | 2512 */ |
| 2512 nodeSelfHeight: function() { | 2513 nodeSelfHeight: function() { |
| 2513 return this._parentView.rowHeight(); | 2514 return this._parentView.rowHeight(); |
| 2514 }, | 2515 }, |
| 2515 | 2516 |
| 2516 /** override */ | 2517 /** override */ |
| 2517 createCells: function() | 2518 createCells: function() |
| 2518 { | 2519 { |
| 2519 this._nameCell = null; | 2520 this._nameCell = null; |
| 2520 this._timelineCell = null; | 2521 this._timelineCell = null; |
| 2521 | 2522 |
| 2522 var element = this._element; | 2523 var element = this._element; |
| 2523 element.classList.toggle("network-error-row", this._isFailed()); | 2524 element.classList.toggle("network-error-row", this._isFailed()); |
| 2524 element.classList.toggle("resource-cached", this._request.cached); | 2525 element.classList.toggle("resource-cached", this._request.cached); |
| 2525 var typeClassName = "network-type-" + this._request.type.name(); | 2526 var type = this._request.type.name(); |
| 2526 if (!element.classList.contains(typeClassName)) { | 2527 if (type != this._type) { |
| 2527 element.removeMatchingStyleClasses("network-type-\\w+"); | 2528 if (this._type) |
| 2528 element.classList.add(typeClassName); | 2529 element.classList.remove(this._type); |
| 2530 this._type = type; |
| 2531 element.classList.add(this._type); |
| 2529 } | 2532 } |
| 2530 | 2533 |
| 2531 WebInspector.SortableDataGridNode.prototype.createCells.call(this); | 2534 WebInspector.SortableDataGridNode.prototype.createCells.call(this); |
| 2532 | 2535 |
| 2533 this.refreshGraph(this._parentView.calculator()); | 2536 this.refreshGraph(this._parentView.calculator()); |
| 2534 }, | 2537 }, |
| 2535 | 2538 |
| 2536 /** | 2539 /** |
| 2537 * @override | 2540 * @override |
| 2538 * @param {string} columnIdentifier | 2541 * @param {string} columnIdentifier |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3038 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) | 3041 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) |
| 3039 { | 3042 { |
| 3040 var aValue = a._request[propertyName]; | 3043 var aValue = a._request[propertyName]; |
| 3041 var bValue = b._request[propertyName]; | 3044 var bValue = b._request[propertyName]; |
| 3042 if (aValue > bValue) | 3045 if (aValue > bValue) |
| 3043 return revert ? -1 : 1; | 3046 return revert ? -1 : 1; |
| 3044 if (bValue > aValue) | 3047 if (bValue > aValue) |
| 3045 return revert ? 1 : -1; | 3048 return revert ? 1 : -1; |
| 3046 return a._request.indentityCompare(b._request); | 3049 return a._request.indentityCompare(b._request); |
| 3047 } | 3050 } |
| OLD | NEW |