Changeset 222003 in webkit
- Timestamp:
- Sep 13, 2017 5:32:04 PM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r222002 r222003 1 2017-09-13 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: allow recordings to be saved via ⌘-S in the Recording tab 4 https://bugs.webkit.org/show_bug.cgi?id=175284 5 6 Reviewed by Matt Baker. 7 8 * UserInterface/Views/RecordingContentView.js: 9 (WI.RecordingContentView.prototype.get supportsSave): 10 (WI.RecordingContentView.prototype.get saveData): 11 12 * UserInterface/Views/RecordingNavigationSidebarPanel.js: 13 (WI.RecordingNavigationSidebarPanel.prototype._exportNavigationItemClicked): 14 Use the current content view's saveData when exporting. 15 1 16 2017-09-13 Devin Rousso <webkit@devinrousso.com> 2 17 -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js
r221695 r222003 135 135 supplementalRepresentedObjects.push(this.representedObject); 136 136 return supplementalRepresentedObjects; 137 } 138 139 get supportsSave() 140 { 141 return true; 142 } 143 144 get saveData() 145 { 146 return { 147 url: "web-inspector:///Recording.json", 148 content: JSON.stringify(this.representedObject.toJSON()), 149 forceSaveAs: true, 150 }; 137 151 } 138 152 -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.js
r221844 r222003 186 186 _exportNavigationItemClicked(event) 187 187 { 188 if (!this._recording )188 if (!this._recording || !this.contentBrowser || !this.contentBrowser.currentContentView || !this.contentBrowser.currentContentView.supportsSave) 189 189 return; 190 190 191 191 const forceSaveAs = true; 192 WI.saveDataToFile({ 193 url: "web-inspector:///Recording.json", 194 content: JSON.stringify(this._recording.toJSON()), 195 }, forceSaveAs); 192 WI.saveDataToFile(this.contentBrowser.currentContentView.saveData, forceSaveAs); 196 193 } 197 194 };
Note: See TracChangeset
for help on using the changeset viewer.