Changeset 135599 in webkit
- Timestamp:
- Nov 23, 2012 5:25:18 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r135598 r135599 1 2012-11-23 Eugene Klyuchnikov <eustas.bug@gmail.com> 2 3 Web Inspector: Refine JsDoc in ProfilesPanel.js 4 https://bugs.webkit.org/show_bug.cgi?id=103042 5 6 Reviewed by Yury Semikhatsky. 7 8 I'm going to make profiler output typed. 9 10 This will require some amount of refactoring. 11 12 Before refactoring I would like to make things 13 unambiguous by adding JsDoc where they are missing. 14 15 * inspector/front-end/ProfilesPanel.js: 16 (WebInspector.ProfilesPanel.prototype._onToggleProfiling): 17 Added to eliminate parameter type ambiguity. 18 1 19 2012-11-23 Kent Tamura <tkent@chromium.org> 2 20 -
trunk/Source/WebCore/inspector/front-end/CPUProfileView.js
r134550 r135599 631 631 * @constructor 632 632 * @extends {WebInspector.ProfileHeader} 633 * @param { WebInspector.CPUProfileType} type633 * @param {!WebInspector.CPUProfileType} type 634 634 * @param {string} title 635 635 * @param {number=} uid -
trunk/Source/WebCore/inspector/front-end/CSSSelectorProfileView.js
r133463 r135599 374 374 * @constructor 375 375 * @extends {WebInspector.ProfileHeader} 376 * @param { WebInspector.CSSSelectorProfileType} type376 * @param {!WebInspector.CSSSelectorProfileType} type 377 377 * @param {string} title 378 378 * @param {number=} uid -
trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js
r135591 r135599 277 277 * @constructor 278 278 * @extends {WebInspector.ProfileHeader} 279 * @param { WebInspector.CanvasProfileType} type279 * @param {!WebInspector.CanvasProfileType} type 280 280 * @param {string} title 281 281 * @param {number=} uid -
trunk/Source/WebCore/inspector/front-end/FileUtils.js
r131872 r135599 296 296 297 297 /** 298 * @param {function( File)} callback298 * @param {function(!File)} callback 299 299 * @return {Node} 300 300 */ -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js
r130149 r135599 586 586 }, 587 587 588 _filterSelectIndexChanged: function(profiles, profileIndex)588 filterSelectIndexChanged: function(profiles, profileIndex) 589 589 { 590 590 this._profileIndex = profileIndex; -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js
r135586 r135599 387 387 { 388 388 var profileIndex = this.filterSelectElement.selectedIndex - 1; 389 this.dataGrid. _filterSelectIndexChanged(this._profiles(), profileIndex);389 this.dataGrid.filterSelectIndexChanged(this._profiles(), profileIndex); 390 390 391 391 if (!this.currentQuery || !this._searchFinishedCallback || !this._searchResults) … … 417 417 }, 418 418 419 /** 420 * @return {!Array.<!WebInspector.ProfileHeader>} 421 */ 419 422 _profiles: function() 420 423 { … … 804 807 * @constructor 805 808 * @extends {WebInspector.ProfileHeader} 806 * @param { WebInspector.HeapSnapshotProfileType} type809 * @param {!WebInspector.HeapSnapshotProfileType} type 807 810 * @param {string} title 808 811 * @param {number=} uid -
trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js
r135158 r135599 260 260 * @constructor 261 261 * @extends {WebInspector.ProfileHeader} 262 * @param { WebInspector.NativeMemoryProfileType} type262 * @param {!WebInspector.NativeMemoryProfileType} type 263 263 * @param {string} title 264 264 * @param {number=} uid -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r135588 r135599 28 28 /** 29 29 * @constructor 30 * @param {string} id 31 * @param {string} name 30 32 */ 31 33 WebInspector.ProfileType = function(id, name) … … 100 102 /** 101 103 * @constructor 102 * @param { WebInspector.ProfileType} profileType104 * @param {!WebInspector.ProfileType} profileType 103 105 * @param {string} title 104 106 * @param {number=} uid … … 119 121 120 122 WebInspector.ProfileHeader.prototype = { 123 /** 124 * @return {!WebInspector.ProfileType} 125 */ 121 126 profileType: function() 122 127 { … … 133 138 }, 134 139 140 /** 141 * @return {?WebInspector.View} 142 */ 135 143 existingView: function() 136 144 { … … 138 146 }, 139 147 148 /** 149 * @return {!WebInspector.View} 150 */ 140 151 view: function() 141 152 { … … 147 158 /** 148 159 * @param {WebInspector.ProfilesPanel} profilesPanel 160 * @return {!WebInspector.View} 149 161 */ 150 162 createView: function(profilesPanel) … … 216 228 if (Capabilities.profilerCausesRecompilation) { 217 229 this._statusBarButtons.push(this.enableToggleButton); 218 this.enableToggleButton.addEventListener("click", this._ toggleProfiling, this);230 this.enableToggleButton.addEventListener("click", this._onToggleProfiling, this); 219 231 } 220 232 this.recordButton = new WebInspector.StatusBarButton("", "record-profile-status-bar-item"); … … 269 281 }, 270 282 283 /** 284 * @param {!File} file 285 */ 271 286 _loadFromFile: function(file) 272 287 { … … 333 348 }, 334 349 350 /** 351 * @param {WebInspector.Event} event 352 */ 335 353 _onProfileTypeSelected: function(event) 336 354 { 337 this._selectedProfileType = event.data;355 this._selectedProfileType = /** @type {!WebInspector.ProfileType} */ (event.data); 338 356 this.recordButton.title = this._selectedProfileType.buttonTooltip; 339 357 }, … … 418 436 }, 419 437 438 /** 439 * @param {Event} event 440 */ 420 441 _handleContextMenuEvent: function(event) 421 442 { … … 591 612 /** 592 613 * @param {string} typeId 593 * @return { Array.<WebInspector.ProfileHeader>}614 * @return {!Array.<!WebInspector.ProfileHeader>} 594 615 */ 595 616 getProfiles: function(typeId) … … 982 1003 }, 983 1004 984 _toggleProfiling: function(optionalAlways) 1005 /** 1006 * @param {WebInspector.Event} event 1007 */ 1008 _onToggleProfiling: function(event) { 1009 this._toggleProfiling(true); 1010 }, 1011 1012 /** 1013 * @param {boolean} always 1014 */ 1015 _toggleProfiling: function(always) 985 1016 { 986 1017 if (this._profilerEnabled) { … … 988 1019 ProfilerAgent.disable(this._profilerWasDisabled.bind(this)); 989 1020 } else { 990 WebInspector.settings.profilerEnabled.set( !!optionalAlways);1021 WebInspector.settings.profilerEnabled.set(always); 991 1022 ProfilerAgent.enable(this._profilerWasEnabled.bind(this)); 992 1023 } … … 1019 1050 }, 1020 1051 1052 /** 1053 * @param {!WebInspector.Event} event 1054 */ 1021 1055 sidebarResized: function(event) 1022 1056 { … … 1126 1160 * @constructor 1127 1161 * @implements {ProfilerAgent.Dispatcher} 1162 * @param {WebInspector.ProfilesPanel} profilesPanel 1128 1163 */ 1129 WebInspector.ProfilerDispatcher = function(profile r)1164 WebInspector.ProfilerDispatcher = function(profilesPanel) 1130 1165 { 1131 this._profile r = profiler;1166 this._profilesPanel = profilesPanel; 1132 1167 } 1133 1168 … … 1138 1173 addProfileHeader: function(profile) 1139 1174 { 1140 var profileType = this._profile r.getProfileType(profile.typeId);1141 this._profile r.addProfileHeader(profileType.createProfile(profile));1175 var profileType = this._profilesPanel.getProfileType(profile.typeId); 1176 this._profilesPanel.addProfileHeader(profileType.createProfile(profile)); 1142 1177 }, 1143 1178 … … 1149 1184 addHeapSnapshotChunk: function(uid, chunk) 1150 1185 { 1151 this._profile r._addHeapSnapshotChunk(uid, chunk);1186 this._profilesPanel._addHeapSnapshotChunk(uid, chunk); 1152 1187 }, 1153 1188 … … 1158 1193 finishHeapSnapshot: function(uid) 1159 1194 { 1160 this._profile r._finishHeapSnapshot(uid);1195 this._profilesPanel._finishHeapSnapshot(uid); 1161 1196 }, 1162 1197 … … 1167 1202 setRecordingProfile: function(isProfiling) 1168 1203 { 1169 this._profile r.setRecordingProfile(WebInspector.CPUProfileType.TypeId, isProfiling);1204 this._profilesPanel.setRecordingProfile(WebInspector.CPUProfileType.TypeId, isProfiling); 1170 1205 }, 1171 1206 … … 1175 1210 resetProfiles: function() 1176 1211 { 1177 this._profile r._reset();1212 this._profilesPanel._reset(); 1178 1213 }, 1179 1214 … … 1185 1220 reportHeapSnapshotProgress: function(done, total) 1186 1221 { 1187 this._profile r._reportHeapSnapshotProgress(done, total);1222 this._profilesPanel._reportHeapSnapshotProgress(done, total); 1188 1223 } 1189 1224 } … … 1192 1227 * @constructor 1193 1228 * @extends {WebInspector.SidebarTreeElement} 1229 * @param {!WebInspector.ProfileHeader} profile 1230 * @param {string} titleFormat 1231 * @param {string} className 1194 1232 */ 1195 1233 WebInspector.ProfileSidebarTreeElement = function(profile, titleFormat, className) … … 1248 1286 }, 1249 1287 1288 /** 1289 * @param {!Event} event 1290 */ 1250 1291 handleContextMenuEvent: function(event) 1251 1292 { … … 1292 1333 * @constructor 1293 1334 * @extends {WebInspector.SidebarTreeElement} 1335 * @param {!WebInspector.ProfilesPanel} panel 1294 1336 */ 1295 1337 WebInspector.ProfilesSidebarTreeElement = function(panel)
Note: See TracChangeset
for help on using the changeset viewer.