WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
52588
Web Inspector: [refactoring] use events to notify NetworkManager clients
https://bugs.webkit.org/show_bug.cgi?id=52588
Summary
Web Inspector: [refactoring] use events to notify NetworkManager clients
Andrey Kosyakov
Reported
2011-01-17 10:30:31 PST
Currently, NetworkManager directly calls each client to notify it on resource start/update/finish. This should be done via generic event dispatch to decouple higher-level code from NetworkManager.
Attachments
patch
(18.78 KB, patch)
2011-01-17 12:35 PST
,
Andrey Kosyakov
yurys
: review+
yurys
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andrey Kosyakov
Comment 1
2011-01-17 12:35:07 PST
Created
attachment 79204
[details]
patch
Yury Semikhatsky
Comment 2
2011-01-18 04:05:09 PST
Comment on
attachment 79204
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=79204&action=review
> Source/WebCore/ChangeLog:9 > + (WebInspector.AuditLauncherView): Do not expose public interface to resource count. Do not c reset resource count upon reset().
typo: Do not __c__ reset
Pavel Feldman
Comment 3
2011-01-18 04:23:02 PST
Comment on
attachment 79204
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=79204&action=review
> Source/WebCore/inspector/front-end/NetworkManager.js:132 > + this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceUpdated, resource);
nit: _fireResourceUpdated(resource);
> Source/WebCore/inspector/front-end/NetworkManager.js:218 > + this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceContentUpdated, resource);
We only need this to remove XHRs, so ResourceUpdated should be sufficient.
> Source/WebCore/inspector/front-end/NetworkManager.js:229 > + this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.MainResourceChanged, mainResource);
MainResourceChanged sounds weird. How about MainResourceCommitLoad?
> Source/WebCore/inspector/front-end/NetworkPanel.js:84 > + WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceContentUpdated, this._onResourceUpdated, this);
No need to listen to content update.
> Source/WebCore/inspector/front-end/NetworkPanel.js:1438 > + this._resource.populateImageSource(previewImage);
This will get merged hopefully.
Andrey Kosyakov
Comment 4
2011-01-19 23:44:35 PST
Manually committed
r76022
:
http://trac.webkit.org/changeset/76022
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