[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
pfeldman at chromium.org
pfeldman at chromium.org
Wed Dec 22 15:30:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit df915828d94d03b2ab54c60fd8a261518d3286f3
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 5 14:25:23 2010 +0000
2010-11-05 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: XHR logging in console should give complete view of resource.
https://bugs.webkit.org/show_bug.cgi?id=48998
Drive-by fixes: linkify line number to scripts panel, fall back to resources;
enable multiline console entry on shift modifier as well.
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel):
(WebInspector.NetworkPanel.prototype._reset):
(WebInspector.NetworkPanel.prototype.refreshResource):
(WebInspector.NetworkPanel.prototype.canShowSourceLine):
(WebInspector.NetworkPanel.prototype.showSourceLine):
* inspector/front-end/StoragePanel.js:
(WebInspector.StoragePanel.prototype.show):
(WebInspector.StoragePanel.prototype.showSourceLine):
* inspector/front-end/inspector.js:
(WebInspector.showPanel):
(WebInspector.linkifyStringAsFragment):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index def4fa9..8d025ec 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-11-05 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: XHR logging in console should give complete view of resource.
+ https://bugs.webkit.org/show_bug.cgi?id=48998
+
+ Drive-by fixes: linkify line number to scripts panel, fall back to resources;
+ enable multiline console entry on shift modifier as well.
+
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkPanel):
+ (WebInspector.NetworkPanel.prototype._reset):
+ (WebInspector.NetworkPanel.prototype.refreshResource):
+ (WebInspector.NetworkPanel.prototype.canShowSourceLine):
+ (WebInspector.NetworkPanel.prototype.showSourceLine):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel.prototype.show):
+ (WebInspector.StoragePanel.prototype.showSourceLine):
+ * inspector/front-end/inspector.js:
+ (WebInspector.showPanel):
+ (WebInspector.linkifyStringAsFragment):
+
2010-10-27 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Steve Block.
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 093c40a..737b84f 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -508,7 +508,7 @@ WebInspector.ConsoleView.prototype = {
_enterKeyPressed: function(event)
{
- if (event.altKey || event.ctrlKey)
+ if (event.altKey || event.ctrlKey || event.shiftKey)
return;
event.preventDefault();
diff --git a/WebCore/inspector/front-end/NetworkPanel.js b/WebCore/inspector/front-end/NetworkPanel.js
index 320f7c5..71433af 100644
--- a/WebCore/inspector/front-end/NetworkPanel.js
+++ b/WebCore/inspector/front-end/NetworkPanel.js
@@ -37,6 +37,7 @@ WebInspector.NetworkPanel = function()
this._resources = [];
this._resourcesById = {};
+ this._resourcesByURL = {};
this._lastIdentifier = 0;
this._staleResources = [];
this._resourceGridNodes = {};
@@ -771,6 +772,7 @@ WebInspector.NetworkPanel.prototype = {
this._resources = [];
this._resourcesById = {};
+ this._resourcesByURL = {};
this._staleResources = [];
this._resourceGridNodes = {};
@@ -800,6 +802,7 @@ WebInspector.NetworkPanel.prototype = {
if (!this._resourcesById[resource.identifier]) {
this._resources.push(resource);
this._resourcesById[resource.identifier] = resource;
+ this._resourcesByURL[resource.url] = resource;
// Pull all the redirects of the main resource upon commit load.
if (resource.redirects) {
@@ -836,11 +839,12 @@ WebInspector.NetworkPanel.prototype = {
canShowSourceLine: function(url, line)
{
- return false;
+ return !!this._resourcesByURL[url];
},
showSourceLine: function(url, line)
{
+ this._showResource(this._resourcesByURL[url], line);
},
_showResource: function(resource, line)
diff --git a/WebCore/inspector/front-end/StoragePanel.js b/WebCore/inspector/front-end/StoragePanel.js
index 7b3d2ac..eb4eabb 100644
--- a/WebCore/inspector/front-end/StoragePanel.js
+++ b/WebCore/inspector/front-end/StoragePanel.js
@@ -101,7 +101,7 @@ WebInspector.StoragePanel.prototype = {
if (this.visibleView instanceof WebInspector.ResourceView) {
// SourceViews are shared between the panels.
- this.visibleView.headersVisible = true;
+ this.visibleView.headersVisible = false;
this.visibleView.show(this.storageViews);
}
@@ -337,6 +337,15 @@ WebInspector.StoragePanel.prototype = {
showSourceLine: function(url, line)
{
+ var resource = WebInspector.resourceManager.resourceForURL(url);
+ if (resource.type === WebInspector.Resource.Type.XHR) {
+ // Show XHRs in the network panel only.
+ if (WebInspector.panels.network && WebInspector.panels.network.canShowSourceLine(url, line)) {
+ WebInspector.currentPanel = WebInspector.panels.network;
+ WebInspector.panels.network.showSourceLine(url, line);
+ }
+ return;
+ }
this.showResource(WebInspector.resourceManager.resourceForURL(url), line);
},
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 7c56eb5..6efd1e4 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -546,7 +546,7 @@ WebInspector.doLoadedDone = function()
for (var panelName in this.panels)
previousToolbarItem = WebInspector.addPanelToolbarIcon(toolbarElement, this.panels[panelName], previousToolbarItem);
- // FIXME: fix this once renated StoragePanel.js to ResourcesPanel.js
+ // FIXME: fix this once renamed StoragePanel.js to ResourcesPanel.js
this.panels.storage._toolbarItem.removeStyleClass("storage");
this.panels.storage._toolbarItem.addStyleClass("resources");
@@ -1206,6 +1206,10 @@ WebInspector.showChanges = function()
WebInspector.showPanel = function(panel)
{
+ // FIXME: fix this once renamed StoragePanel.js to ResourcesPanel.js
+ if (panel === "resources")
+ panel = "storage";
+
if (!(panel in this.panels))
panel = "elements";
this.currentPanel = this.panels[panel];
@@ -1638,6 +1642,7 @@ WebInspector.linkifyStringAsFragment = function(string)
{
var container = document.createDocumentFragment();
var linkStringRegEx = /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/|www\.)[\w$\-_+*'=\|\/\\(){}[\]%@&#~,:;.!?]{2,}[\w$\-_+*=\|\/\\({%@&#~]/;
+ var lineColumnRegEx = /:(\d+)(:(\d+))?$/;
while (string) {
var linkString = linkStringRegEx.exec(string);
@@ -1655,8 +1660,17 @@ WebInspector.linkifyStringAsFragment = function(string)
title = WebInspector.panels.profiles.displayTitleForProfileLink(profileStringMatches[2], profileStringMatches[1]);
var realURL = (linkString.indexOf("www.") === 0 ? "http://" + linkString : linkString);
+ var lineColumnMatch = lineColumnRegEx.exec(realURL);
+ if (lineColumnMatch)
+ realURL = realURL.substring(0, realURL.length - lineColumnMatch[0].length);
+
var hasResourceWithURL = !!WebInspector.resourceForURL(realURL);
- container.appendChild(WebInspector.linkifyURLAsNode(realURL, title, null, hasResourceWithURL));
+ var urlNode = WebInspector.linkifyURLAsNode(realURL, title, null, hasResourceWithURL);
+ container.appendChild(urlNode);
+ if (lineColumnMatch) {
+ urlNode.setAttribute("line_number", lineColumnMatch[1]);
+ urlNode.setAttribute("preferred_panel", "scripts");
+ }
string = string.substring(linkIndex + linkString.length, string.length);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list