| 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 */ | 668 */ |
| 669 _arrayLength(array) { | 669 _arrayLength(array) { |
| 670 return array ? '' + array.length : ''; | 670 return array ? '' + array.length : ''; |
| 671 } | 671 } |
| 672 | 672 |
| 673 /** | 673 /** |
| 674 * @override | 674 * @override |
| 675 * @protected | 675 * @protected |
| 676 */ | 676 */ |
| 677 willAttach() { | 677 willAttach() { |
| 678 super.willAttach(); |
| 678 if (this._initiatorCell && | 679 if (this._initiatorCell && |
| 679 SDK.NetworkLog.initiatorInfoForRequest(this._request).type === SDK.Netwo
rkRequest.InitiatorType.Script) | 680 SDK.NetworkLog.initiatorInfoForRequest(this._request).type === SDK.Netwo
rkRequest.InitiatorType.Script) |
| 680 this._initiatorCell.insertBefore(this._linkifiedInitiatorAnchor, this._ini
tiatorCell.firstChild); | 681 this._initiatorCell.insertBefore(this._linkifiedInitiatorAnchor, this._ini
tiatorCell.firstChild); |
| 681 } | 682 } |
| 682 | 683 |
| 683 /** | 684 /** |
| 684 * @override | 685 * @override |
| 685 */ | 686 */ |
| 686 wasDetached() { | 687 wasDetached() { |
| 687 if (this._linkifiedInitiatorAnchor) | 688 if (this._linkifiedInitiatorAnchor) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 * @return {boolean} | 725 * @return {boolean} |
| 725 */ | 726 */ |
| 726 _isFailed() { | 727 _isFailed() { |
| 727 return (this._request.failed && !this._request.statusCode) || (this._request
.statusCode >= 400); | 728 return (this._request.failed && !this._request.statusCode) || (this._request
.statusCode >= 400); |
| 728 } | 729 } |
| 729 | 730 |
| 730 /** | 731 /** |
| 731 * @param {!Element} cell | 732 * @param {!Element} cell |
| 732 */ | 733 */ |
| 733 _renderNameCell(cell) { | 734 _renderNameCell(cell) { |
| 734 var leftPadding = this.leftPadding ? this.leftPadding + 'px' : ''; | |
| 735 cell.style.setProperty('padding-left', leftPadding); | |
| 736 this._nameCell = cell; | 735 this._nameCell = cell; |
| 737 cell.addEventListener('dblclick', this._openInNewTab.bind(this), false); | 736 cell.addEventListener('dblclick', this._openInNewTab.bind(this), false); |
| 738 var iconElement; | 737 var iconElement; |
| 739 if (this._request.resourceType() === Common.resourceTypes.Image) { | 738 if (this._request.resourceType() === Common.resourceTypes.Image) { |
| 740 var previewImage = createElementWithClass('img', 'image-network-icon-previ
ew'); | 739 var previewImage = createElementWithClass('img', 'image-network-icon-previ
ew'); |
| 741 this._request.populateImageSource(previewImage); | 740 this._request.populateImageSource(previewImage); |
| 742 | 741 |
| 743 iconElement = createElementWithClass('div', 'icon'); | 742 iconElement = createElementWithClass('div', 'icon'); |
| 744 iconElement.appendChild(previewImage); | 743 iconElement.appendChild(previewImage); |
| 745 } else { | 744 } else { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 } | 947 } |
| 949 | 948 |
| 950 /** | 949 /** |
| 951 * @override | 950 * @override |
| 952 * @param {string} columnIdentifier | 951 * @param {string} columnIdentifier |
| 953 * @return {!Element} | 952 * @return {!Element} |
| 954 */ | 953 */ |
| 955 createCell(columnIdentifier) { | 954 createCell(columnIdentifier) { |
| 956 var cell = this.createTD(columnIdentifier); | 955 var cell = this.createTD(columnIdentifier); |
| 957 if (columnIdentifier === 'name') { | 956 if (columnIdentifier === 'name') { |
| 958 var leftPadding = this.leftPadding ? this.leftPadding + 'px' : ''; | |
| 959 cell.style.setProperty('padding-left', leftPadding); | |
| 960 cell.classList.add('disclosure'); | 957 cell.classList.add('disclosure'); |
| 961 this._setTextAndTitle(cell, this._displayName); | 958 this._setTextAndTitle(cell, this._displayName); |
| 962 } | 959 } |
| 963 return cell; | 960 return cell; |
| 964 } | 961 } |
| 965 | 962 |
| 966 /** | 963 /** |
| 967 * @override | 964 * @override |
| 968 * @param {boolean=} supressSelectedEvent | 965 * @param {boolean=} supressSelectedEvent |
| 969 */ | 966 */ |
| 970 select(supressSelectedEvent) { | 967 select(supressSelectedEvent) { |
| 971 if (this.expanded) { | 968 if (this.expanded) { |
| 972 this.collapse(); | 969 this.collapse(); |
| 973 return; | 970 return; |
| 974 } | 971 } |
| 975 this.expand(); | 972 this.expand(); |
| 976 } | 973 } |
| 977 }; | 974 }; |
| OLD | NEW |