RESOLVED FIXED Bug 86477
Web Inspector: Refactor SnippetsModel: extract SnippetStorage, make SnippetScriptMapping delegate calls to ScriptSnippetModel and provide public interface on ScriptSnippetModel in terms of uiSourceCodes
https://bugs.webkit.org/show_bug.cgi?id=86477
Summary Web Inspector: Refactor SnippetsModel: extract SnippetStorage, make SnippetSc...
Vsevolod Vlasov
Reported 2012-05-15 06:30:52 PDT
Refactor SnippetsModel: extract SnippetStorage, make SnippetScriptMapping delegate calls to ScriptSnippetModel and provide public interface on ScriptSnippetModel in terms of uiSourceCodes
Attachments
Patch (63.27 KB, patch)
2012-05-15 06:34 PDT, Vsevolod Vlasov
pfeldman: review+
Vsevolod Vlasov
Comment 1 2012-05-15 06:34:05 PDT
Pavel Feldman
Comment 2 2012-05-15 06:51:29 PDT
Comment on attachment 141950 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=141950&action=review > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:-44 > - this._mappings.push(this._snippetsMapping); Now that DPM is only instantiating mappings, I don't see a problem in its dependency on snippets model. > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:106 > + set snippetMapping(snippetMapping) Setters do not work great with the compiler, avoid their use. > Source/WebCore/inspector/front-end/ScriptSnippetModel.js:75 > + var uiSourceCode = new WebInspector.JavaScriptSource(uiSourceCodeURL, new WebInspector.SnippetContentProvider(snippet), this._snippetScriptMapping); could snippet implement ContentProvider ? > Source/WebCore/inspector/front-end/ScriptSnippetModel.js:89 > + var snippet = this._snippetForUISourceCode.get(uiSourceCode); I don't think one can follow consistency of these maps.
Vsevolod Vlasov
Comment 3 2012-05-15 07:36:18 PDT
Note You need to log in before you can comment on or make changes to this bug.