Extract FileSelector from ScriptsPanel.
Created attachment 120468 [details] Patch
Comment on attachment 120468 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120468&action=review > Source/WebCore/inspector/front-end/ScriptsPanel.js:174 > + this._sourceFramesByUISourceCodes = new Map(); this._sourceFramesByUISourceCode (not plural) > Source/WebCore/inspector/front-end/ScriptsPanel.js:264 > + uiSourceCodes = this._sourceFramesByUISourceCodes; var uiSourceCode (please run compiler) > Source/WebCore/inspector/front-end/ScriptsPanel.js:487 > + this._sourceFramesByUISourceCodes.put(uiSourceCode, sourceFrame) missing ; > Source/WebCore/inspector/front-end/ScriptsPanel.js:-654 > - if (this._navigator) no delegation to the file selector here. why? > Source/WebCore/inspector/front-end/ScriptsPanel.js:-733 > - // FIXME: We should always add anonymous scripts to navigator (in a separate folder tree element) This fixme should probably stay. > Source/WebCore/inspector/front-end/ScriptsPanel.js:974 > + get defaultFocusedElement() { }, long term it should be get view()? > Source/WebCore/inspector/front-end/ScriptsPanel.js:979 > + show: function(element) { }, Open comment: Imagine that we end up leaving both: simple file selector and navigator panel. You will then need to delegate editor layout to that component. As a result, you no longer need to expose show / defaultFocusedElement at all. > Source/WebCore/inspector/front-end/ScriptsPanel.js:995 > + setScriptSourceIsBeingEdited: function(uiSourceCode, inEditMode) { }, You rather need a "dirty" marker, not inEditMode. > Source/WebCore/inspector/front-end/ScriptsPanel.js:1001 > + replaceUISourceCodes: function(oldUISourceCodeList, uiSourceCodeList) { }, trailing coma > Source/WebCore/inspector/front-end/ScriptsPanel.js:1022 > +WebInspector.ScriptsPanel.SimpleFileSelector.prototype = { ComboBoxFileSelector or DropBoxFileSelector?
Comment on attachment 120468 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120468&action=review >> Source/WebCore/inspector/front-end/ScriptsPanel.js:-654 >> - if (this._navigator) > > no delegation to the file selector here. why? This method is only called from _uiSourceCodeReplaced which makes all necessary delegations to file selector. >> Source/WebCore/inspector/front-end/ScriptsPanel.js:-733 >> - // FIXME: We should always add anonymous scripts to navigator (in a separate folder tree element) > > This fixme should probably stay. We now add all scripts to script navigator. I added a FIXME there to create a separate section fro anonymous scripts though. >> Source/WebCore/inspector/front-end/ScriptsPanel.js:995 >> + setScriptSourceIsBeingEdited: function(uiSourceCode, inEditMode) { }, > > You rather need a "dirty" marker, not inEditMode. I'll take care of that separately.
Committed r103683: <http://trac.webkit.org/changeset/103683>