RESOLVED FIXED 61035
Web Inspector: hide script location to ui location conversion details from ScriptsPanel
https://bugs.webkit.org/show_bug.cgi?id=61035
Summary Web Inspector: hide script location to ui location conversion details from Sc...
Pavel Podivilov
Reported 2011-05-18 03:50:44 PDT
Web Inspector: add ScriptLocation and UILocation classes and hide conversions in model.
Attachments
Patch. (4.01 KB, patch)
2011-05-18 03:51 PDT, Pavel Podivilov
pfeldman: review-
Comments addressed. (3.23 KB, patch)
2011-05-18 05:24 PDT, Pavel Podivilov
no flags
Rebase. (3.78 KB, patch)
2011-05-18 06:10 PDT, Pavel Podivilov
pfeldman: review-
Patch. (3.78 KB, patch)
2011-05-18 06:48 PDT, Pavel Podivilov
yurys: review+
Pavel Podivilov
Comment 1 2011-05-18 03:51:42 PDT
Pavel Feldman
Comment 2 2011-05-18 04:35:26 PDT
Comment on attachment 93896 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=93896&action=review > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:615 > +WebInspector.ScriptLocation = function(url, sourceID, lineNumber, columnNumber) These should be defined near WebInspector.SourceMapping and should actually be used there.
Pavel Podivilov
Comment 3 2011-05-18 04:51:41 PDT
(In reply to comment #2) > (From update of attachment 93896 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=93896&action=review > > > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:615 > > +WebInspector.ScriptLocation = function(url, sourceID, lineNumber, columnNumber) > > These should be defined near WebInspector.SourceMapping and should actually be used there. ScriptLocation has nothing to do with WebInspector.SourceMapping. SourceMapping always defines a mapping for a single script. ScriptLocation -> UILocation conversion is a part of DebuggerPresentationModel, so it should be defined there.
Pavel Feldman
Comment 4 2011-05-18 05:01:26 PDT
> ScriptLocation has nothing to do with WebInspector.SourceMapping. SourceMapping always defines a mapping for a single script. ScriptLocation -> UILocation conversion is a part of DebuggerPresentationModel, so it should be defined there. Hm... I thought that the "mapping" concept of the presentation model was extracted from it as a SourceMapping. At least all conversions from script location to ui location and back are declared on SourceMapping.
Pavel Podivilov
Comment 5 2011-05-18 05:04:27 PDT
(In reply to comment #4) > > ScriptLocation has nothing to do with WebInspector.SourceMapping. SourceMapping always defines a mapping for a single script. ScriptLocation -> UILocation conversion is a part of DebuggerPresentationModel, so it should be defined there. > > Hm... I thought that the "mapping" concept of the presentation model was extracted from it as a SourceMapping. At least all conversions from script location to ui location and back are declared on SourceMapping. SourceMapping is an dpm utility class aimed at converting locations for a single script. We still need a way to convert sourceURL,line,column to sourceFileId,line, which is different.
Pavel Feldman
Comment 6 2011-05-18 05:07:29 PDT
> SourceMapping is an dpm utility class aimed at converting locations for a single script. We still need a way to convert sourceURL,line,column to sourceFileId,line, which is different. It does not make sense to me. I think we only have ScriptLocation and UILocation and conversion between them.
Pavel Podivilov
Comment 7 2011-05-18 05:24:33 PDT
Created attachment 93900 [details] Comments addressed. No new abstractions this time. Probably we'll add them later when there will be a more clear need.
Pavel Podivilov
Comment 8 2011-05-18 06:10:09 PDT
Created attachment 93902 [details] Rebase.
Pavel Feldman
Comment 9 2011-05-18 06:32:25 PDT
Comment on attachment 93902 [details] Rebase. View in context: https://bugs.webkit.org/attachment.cgi?id=93902&action=review > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:83 > + scriptLocationToUILocation: function(sourceURL, sourceID, lineNumber, columnNumber, callback) sourceId > Source/WebCore/inspector/front-end/ScriptsPanel.js:526 > + this._showSourceLine(sourceFileId, lineNumber); We should not highlight line in case it was not specified in anchor.
Pavel Podivilov
Comment 10 2011-05-18 06:48:28 PDT
Pavel Podivilov
Comment 11 2011-05-18 06:48:59 PDT
(In reply to comment #9) > (From update of attachment 93902 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=93902&action=review > > > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:83 > > + scriptLocationToUILocation: function(sourceURL, sourceID, lineNumber, columnNumber, callback) > > sourceId Done. > > > Source/WebCore/inspector/front-end/ScriptsPanel.js:526 > > + this._showSourceLine(sourceFileId, lineNumber); > > We should not highlight line in case it was not specified in anchor. This code is executed only when line is specified in anchor.
Pavel Podivilov
Comment 12 2011-06-08 06:48:30 PDT
Note You need to log in before you can comment on or make changes to this bug.