Bug 67609

Summary: Web Inspector: re-implement RawSourceCode.
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   
Bug Depends on: 67635, 67636    
Bug Blocks:    
Attachments:
Description Flags
Patch yurys: review+

Pavel Podivilov
Reported 2011-09-05 10:19:27 PDT
Web Inspector: re-implement RawSourceCode. RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI.
Attachments
Patch (24.72 KB, patch)
2011-09-05 10:24 PDT, Pavel Podivilov
yurys: review+
Pavel Podivilov
Comment 1 2011-09-05 10:24:08 PDT
Yury Semikhatsky
Comment 2 2011-09-06 01:34:47 PDT
Comment on attachment 106345 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=106345&action=review > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:178 > + var eventData = { sourceCode: uiSourceCode, oldSourceCode: oldUISourceCode }; sourceCode -> uiSourceCode > Source/WebCore/inspector/front-end/SourceFile.js:155 > + if (this._locked) { _locked -> _updatingSourceMapping ?
Pavel Podivilov
Comment 3 2011-09-06 02:34:07 PDT
Pavel Podivilov
Comment 4 2011-09-06 08:25:10 PDT
Note You need to log in before you can comment on or make changes to this bug.