WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
59193
Web Inspector: Use different SourceFrame instances for ResourcesPanel and NetworkPanel
https://bugs.webkit.org/show_bug.cgi?id=59193
Summary
Web Inspector: Use different SourceFrame instances for ResourcesPanel and Net...
Vsevolod Vlasov
Reported
2011-04-22 05:38:04 PDT
Use different SourceFrame instances for ResourcesPanel and NetworkPanel. Network panel SourceFrame instance should not be editable. It should not be updated when Resource is edited in Resources/Scripts panels.
Attachments
Patch
(17.70 KB, patch)
2011-04-22 05:53 PDT
,
Vsevolod Vlasov
pfeldman
: review-
Details
Formatted Diff
Diff
Patch with fixes
(18.81 KB, patch)
2011-05-16 11:46 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch with fixes
(19.25 KB, patch)
2011-05-16 11:47 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch with fixes
(18.90 KB, patch)
2011-05-16 11:50 PDT
,
Vsevolod Vlasov
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-02
(1.32 MB, application/zip)
2011-05-16 17:25 PDT
,
WebKit Review Bot
no flags
Details
Patch with fixes
(24.49 KB, patch)
2011-05-18 13:07 PDT
,
Vsevolod Vlasov
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-02
(1.27 MB, application/zip)
2011-05-18 16:39 PDT
,
WebKit Review Bot
no flags
Details
Patch with failing test fix
(25.67 KB, patch)
2011-05-19 02:43 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch with fixes after review
(27.03 KB, patch)
2011-05-24 07:35 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Indent fix
(26.81 KB, patch)
2011-05-24 07:38 PDT
,
Vsevolod Vlasov
yurys
: review+
yurys
: commit-queue-
Details
Formatted Diff
Diff
Patch with fixes
(26.32 KB, patch)
2011-05-25 07:49 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Vsevolod Vlasov
Comment 1
2011-04-22 05:53:14 PDT
Created
attachment 90696
[details]
Patch
Pavel Feldman
Comment 2
2011-04-22 06:40:25 PDT
Comment on
attachment 90696
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=90696&action=review
> Source/WebCore/inspector/front-end/NetworkItemView.js:114 > +WebInspector.NetworkItemView.sourceViewForResource = function(resource)
I don't see where this caching is used. Also, should be private.
> Source/WebCore/inspector/front-end/NetworkItemView.js:123 > +WebInspector.NetworkItemView.contentViewForResource = function(resource)
Should be private.
> Source/WebCore/inspector/front-end/NetworkItemView.js:130 > + return WebInspector.NetworkItemView.sourceViewForResource(resource);
(do we really cache anything?)
> Source/WebCore/inspector/front-end/ResourcesPanel.js:86 > + case WebInspector.resourceCategories.documents:
I've seen it earlier. We should not dupe logic like this.
> Source/WebCore/inspector/front-end/ResourcesPanel.js:102 > + if (!resource._resourcesPanelSourceView)
Can we stop caching views in the resource?
> Source/WebCore/inspector/front-end/ResourcesPanel.js:114 > + if (!revision._view) {
ditto
Vsevolod Vlasov
Comment 3
2011-05-16 11:46:30 PDT
Created
attachment 93677
[details]
Patch with fixes
Vsevolod Vlasov
Comment 4
2011-05-16 11:47:54 PDT
Created
attachment 93678
[details]
Patch with fixes Oops, forgot to update the ChangeLog
Vsevolod Vlasov
Comment 5
2011-05-16 11:50:53 PDT
Created
attachment 93679
[details]
Patch with fixes
Vsevolod Vlasov
Comment 6
2011-05-16 13:29:47 PDT
Comment on
attachment 93679
[details]
Patch with fixes Found a problem with ResourceTreeModel, dropping flags.
WebKit Review Bot
Comment 7
2011-05-16 17:25:09 PDT
Comment on
attachment 93679
[details]
Patch with fixes
Attachment 93679
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/8704152
New failing tests: http/tests/inspector/resource-tree/resource-tree-frame-add.html inspector/console/console-log-document-proto.html inspector/profiler/cpu-profiler-profiling.html http/tests/inspector/console-xhr-logging.html inspector/console/console-log-toString-object.html inspector/console/console-command-clear.html inspector/console/alert-toString-exception.html inspector/console/console-format-collections.html inspector/console/console-nested-group.html inspector/console/console-dir-global.html inspector/debugger/debugger-autocontinue-on-syntax-error.html http/tests/inspector/change-iframe-src.html inspector/console/console-assert.html http/tests/appcache/interrupted-update.html inspector/console/console-dir.html inspector/console/console-format.html http/tests/inspector/console-resource-errors.html inspector/console/console-dirxml.html http/tests/inspector/resource-parameters.html inspector/console/console-log-syntax-error.html
WebKit Review Bot
Comment 8
2011-05-16 17:25:14 PDT
Created
attachment 93717
[details]
Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Vsevolod Vlasov
Comment 9
2011-05-18 13:07:38 PDT
Created
attachment 93975
[details]
Patch with fixes
WebKit Review Bot
Comment 10
2011-05-18 16:39:20 PDT
Comment on
attachment 93975
[details]
Patch with fixes
Attachment 93975
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/8710648
New failing tests: inspector/debugger/source-frame.html
WebKit Review Bot
Comment 11
2011-05-18 16:39:26 PDT
Created
attachment 94001
[details]
Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Vsevolod Vlasov
Comment 12
2011-05-19 02:43:00 PDT
Created
attachment 94054
[details]
Patch with failing test fix Fixed failing test
Pavel Podivilov
Comment 13
2011-05-23 00:51:43 PDT
Comment on
attachment 94054
[details]
Patch with failing test fix View in context:
https://bugs.webkit.org/attachment.cgi?id=94054&action=review
> Source/WebCore/inspector/front-end/ResourceView.js:46 > +WebInspector.ResourceView.isSourceViewableForResource = function(resource)
Maybe hasTextContent?
> Source/WebCore/inspector/front-end/ResourceView.js:73 > + WebInspector.SourceFrameDelegate.call(this);
SourceFrameDelegate is a scripts panel specific delegate used to invert SourceFrame -> ScriptsPanel dependency. It's strange that you derive ResourceSourceFrameDelegate from it. Could you implement TextViewerDelegate interface instead?
Vsevolod Vlasov
Comment 14
2011-05-24 07:35:13 PDT
Created
attachment 94609
[details]
Patch with fixes after review (In reply to
comment #13
)
> (From update of
attachment 94054
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=94054&action=review
> > > Source/WebCore/inspector/front-end/ResourceView.js:46 > > +WebInspector.ResourceView.isSourceViewableForResource = function(resource) > > Maybe hasTextContent?
Done.
> > Source/WebCore/inspector/front-end/ResourceView.js:73 > > + WebInspector.SourceFrameDelegate.call(this); > > SourceFrameDelegate is a scripts panel specific delegate used to invert SourceFrame -> ScriptsPanel dependency. It's strange that you derive ResourceSourceFrameDelegate from it. Could you implement TextViewerDelegate interface instead?
As discussed, I have overridden these methods in SourceFrame descendants.
Vsevolod Vlasov
Comment 15
2011-05-24 07:38:57 PDT
Created
attachment 94610
[details]
Indent fix
Yury Semikhatsky
Comment 16
2011-05-24 10:10:48 PDT
Comment on
attachment 94610
[details]
Indent fix View in context:
https://bugs.webkit.org/attachment.cgi?id=94610&action=review
> Source/WebCore/inspector/front-end/ResourceView.js:95 > + _contentLoaded: function (callback, text)
Why not make it a local function in requestContent?
> Source/WebCore/inspector/front-end/ResourceView.js:-220 > - function contentLoaded(text)
What's the reason for moving this out of the requestContent?
> Source/WebCore/inspector/front-end/ResourcesPanel.js:407 > + return treeElement.sourceView();
Can treeElement be undefined?
> Source/WebCore/inspector/front-end/ResourcesPanel.js:1189 > + this._resource.addEventListener("errors-warnings-cleared", this._errorsWarningsCleared, this);
You can listen for ConsoleCleared for consistency, otherwise some console-related events come from Resources while others from the Console directly.
> Source/WebCore/inspector/front-end/ResourcesPanel.js:-1289 > - if (this._storagePanel.currentQuery)
Should this check be preserved?
> Source/WebCore/inspector/front-end/ResourcesPanel.js:1344 > + if (this._storagePanel.currentQuery)
Remove this.
> Source/WebCore/inspector/front-end/ResourcesPanel.js:1411 > + delete oldView;
This doesn't make sense, please remove.
Vsevolod Vlasov
Comment 17
2011-05-25 07:49:59 PDT
Created
attachment 94781
[details]
Patch with fixes (In reply to
comment #16
)
> (From update of
attachment 94610
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=94610&action=review
> > > Source/WebCore/inspector/front-end/ResourceView.js:95 > > + _contentLoaded: function (callback, text) > > Why not make it a local function in requestContent?
Done.
> > Source/WebCore/inspector/front-end/ResourceView.js:-220 > > - function contentLoaded(text) > > What's the reason for moving this out of the requestContent?
None :) Moved back in.
> > Source/WebCore/inspector/front-end/ResourcesPanel.js:407 > > + return treeElement.sourceView(); > > Can treeElement be undefined?
No, revision treeElement always already exists when showRevisionView is called.
> > Source/WebCore/inspector/front-end/ResourcesPanel.js:1189 > > + this._resource.addEventListener("errors-warnings-cleared", this._errorsWarningsCleared, this); > > You can listen for ConsoleCleared for consistency, otherwise some console-related events come from Resources while others from the Console directly.
Now listening to both events from resource only to keep logic for resource selection at one place.
> > Source/WebCore/inspector/front-end/ResourcesPanel.js:-1289 > > - if (this._storagePanel.currentQuery) > > Should this check be preserved?
Done.
> > Source/WebCore/inspector/front-end/ResourcesPanel.js:1344 > > + if (this._storagePanel.currentQuery) > > Remove this.
Done.
> > Source/WebCore/inspector/front-end/ResourcesPanel.js:1411 > > + delete oldView; > > This doesn't make sense, please remove.
Done.
Yury Semikhatsky
Comment 18
2011-05-26 07:09:40 PDT
Comment on
attachment 94781
[details]
Patch with fixes View in context:
https://bugs.webkit.org/attachment.cgi?id=94781&action=review
> Source/WebCore/inspector/front-end/ResourceView.js:152 > + this.resource.setContent(this._textModel.text, majorChange, function() {});
Please remove last parameter since it's optional. In similar calls above it's just omitted.
Yury Semikhatsky
Comment 19
2011-05-26 07:28:17 PDT
Comment on
attachment 94781
[details]
Patch with fixes Clearing flags on attachment: 94781 Committed
r87383
: <
http://trac.webkit.org/changeset/87383
>
Yury Semikhatsky
Comment 20
2011-05-26 07:28:42 PDT
All reviewed patches have been landed. Closing bug.
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