WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 32610
Web Inspector: Links to source in CPU profiles should open Scripts (debugger) panel
https://bugs.webkit.org/show_bug.cgi?id=32610
Summary
Web Inspector: Links to source in CPU profiles should open Scripts (debugger)...
Mikhail Naganov
Reported
2009-12-16 06:57:32 PST
It is more convenient to explore performance issues using debugger, not resources panel.
Attachments
Proposed fix
(4.72 KB, patch)
2009-12-16 07:05 PST
,
Mikhail Naganov
pfeldman
: review-
Details
Formatted Diff
Diff
proposed change, comments addressed
(6.68 KB, patch)
2009-12-16 13:55 PST
,
Mikhail Naganov
pfeldman
: review-
Details
Formatted Diff
Diff
Proposed fix, comments addressed
(7.70 KB, patch)
2009-12-17 06:28 PST
,
Mikhail Naganov
pfeldman
: review-
Details
Formatted Diff
Diff
fixed 'line' argument loss for resources panel
(7.71 KB, patch)
2009-12-17 07:21 PST
,
Mikhail Naganov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Mikhail Naganov
Comment 1
2009-12-16 07:05:12 PST
Created
attachment 44973
[details]
Proposed fix
WebKit Review Bot
Comment 2
2009-12-16 07:07:52 PST
style-queue ran check-webkit-style on
attachment 44973
[details]
without any errors.
Pavel Feldman
Comment 3
2009-12-16 09:11:32 PST
Comment on
attachment 44973
[details]
Proposed fix
> WebInspector.canShowResourceForURL = function(url, preferredPanel) > WebInspector.showResourceForURL = function(url, line, preferredPanel)
It would be much more clear if you made Panel's canShowResource and showResource accept URL instead of resource. That way you would be able to make canShowResourceForURL and showResourceForURL here panel-agnostic.
Mikhail Naganov
Comment 4
2009-12-16 13:55:56 PST
Created
attachment 45012
[details]
proposed change, comments addressed
WebKit Review Bot
Comment 5
2009-12-16 14:00:20 PST
style-queue ran check-webkit-style on
attachment 45012
[details]
without any errors.
Pavel Feldman
Comment 6
2009-12-16 14:24:47 PST
Comment on
attachment 45012
[details]
proposed change, comments addressed
> +WebInspector._choosePanelToShowResourceForURL = function(url, preferredPanel) > { > - var resource = this.resourceForURL(url); > - if (!resource) > - return false; > - > + var panel = null; > if (preferredPanel && preferredPanel in WebInspector.panels) { > - var panel = this.panels[preferredPanel]; > - if (!("showResource" in panel)) > + panel = this.panels[preferredPanel]; > + if (!("showResourceForURL" in panel)) > panel = null; > - else if ("canShowResource" in panel && !panel.canShowResource(resource)) > + else if ("canShowResourceForURL" in panel && !panel.canShowResourceForURL(url)) > panel = null; > } > + if (!panel && preferredPanel != "resources") > + return this._choosePanelToShowResourceForURL(url, "resources"); > + return panel; > +}
Can we implement this a bit more simple? - Require that any preferredPanel has necessary canShow and show methods - first check against preferredPanel, in case of failure explicitly check against resources. No need to reenter method.
> + > +WebInspector.showResourceForURL = function(url, line, preferredPanel) > +{
This name no longer applies. WebInspector.showScriptOrResourceForURL ? r- for confusing logic in _choosePanelToShowResourceForURL and name of the method.
Mikhail Naganov
Comment 7
2009-12-17 06:28:38 PST
Created
attachment 45060
[details]
Proposed fix, comments addressed
WebKit Review Bot
Comment 8
2009-12-17 06:30:28 PST
style-queue ran check-webkit-style on
attachment 45060
[details]
without any errors.
Pavel Feldman
Comment 9
2009-12-17 07:20:08 PST
Comment on
attachment 45060
[details]
Proposed fix, comments addressed
> + showSourceLineForURL: function(url, line) > + { > + this.showResource(WebInspector.resourceForURL(url));
You lose line information here. Rest is Ok.
Mikhail Naganov
Comment 10
2009-12-17 07:21:00 PST
Created
attachment 45064
[details]
fixed 'line' argument loss for resources panel
WebKit Review Bot
Comment 11
2009-12-17 07:22:17 PST
style-queue ran check-webkit-style on
attachment 45064
[details]
without any errors.
WebKit Commit Bot
Comment 12
2009-12-17 07:34:42 PST
Comment on
attachment 45064
[details]
fixed 'line' argument loss for resources panel Clearing flags on attachment: 45064 Committed
r52253
: <
http://trac.webkit.org/changeset/52253
>
WebKit Commit Bot
Comment 13
2009-12-17 07:34:48 PST
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