[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
caseq at chromium.org
caseq at chromium.org
Wed Dec 22 17:54:57 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2e7f3234d60bad6c63b2e13f2cbb2ab5f7f60a1a
Author: caseq at chromium.org <caseq at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 2 17:42:03 2010 +0000
2010-12-01 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
Re-implementing HAR export functionality that used to be in Resources
tab in Network tab.
https://bugs.webkit.org/show_bug.cgi?id=45663
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype._createTable):
(WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
(WebInspector.NetworkPanel.prototype._contextMenu):
(WebInspector.NetworkPanel.prototype._exportAll):
(WebInspector.NetworkPanel.prototype._exportResource):
(WebInspector.NetworkDataGridNode.prototype.refreshResource):
* inspector/front-end/networkPanel.css:
(.data-grid table.data tr.revealed.network-item):
(.data-grid.filter-other table.data tr.revealed.network-category-other):
2010-12-01 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
Enable resource export to HAR for Chromium.
https://bugs.webkit.org/show_bug.cgi?id=45663
* src/js/DevTools.js: Preferences.resourceExportEnabled = true
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 74f868c..694113d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-12-01 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
+ Re-implementing HAR export functionality that used to be in Resources
+ tab in Network tab.
+ https://bugs.webkit.org/show_bug.cgi?id=45663
+
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkPanel.prototype._createTable):
+ (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
+ (WebInspector.NetworkPanel.prototype._contextMenu):
+ (WebInspector.NetworkPanel.prototype._exportAll):
+ (WebInspector.NetworkPanel.prototype._exportResource):
+ (WebInspector.NetworkDataGridNode.prototype.refreshResource):
+ * inspector/front-end/networkPanel.css:
+ (.data-grid table.data tr.revealed.network-item):
+ (.data-grid.filter-other table.data tr.revealed.network-category-other):
+
2010-12-02 Dai Mikurube <dmikurube at google.com>
Reviewed by Kent Tamura.
diff --git a/WebCore/inspector/front-end/NetworkPanel.js b/WebCore/inspector/front-end/NetworkPanel.js
index 8f3cfd6..9941dbf 100644
--- a/WebCore/inspector/front-end/NetworkPanel.js
+++ b/WebCore/inspector/front-end/NetworkPanel.js
@@ -8,13 +8,13 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -210,6 +210,7 @@ WebInspector.NetworkPanel.prototype = {
columns.timeline.sort = "ascending";
this._dataGrid = new WebInspector.DataGrid(columns);
+ this._dataGrid.element.addEventListener("contextmenu", this._contextMenu.bind(this), true);
this.containerElement.appendChild(this._dataGrid.element);
this._dataGrid.addEventListener("sorting changed", this._sortItems, this);
this._dataGrid.addEventListener("width changed", this._updateDividersIfNeeded, this);
@@ -397,7 +398,7 @@ WebInspector.NetworkPanel.prototype = {
transferSize += (resource.cached || !resource.transferSize) ? 0 : resource.transferSize;
if (resource.isMainResource)
baseTime = resource.startTime;
- if (resource.endTime > maxTime)
+ if (resource.endTime > maxTime)
maxTime = resource.endTime;
}
var text = String.sprintf(WebInspector.UIString("%d requests"), numRequests);
@@ -517,7 +518,7 @@ WebInspector.NetworkPanel.prototype = {
proceed = false;
} else
proceed = this._timelineGrid.updateDividers(force, this.calculator);
-
+
if (!proceed)
return;
@@ -545,13 +546,13 @@ WebInspector.NetworkPanel.prototype = {
loadDividerPadding.style.left = percent + "%";
this._timelineGrid.addEventDivider(loadDividerPadding);
}
-
+
if (this._mainResourceDOMContentTime !== -1) {
var percent = this.calculator.computePercentageFromEventTime(this._mainResourceDOMContentTime);
var domContentDivider = document.createElement("div");
domContentDivider.className = "network-event-divider network-blue-divider";
-
+
var domContentDividerPadding = document.createElement("div");
domContentDividerPadding.className = "network-event-divider-padding";
domContentDividerPadding.title = WebInspector.UIString("DOMContent event fired");
@@ -625,7 +626,7 @@ WebInspector.NetworkPanel.prototype = {
{
if (this._mainResourceLoadTime === x)
return;
-
+
this._mainResourceLoadTime = x || -1;
// Update the dividers to draw the new line
this._updateDividersIfNeeded(true);
@@ -762,7 +763,7 @@ WebInspector.NetworkPanel.prototype = {
this._mainResourceLoadTime = -1;
this._mainResourceDOMContentTime = -1;
-
+
this._viewsContainerElement.removeChildren();
this._viewsContainerElement.appendChild(this._closeButtonElement);
this._resetSummaryBar();
@@ -792,7 +793,7 @@ WebInspector.NetworkPanel.prototype = {
this._staleResources.push(resource);
this._scheduleRefresh();
-
+
if (!resource)
return;
@@ -972,6 +973,35 @@ WebInspector.NetworkPanel.prototype = {
var widths = {};
widths.name = 100;
this._dataGrid.applyColumnWidthsMap(widths);
+ },
+
+ _contextMenu: function(event)
+ {
+ // createBlobURL is enabled conditionally, do not expose resource export if it's not available.
+ if (typeof window.createObjectURL !== "function" || !Preferences.resourceExportEnabled)
+ return;
+
+ var contextMenu = new WebInspector.ContextMenu();
+ var gridNode = this._dataGrid.dataGridNodeFromNode(event.target);
+ var resource = gridNode && gridNode._resource;
+ if (resource)
+ contextMenu.appendItem(WebInspector.UIString("Export to HAR"), this._exportResource.bind(this, resource));
+ contextMenu.appendItem(WebInspector.UIString("Export all to HAR"), this._exportAll.bind(this));
+ contextMenu.show(event);
+ },
+
+ _exportAll: function()
+ {
+ var harArchive = {
+ log: (new WebInspector.HARLog()).build()
+ }
+ offerFileForDownload(JSON.stringify(harArchive));
+ },
+
+ _exportResource: function(resource)
+ {
+ var har = (new WebInspector.HAREntry(resource)).build();
+ offerFileForDownload(JSON.stringify(har));
}
}
@@ -1134,7 +1164,7 @@ WebInspector.NetworkTimeCalculator.prototype = {
return {start: start, middle: middle, end: end};
},
-
+
computePercentageFromEventTime: function(eventTime)
{
// This function computes a percentage in terms of the total loading time
@@ -1364,6 +1394,7 @@ WebInspector.NetworkDataGridNode.prototype = {
if (this._resource.cached)
this._graphElement.addStyleClass("resource-cached");
+ this._element.addStyleClass("network-item");
if (!this._element.hasStyleClass("network-category-" + this._resource.category.name)) {
this._element.removeMatchingStyleClasses("network-category-\\w+");
this._element.addStyleClass("network-category-" + this._resource.category.name);
diff --git a/WebCore/inspector/front-end/networkPanel.css b/WebCore/inspector/front-end/networkPanel.css
index 70ebe56..95ed1bf 100644
--- a/WebCore/inspector/front-end/networkPanel.css
+++ b/WebCore/inspector/front-end/networkPanel.css
@@ -159,13 +159,6 @@
content: "";
}
-.network-sidebar .network-category-images .icon {
- position: relative;
- background-image: url(Images/resourcePlainIcon.png);
- background-repeat: no-repeat;
- content: "";
-}
-
.network-sidebar .data-grid.small .network-category-images .icon {
background-image: url(Images/resourcePlainIconSmall.png);
content: "";
@@ -473,21 +466,19 @@
margin-top: 1px;
}
-.data-grid table.data tr.revealed.network-category-documents, .data-grid table.data tr.revealed.network-category-stylesheets,
-.data-grid table.data tr.revealed.network-category-images, .data-grid table.data tr.revealed.network-category-scripts,
-.data-grid table.data tr.revealed.network-category-xhr, .data-grid table.data tr.revealed.network-category-fonts,
-.data-grid table.data tr.revealed.network-category-websockets, .data-grid table.data tr.revealed.network-category-other {
+.data-grid table.data tr.revealed.network-item {
display: none;
}
-.data-grid.filter-all table.data tr.revealed.network-category-documents, .data-grid.filter-documents table.data tr.revealed.network-category-documents,
-.data-grid.filter-all table.data tr.revealed.network-category-stylesheets, .data-grid.filter-stylesheets table.data tr.revealed.network-category-stylesheets,
-.data-grid.filter-all table.data tr.revealed.network-category-images, .data-grid.filter-images table.data tr.revealed.network-category-images,
-.data-grid.filter-all table.data tr.revealed.network-category-scripts, .data-grid.filter-scripts table.data tr.revealed.network-category-scripts,
-.data-grid.filter-all table.data tr.revealed.network-category-xhr, .data-grid.filter-xhr table.data tr.revealed.network-category-xhr,
-.data-grid.filter-all table.data tr.revealed.network-category-fonts, .data-grid.filter-fonts table.data tr.revealed.network-category-fonts,
-.data-grid.filter-all table.data tr.revealed.network-category-websockets, .data-grid.filter-websockets table.data tr.revealed.network-category-websockets,
-.data-grid.filter-all table.data tr.revealed.network-category-other, .data-grid.filter-other table.data tr.revealed.network-category-other {
+.data-grid.filter-all table.data tr.revealed.network-item,
+.data-grid.filter-documents table.data tr.revealed.network-category-documents,
+.data-grid.filter-stylesheets table.data tr.revealed.network-category-stylesheets,
+.data-grid.filter-images table.data tr.revealed.network-category-images,
+.data-grid.filter-scripts table.data tr.revealed.network-category-scripts,
+.data-grid.filter-xhr table.data tr.revealed.network-category-xhr,
+.data-grid.filter-fonts table.data tr.revealed.network-category-fonts,
+.data-grid.filter-websockets table.data tr.revealed.network-category-websockets,
+.data-grid.filter-other table.data tr.revealed.network-category-other {
display: table-row;
}
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 896fde9..4ed5614 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-01 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
+ Enable resource export to HAR for Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=45663
+
+ * src/js/DevTools.js: Preferences.resourceExportEnabled = true
+
2010-12-02 Vincent Scheib <scheib at chromium.org>
Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 5bb150c..d6536bc 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -47,6 +47,7 @@ var context = {}; // Used by WebCore's inspector routines.
Preferences.onlineDetectionEnabled = false;
Preferences.nativeInstrumentationEnabled = true;
Preferences.fileSystemEnabled = false;
+ Preferences.resourceExportEnabled = true;
Preferences.showTimingTab = true;
Preferences.showCookiesTab = true;
})();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list