RESOLVED FIXED 56748
Web Inspector: move content loading logic to a new SourceFile class.
https://bugs.webkit.org/show_bug.cgi?id=56748
Summary Web Inspector: move content loading logic to a new SourceFile class.
Pavel Podivilov
Reported 2011-03-21 09:21:05 PDT
Web Inspector: move content loading logic to a new SourceFile class.
Attachments
Patch. (15.49 KB, patch)
2011-03-21 09:21 PDT, Pavel Podivilov
yurys: review-
Patch. (17.30 KB, patch)
2011-03-22 03:16 PDT, Pavel Podivilov
yurys: review+
Pavel Podivilov
Comment 1 2011-03-21 09:21:42 PDT
WebKit Review Bot
Comment 2 2011-03-21 09:24:28 PDT
Attachment 86323 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/WebCore.vcproj/WebCore.vcproj:66823: not well-formed (invalid token) [xml/syntax] [5] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yury Semikhatsky
Comment 3 2011-03-22 02:30:29 PDT
Comment on attachment 86323 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=86323&action=review Several minor comments, otherwise looks good. > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:89 > sourceFile.id = sourceFileId; Move this into SourceFile constructor. > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:90 > + sourceFile._breakpoints = []; Move this into SourceFile constructor. > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:95 > + if (!(id in this._presentationBreakpoints)) Why do we have to iterate though all breakpoints when a script is being added? Is it possible to update only breakpoints related to the script? > Source/WebCore/inspector/front-end/SourceFile.js:31 > +WebInspector.SourceFile = function(script, contentChangedDelegate) I don't like the name, but I don't have a better suggestion at the moment. > Source/WebCore/inspector/front-end/SourceFile.js:111 > + // FIXME: move provider's load functions here. Can you fix this as part of this change?
Pavel Podivilov
Comment 4 2011-03-22 03:15:59 PDT
(In reply to comment #3) > (From update of attachment 86323 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=86323&action=review > > Several minor comments, otherwise looks good. > > > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:89 > > sourceFile.id = sourceFileId; > > Move this into SourceFile constructor. Done. > > > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:90 > > + sourceFile._breakpoints = []; > > Move this into SourceFile constructor. Done. > > > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:95 > > + if (!(id in this._presentationBreakpoints)) > > Why do we have to iterate though all breakpoints when a script is being added? Is it possible to update only breakpoints related to the script? DebuggerModel contains all breakpoints from local storage, but we want to show only those that have corresponding scripts. When the new script is added, we have to find all breakpoints matching the script and show them in UI. > > > Source/WebCore/inspector/front-end/SourceFile.js:31 > > +WebInspector.SourceFile = function(script, contentChangedDelegate) > > I don't like the name, but I don't have a better suggestion at the moment. > > > Source/WebCore/inspector/front-end/SourceFile.js:111 > > + // FIXME: move provider's load functions here. > > Can you fix this as part of this change? There is already a separate change for this - https://bugs.webkit.org/show_bug.cgi?id=56756.
Pavel Podivilov
Comment 5 2011-03-22 03:16:15 PDT
Pavel Podivilov
Comment 6 2011-03-23 05:57:11 PDT
Note You need to log in before you can comment on or make changes to this bug.