WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
73078
Web Inspector: refactor resource tree model and introduce explicit class for ResourceTreeFrame.
https://bugs.webkit.org/show_bug.cgi?id=73078
Summary
Web Inspector: refactor resource tree model and introduce explicit class for ...
Pavel Feldman
Reported
2011-11-24 06:44:00 PST
Otherwise we are managing frames and their resources using too many maps.
Attachments
Patch
(65.12 KB, patch)
2011-11-24 06:46 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] First pass of review comments addressed
(67.44 KB, patch)
2011-11-24 11:36 PST
,
Pavel Feldman
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2011-11-24 06:46:40 PST
Created
attachment 116504
[details]
Patch
Timothy Hatcher
Comment 2
2011-11-24 08:06:56 PST
Comment on
attachment 116504
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116504&action=review
> Source/WebCore/inspector/Inspector.json:680 > + { "name": "frameId", "$ref": "FrameId", "description": "Frame identifier.", "hidden": true }, > + { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
These should be added to the end as optional right? Since this is a change from Inspector-0.1.json. Also why is frameId always hidden?
> Source/WebCore/inspector/front-end/ApplicationCacheModel.js:59 > + var frame = /** @type {WebInspector.ResourceTreeFrame} */ event.data;
These type comments are getting intrusive…
Pavel Feldman
Comment 3
2011-11-24 08:17:16 PST
(In reply to
comment #2
)
> (From update of
attachment 116504
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=116504&action=review
> > > Source/WebCore/inspector/Inspector.json:680 > > + { "name": "frameId", "$ref": "FrameId", "description": "Frame identifier.", "hidden": true }, > > + { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." }, > > These should be added to the end as optional right? Since this is a change from Inspector-0.1.json. Also why is frameId always hidden?
We can add any parameters into the _events_ and remove optional parameters from them. We can't add non-optional parameters to the _commands_ only.
> > > Source/WebCore/inspector/front-end/ApplicationCacheModel.js:59 > > + var frame = /** @type {WebInspector.ResourceTreeFrame} */ event.data; > > These type comments are getting intrusive…
I know. We are experimenting with this type of cast. It is not clear how much we need to annotate to get a strict type checking. But as is, compilation already catches a handful of bugs for me every day.
Timothy Hatcher
Comment 4
2011-11-24 08:20:16 PST
Comment on
attachment 116504
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116504&action=review
>>> Source/WebCore/inspector/front-end/ApplicationCacheModel.js:59 >>> + var frame = /** @type {WebInspector.ResourceTreeFrame} */ event.data; >> >> These type comments are getting intrusive… > > I know. We are experimenting with this type of cast. It is not clear how much we need to annotate to get a strict type checking. But as is, compilation already catches a handful of bugs for me every day.
I'm confused. Why does order not matter for events when other clients might be using this and break after this change?
Timothy Hatcher
Comment 5
2011-11-24 08:21:04 PST
(In reply to
comment #4
)
> (From update of
attachment 116504
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=116504&action=review
> > >>> Source/WebCore/inspector/front-end/ApplicationCacheModel.js:59 > >>> + var frame = /** @type {WebInspector.ResourceTreeFrame} */ event.data; > >> > >> These type comments are getting intrusive… > > > > I know. We are experimenting with this type of cast. It is not clear how much we need to annotate to get a strict type checking. But as is, compilation already catches a handful of bugs for me every day. > > I'm confused. Why does order not matter for events when other clients might be using this and break after this change?
Sigh, that is not the comment I replied to.
Vsevolod Vlasov
Comment 6
2011-11-24 09:50:21 PST
Comment on
attachment 116504
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116504&action=review
> Source/WebCore/inspector/front-end/ResourceTreeModel.js:108 > + this._frameDetached(this.mainFrame.id);
Please move this to _frameNavigated.
> Source/WebCore/inspector/front-end/ResourceTreeModel.js:117 > + _frameNavigated: function(framePayload)
You should remove all child frames here.
Pavel Feldman
Comment 7
2011-11-24 11:36:49 PST
Created
attachment 116524
[details]
[Patch] First pass of review comments addressed
Yury Semikhatsky
Comment 8
2011-11-25 00:38:38 PST
Comment on
attachment 116524
[details]
[Patch] First pass of review comments addressed View in context:
https://bugs.webkit.org/attachment.cgi?id=116524&action=review
> Source/WebCore/inspector/front-end/ResourceTreeModel.js:154 > + if (!framePayload.parentId && !WebInspector.networkLog.resources.length) {
Please comment on this logic.
Pavel Feldman
Comment 9
2011-11-25 01:23:46 PST
Committed
r101154
: <
http://trac.webkit.org/changeset/101154
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug