RESOLVED FIXED 76912
Web Inspector: TabbedEditorContainer should save open tabs.
https://bugs.webkit.org/show_bug.cgi?id=76912
Summary Web Inspector: TabbedEditorContainer should save open tabs.
Vsevolod Vlasov
Reported 2012-01-24 07:12:09 PST
TabbedEditorContainer should save open tabs.
Attachments
Patch (25.76 KB, patch)
2012-01-24 08:22 PST, Vsevolod Vlasov
no flags
Patch (22.52 KB, patch)
2012-01-27 07:22 PST, Vsevolod Vlasov
pfeldman: review+
Vsevolod Vlasov
Comment 1 2012-01-24 07:19:25 PST
I suggest following approach: - We store (in settings) - last opened script url - the list of urls that were shown recently - All these settings are updated after each user initiated action that affects editor container. - when the list of recent urls is updated we save all currently open tabs sorted by the time they were last shown. Then we make sure the list length does not exceed some fixed size (30). - When scripts are loaded in the scripts panel we show tabs for all recent urls unless user already performed some action.
Vsevolod Vlasov
Comment 2 2012-01-24 08:22:55 PST
Pavel Feldman
Comment 3 2012-01-25 01:41:25 PST
Comment on attachment 123739 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=123739&action=review > Source/WebCore/inspector/front-end/ScriptsPanel.js:36 > + this._lastViewedFileSetting = WebInspector.settings.createSetting("lastViewedFile", ""); Please use the old setting name here for the smooth transition. > Source/WebCore/inspector/front-end/ScriptsPanel.js:269 > + var previouslyViewedFiles = this._previouslyViewedFilesSetting.get(); Please cover this code with tests > Source/WebCore/inspector/front-end/ScriptsPanel.js:1201 > + addFirstSourceFrame: function(title, sourceFrame, tooltip) { }, This editor container API seems too verbose.
Vsevolod Vlasov
Comment 4 2012-01-27 07:19:38 PST
> Please use the old setting name here for the smooth transition. Left old setting untouched, just moved its handling to SingleFileEditorContainer > > Source/WebCore/inspector/front-end/ScriptsPanel.js:269 > > + var previouslyViewedFiles = this._previouslyViewedFilesSetting.get(); > > Please cover this code with tests Extracted History object and covered with tests. > > Source/WebCore/inspector/front-end/ScriptsPanel.js:1201 > > + addFirstSourceFrame: function(title, sourceFrame, tooltip) { }, > > This editor container API seems too verbose. Only uiSourceCodeAdded() method is now used on EditorContainer for history handling.
Vsevolod Vlasov
Comment 5 2012-01-27 07:22:07 PST
Vsevolod Vlasov
Comment 6 2012-01-30 05:10:49 PST
Note You need to log in before you can comment on or make changes to this bug.