TabbedEditorContainer should save open tabs.
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.
Created attachment 123739 [details] Patch
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.
> 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.
Created attachment 124313 [details] Patch
Committed r106238: <http://trac.webkit.org/changeset/106238>