[webkit-reviews] review granted: [Bug 86477] Web Inspector: Refactor SnippetsModel: extract SnippetStorage, make SnippetScriptMapping delegate calls to ScriptSnippetModel and provide public interface on ScriptSnippetModel in terms of uiSourceCodes : [Attachment 141950] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 15 06:52:23 PDT 2012


Pavel Feldman <pfeldman at chromium.org> has granted Vsevolod Vlasov
<vsevik at chromium.org>'s request for review:
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

Attachment 141950: Patch
https://bugs.webkit.org/attachment.cgi?id=141950&action=review

------- Additional Comments from Pavel Feldman <pfeldman at chromium.org>
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.


More information about the webkit-reviews mailing list