RESOLVED FIXED90855
Web Inspector: Refactor resource revisions before moving to UISourceCode.
https://bugs.webkit.org/show_bug.cgi?id=90855
Summary Web Inspector: Refactor resource revisions before moving to UISourceCode.
Vsevolod Vlasov
Reported 2012-07-10 00:43:43 PDT
Resource revisions should be moved to UISourceCode as UISourceCode is now the only object that could be edited. This patch makes all necessary changes to revisions implementation before moving it to UISourceCode. - Revisions are now persisted based on mainFrame.loaderId, not resource.loaderId which makes filtering out stale persisted revisions easier. - Restoring revisions from local storage is separated from filtering out stale persisted revisions. - Resource._clearRevisionHistory and Resource._restoreRevisions are not static anymore.
Attachments
Patch (15.23 KB, patch)
2012-07-10 05:08 PDT, Vsevolod Vlasov
no flags
Patch (15.05 KB, patch)
2012-07-10 05:13 PDT, Vsevolod Vlasov
no flags
Patch (15.12 KB, patch)
2012-07-10 08:46 PDT, Vsevolod Vlasov
pfeldman: review+
Vsevolod Vlasov
Comment 1 2012-07-10 05:08:07 PDT
Vsevolod Vlasov
Comment 2 2012-07-10 05:13:05 PDT
Pavel Feldman
Comment 3 2012-07-10 08:27:18 PDT
Comment on attachment 151441 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151441&action=review > Source/WebCore/inspector/front-end/Resource.js:257 > + this.addRevision(window.localStorage[historyItems[i].key], new Date(historyItems[i].timestamp), true); localStorage check is missing. > Source/WebCore/inspector/front-end/Resource.js:491 > + delete window.localStorage[historyItem.key]; check for window.localStorage missing. > Source/WebCore/inspector/front-end/Resource.js:498 > + window.localStorage["revision-history"] = JSON.stringify(filteredRegistry); ditto > Source/WebCore/inspector/front-end/ResourceTreeModel.js:335 > + this._addFrame(frame); The order of calls here is extremely sensitive. Either reload scenario or navigation between renderers might go off.
Vsevolod Vlasov
Comment 4 2012-07-10 08:46:27 PDT
Vsevolod Vlasov
Comment 5 2012-07-10 08:47:46 PDT
> localStorage check is missing. Done. > > Source/WebCore/inspector/front-end/ResourceTreeModel.js:335 > > + this._addFrame(frame); > > The order of calls here is extremely sensitive. Either reload scenario or navigation between renderers might go off. I am only removing obsolete code here and move this._addFrame(frame) call which could be moved safely. I checked all the FrameAdded event listeners.
Vsevolod Vlasov
Comment 6 2012-07-10 09:23:24 PDT
Note You need to log in before you can comment on or make changes to this bug.