Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(888)

Side by Side Diff: Source/WebCore/inspector/front-end/NetworkPanel.js

Issue 6366026: Merge 76483 - 2011-01-23 Andrey Kosyakov <caseq@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 WebInspector.Panel.prototype.resize.call(this); 111 WebInspector.Panel.prototype.resize.call(this);
112 this._dataGrid.updateWidths(); 112 this._dataGrid.updateWidths();
113 this._positionSummaryBar(); 113 this._positionSummaryBar();
114 }, 114 },
115 115
116 updateSidebarWidth: function(width) 116 updateSidebarWidth: function(width)
117 { 117 {
118 if (!this._viewingResourceMode) 118 if (!this._viewingResourceMode)
119 return; 119 return;
120 WebInspector.Panel.prototype.updateSidebarWidth.call(this, width); 120 WebInspector.Panel.prototype.updateSidebarWidth.call(this, width);
121 if (this._summaryBarElement.parentElement === this.element)
122 this._summaryBarElement.style.width = width + "px";
123 }, 121 },
124 122
125 updateMainViewWidth: function(width) 123 updateMainViewWidth: function(width)
126 { 124 {
127 this._viewsContainerElement.style.left = width + "px"; 125 this._viewsContainerElement.style.left = width + "px";
128 }, 126 },
129 127
130 handleShortcut: function(event) 128 handleShortcut: function(event)
131 { 129 {
132 if (this._viewingResourceMode && event.keyCode === WebInspector.Keyboard Shortcut.Keys.Esc.code) { 130 if (this._viewingResourceMode && event.keyCode === WebInspector.Keyboard Shortcut.Keys.Esc.code) {
133 this._toggleGridMode(); 131 this._toggleGridMode();
134 event.handled = true; 132 event.handled = true;
135 } 133 }
136 }, 134 },
137 135
138 _positionSummaryBar: function() 136 _positionSummaryBar: function()
139 { 137 {
140 // Position the total bar. 138 // Position the total bar.
141 139
142 var fillerRow = this._dataGrid.dataTableBody.lastChild; 140 var fillerRow = this._dataGrid.dataTableBody.lastChild;
143 if (this._summaryBarElement.parentElement !== this.element && fillerRow. offsetHeight > 0) { 141 if (this._summaryBarElement.parentElement !== this.element && fillerRow. offsetHeight > 0) {
144 // Glue status to bottom. 142 // Glue status to bottom.
145 if (this._summaryBarRowNode) { 143 if (this._summaryBarRowNode) {
146 this._dataGrid.removeChild(this._summaryBarRowNode); 144 this._dataGrid.removeChild(this._summaryBarRowNode);
147 delete this._summaryBarRowNode; 145 delete this._summaryBarRowNode;
148 } 146 }
149 this._summaryBarElement.addStyleClass("network-summary-bar-bottom"); 147 this._summaryBarElement.addStyleClass("network-summary-bar-bottom");
150 this._summaryBarElement.style.setProperty("width", this.sidebarEleme nt.offsetWidth + "px");
151 this.element.appendChild(this._summaryBarElement); 148 this.element.appendChild(this._summaryBarElement);
152 this._dataGrid.element.style.bottom = "20px"; 149 this._dataGrid.element.style.bottom = "20px";
153 return; 150 return;
154 } 151 }
155 152
156 if (!this._summaryBarRowNode && !fillerRow.offsetHeight) { 153 if (!this._summaryBarRowNode && !fillerRow.offsetHeight) {
157 // Glue status to table. 154 // Glue status to table.
158 this._summaryBarRowNode = new WebInspector.NetworkTotalGridNode(this ._summaryBarElement); 155 this._summaryBarRowNode = new WebInspector.NetworkTotalGridNode(this ._summaryBarElement);
159 this._summaryBarElement.removeStyleClass("network-summary-bar-bottom "); 156 this._summaryBarElement.removeStyleClass("network-summary-bar-bottom ");
160 this._summaryBarElement.style.removeProperty("width");
161 this._dataGrid.appendChild(this._summaryBarRowNode); 157 this._dataGrid.appendChild(this._summaryBarRowNode);
162 this._dataGrid.element.style.bottom = 0; 158 this._dataGrid.element.style.bottom = 0;
163 this._sortItems(); 159 this._sortItems();
164 } 160 }
165 }, 161 },
166 162
167 _resetSummaryBar: function() 163 _resetSummaryBar: function()
168 { 164 {
169 delete this._summaryBarRowNode; 165 delete this._summaryBarRowNode;
170 this._summaryBarElement.parentElement.removeChild(this._summaryBarElemen t); 166 this._summaryBarElement.parentElement.removeChild(this._summaryBarElemen t);
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 922
927 _toggleGridMode: function() 923 _toggleGridMode: function()
928 { 924 {
929 if (this._viewingResourceMode) { 925 if (this._viewingResourceMode) {
930 this._viewingResourceMode = false; 926 this._viewingResourceMode = false;
931 this.element.removeStyleClass("viewing-resource"); 927 this.element.removeStyleClass("viewing-resource");
932 this._dataGrid.element.removeStyleClass("viewing-resource-mode"); 928 this._dataGrid.element.removeStyleClass("viewing-resource-mode");
933 this._viewsContainerElement.addStyleClass("hidden"); 929 this._viewsContainerElement.addStyleClass("hidden");
934 this.sidebarElement.style.right = 0; 930 this.sidebarElement.style.right = 0;
935 this.sidebarElement.style.removeProperty("width"); 931 this.sidebarElement.style.removeProperty("width");
936 this._summaryBarElement.style.removeProperty("width");
937 if (this._dataGrid.selectedNode) 932 if (this._dataGrid.selectedNode)
938 this._dataGrid.selectedNode.selected = false; 933 this._dataGrid.selectedNode.selected = false;
939 } 934 }
940 935
941 if (this._briefGrid) { 936 if (this._briefGrid) {
942 this._dataGrid.element.removeStyleClass("full-grid-mode"); 937 this._dataGrid.element.removeStyleClass("full-grid-mode");
943 this._dataGrid.element.addStyleClass("brief-grid-mode"); 938 this._dataGrid.element.addStyleClass("brief-grid-mode");
944 939
945 this._dataGrid.hideColumn("method"); 940 this._dataGrid.hideColumn("method");
946 this._dataGrid.hideColumn("status"); 941 this._dataGrid.hideColumn("status");
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 { 1667 {
1673 var td = document.createElement("td"); 1668 var td = document.createElement("td");
1674 td.setAttribute("colspan", 7); 1669 td.setAttribute("colspan", 7);
1675 td.className = "network-summary"; 1670 td.className = "network-summary";
1676 td.appendChild(this._summaryBarElement); 1671 td.appendChild(this._summaryBarElement);
1677 this._element.appendChild(td); 1672 this._element.appendChild(td);
1678 } 1673 }
1679 } 1674 }
1680 1675
1681 WebInspector.NetworkTotalGridNode.prototype.__proto__ = WebInspector.DataGridNod e.prototype; 1676 WebInspector.NetworkTotalGridNode.prototype.__proto__ = WebInspector.DataGridNod e.prototype;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698