Bug 50679

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 Flags
Patch.
pfeldman: review-
Patch.
none
Do not regress live edit in ScriptView. pfeldman: review+

Pavel Podivilov
Reported 2010-12-08 04:15:19 PST
Web Inspector: eliminate SourceFrameDelegate by passing scripts to SourceFrame constructor
Attachments
Patch. (13.06 KB, patch)
2010-12-08 04:15 PST, Pavel Podivilov
pfeldman: review-
Patch. (11.25 KB, patch)
2010-12-08 09:13 PST, Pavel Podivilov
no flags
Do not regress live edit in ScriptView. (10.16 KB, patch)
2010-12-10 05:39 PST, Pavel Podivilov
pfeldman: review+
Pavel Podivilov
Comment 1 2010-12-08 04:15:56 PST
Pavel Feldman
Comment 2 2010-12-08 04:21:53 PST
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.
Pavel Podivilov
Comment 3 2010-12-08 09:13:28 PST
Pavel Podivilov
Comment 4 2010-12-08 09:15:57 PST
(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.
Pavel Podivilov
Comment 5 2010-12-10 05:39:50 PST
Created attachment 76186 [details] Do not regress live edit in ScriptView.
Pavel Feldman
Comment 6 2010-12-10 08:11:43 PST
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.
Pavel Podivilov
Comment 7 2010-12-10 08:33:28 PST
Pavel Podivilov
Comment 8 2010-12-10 08:35:52 PST
(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.
Ilya Tikhonovsky
Comment 9 2010-12-15 03:35:37 PST
*** Bug 51101 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.