Summary: | Web Inspector: eliminate SourceFrameDelegate by passing scripts to SourceFrame constructor | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pavel Podivilov <podivilov> | ||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Pavel Podivilov <podivilov> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Pavel Podivilov
2010-12-08 04:15:19 PST
Created attachment 75887 [details]
Patch.
Comment on attachment 75887 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=75887&action=review > WebCore/inspector/front-end/Resource.js:512 > script.resource = this; Do we actually use this link? > WebCore/inspector/front-end/Script.js:88 > + this.dispatchEventToListeners(WebInspector.Script.Events.SourceChanged, revertCallback || function() {}); callback should not be a part of the event data - what if there are several listeners? what should they do to callback? r- for this. Created attachment 75914 [details]
Patch.
(In reply to comment #2) > (From update of attachment 75887 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=75887&action=review > > > WebCore/inspector/front-end/Resource.js:512 > > script.resource = this; > > Do we actually use this link? It's extensively used by ScriptsPanel. > > > WebCore/inspector/front-end/Script.js:88 > > + this.dispatchEventToListeners(WebInspector.Script.Events.SourceChanged, revertCallback || function() {}); > > callback should not be a part of the event data - what if there are several listeners? what should they do to callback? r- for this. In new patch resource is updated directly like it was done in original code. When we'll move scripts and live edit to DebuggerModel we may eliminate script.resource link. Created attachment 76186 [details]
Do not regress live edit in ScriptView.
Comment on attachment 76186 [details] Do not regress live edit in ScriptView. View in context: https://bugs.webkit.org/attachment.cgi?id=76186&action=review > WebCore/inspector/front-end/SourceFrame.js:811 > + if (script.resource) I think this can be encapsulated in script.source setter. > WebCore/inspector/front-end/SourceFrame.js:826 > + return WebInspector.debuggerModel.findBreakpoints(function(b) { return b.sourceID in scripts; }); nit: findBreakpoints -> queryBreakpoints. Committed r73730: <http://trac.webkit.org/changeset/73730> (In reply to comment #6) > (From update of attachment 76186 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=76186&action=review > > > WebCore/inspector/front-end/SourceFrame.js:811 > > + if (script.resource) > > I think this can be encapsulated in script.source setter. There is revertEditLineCallback argument, so we can't encapsulate this in setter. > > > WebCore/inspector/front-end/SourceFrame.js:826 > > + return WebInspector.debuggerModel.findBreakpoints(function(b) { return b.sourceID in scripts; }); > > nit: findBreakpoints -> queryBreakpoints. Done. |