[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
mnaganov at chromium.org
mnaganov at chromium.org
Mon Feb 21 00:38:23 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit b3f6fb1ee9fa0f53955ed3bc39bca381118a1a26
Author: mnaganov at chromium.org <mnaganov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 2 18:55:35 2011 +0000
2011-02-02 Mikhail Naganov <mnaganov at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Chromium] Landing detailed heap snapshots, part 2.
https://bugs.webkit.org/show_bug.cgi?id=53606
Display progress while taking a snapshot, and hints while loading
and parsing. This is needed because taking detailed heap snapshots
takes time.
* English.lproj/localizedStrings.js:
* inspector/front-end/DetailedHeapshotView.js:
(WebInspector.DetailedHeapshotProfileType.prototype.buttonClicked):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype._addProfileHeader):
(WebInspector.ProfilesPanel.prototype.getProfiles):
(WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
(WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
(WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
(WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
(WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
* inspector/front-end/SidebarTreeElement.js:
(WebInspector.SidebarTreeElement.prototype.refreshTitles):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 0fe849a..9652980 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2011-02-02 Mikhail Naganov <mnaganov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Chromium] Landing detailed heap snapshots, part 2.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53606
+
+ Display progress while taking a snapshot, and hints while loading
+ and parsing. This is needed because taking detailed heap snapshots
+ takes time.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/DetailedHeapshotView.js:
+ (WebInspector.DetailedHeapshotProfileType.prototype.buttonClicked):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype._reset):
+ (WebInspector.ProfilesPanel.prototype._addProfileHeader):
+ (WebInspector.ProfilesPanel.prototype.getProfiles):
+ (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
+ (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
+ (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
+ (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
+ (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
+ * inspector/front-end/SidebarTreeElement.js:
+ (WebInspector.SidebarTreeElement.prototype.refreshTitles):
+
2011-02-02 David Hyatt <hyatt at apple.com>
Reviewed by Darin Adler.
diff --git a/Source/WebCore/English.lproj/localizedStrings.js b/Source/WebCore/English.lproj/localizedStrings.js
index 0fb4be8..10cb757 100644
Binary files a/Source/WebCore/English.lproj/localizedStrings.js and b/Source/WebCore/English.lproj/localizedStrings.js differ
diff --git a/Source/WebCore/inspector/front-end/DetailedHeapshotView.js b/Source/WebCore/inspector/front-end/DetailedHeapshotView.js
index cbe265c..5291bf2 100644
--- a/Source/WebCore/inspector/front-end/DetailedHeapshotView.js
+++ b/Source/WebCore/inspector/front-end/DetailedHeapshotView.js
@@ -70,7 +70,7 @@ WebInspector.DetailedHeapshotProfileType.prototype = {
buttonClicked: function()
{
- InspectorBackend.takeHeapSnapshot(true);
+ WebInspector.panels.profiles.takeHeapSnapshot(true);
},
get welcomeMessage()
diff --git a/Source/WebCore/inspector/front-end/ProfilesPanel.js b/Source/WebCore/inspector/front-end/ProfilesPanel.js
index 653760b..b87ea7f 100644
--- a/Source/WebCore/inspector/front-end/ProfilesPanel.js
+++ b/Source/WebCore/inspector/front-end/ProfilesPanel.js
@@ -195,7 +195,7 @@ WebInspector.ProfilesPanel.prototype = {
this._profiles = [];
this._profilesIdMap = {};
this._profileGroups = {};
- this._profileGroupsForLinks = {}
+ this._profileGroupsForLinks = {};
this._profilesWereRequested = false;
this.sidebarTreeElement.removeStyleClass("some-expandable");
@@ -259,6 +259,13 @@ WebInspector.ProfilesPanel.prototype = {
_addProfileHeader: function(profile)
{
+ if (this.hasTemporaryProfile(profile.typeId)) {
+ if (profile.typeId === WebInspector.CPUProfileType.TypeId)
+ this._removeProfileHeader(this._temporaryRecordingProfile);
+ else
+ this._removeProfileHeader(this._temporaryTakingSnapshot);
+ }
+
var typeId = profile.typeId;
var profileType = this.getProfileType(typeId);
var sidebarParent = profileType.treeElement;
@@ -308,6 +315,7 @@ WebInspector.ProfilesPanel.prototype = {
}
var profileTreeElement = profileType.createSidebarTreeElementForProfile(profile);
+ profile.sideBarElement = profileTreeElement;
profileTreeElement.small = small;
if (alternateTitle)
profileTreeElement.mainTitle = alternateTitle;
@@ -379,9 +387,11 @@ WebInspector.ProfilesPanel.prototype = {
{
var result = [];
var profilesCount = this._profiles.length;
- for (var i = 0; i < profilesCount; ++i)
- if (this._profiles[i].typeId === typeId)
- result.push(this._profiles[i]);
+ for (var i = 0; i < profilesCount; ++i) {
+ var profile = this._profiles[i];
+ if (!profile.isTemporary && profile.typeId === typeId)
+ result.push(profile);
+ }
return result;
},
@@ -399,17 +409,6 @@ WebInspector.ProfilesPanel.prototype = {
return !!this._profilesIdMap[this._makeKey(profile.uid, profile.typeId)];
},
- updateProfile: function(profile)
- {
- var profilesCount = this._profiles.length;
- for (var i = 0; i < profilesCount; ++i)
- if (this._profiles[i].typeId === profile.typeId
- && this._profiles[i].uid === profile.uid) {
- this._profiles[i] = profile;
- break;
- }
- },
-
loadHeapSnapshot: function(uid, callback)
{
var profile = this._profilesIdMap[this._makeKey(uid, WebInspector.HeapSnapshotProfileType.TypeId)];
@@ -424,6 +423,7 @@ WebInspector.ProfilesPanel.prototype = {
profile._is_loading = true;
profile._callbacks = [callback];
profile._json = "";
+ profile.sideBarElement.subtitle = WebInspector.UIString("Loading…");
InspectorBackend.getProfile(profile.typeId, profile.uid);
}
},
@@ -445,13 +445,23 @@ WebInspector.ProfilesPanel.prototype = {
var callbacks = profile._callbacks;
delete profile._callbacks;
- var loadedSnapshot = JSON.parse(profile._json);
- delete profile._json;
- delete profile._is_loading;
- profile._loaded = true;
- WebInspector.HeapSnapshotView.prototype.processLoadedSnapshot(profile, loadedSnapshot);
- for (var i = 0; i < callbacks.length; ++i)
- callbacks[i](profile);
+ profile.sideBarElement.subtitle = WebInspector.UIString("Parsing…");
+ window.setTimeout(doParse, 0);
+
+ function doParse()
+ {
+ var loadedSnapshot = JSON.parse(profile._json);
+ delete profile._json;
+ delete profile._is_loading;
+ profile._loaded = true;
+ profile.sideBarElement.subtitle = "";
+ if (!Preferences.detailedHeapProfiles)
+ WebInspector.HeapSnapshotView.prototype.processLoadedSnapshot(profile, loadedSnapshot);
+ else
+ WebInspector.DetailedHeapshotView.prototype.processLoadedSnapshot(profile, loadedSnapshot);
+ for (var i = 0; i < callbacks.length; ++i)
+ callbacks[i](profile);
+ }
},
showView: function(view)
@@ -635,8 +645,29 @@ WebInspector.ProfilesPanel.prototype = {
this.updateProfileTypeButtons();
},
+ takeHeapSnapshot: function(detailed)
+ {
+ if (!this.hasTemporaryProfile(WebInspector.HeapSnapshotProfileType.TypeId)) {
+ if (!this._temporaryTakingSnapshot) {
+ this._temporaryTakingSnapshot = {
+ typeId: WebInspector.HeapSnapshotProfileType.TypeId,
+ title: WebInspector.UIString("Snapshotting…"),
+ uid: -1,
+ isTemporary: true
+ };
+ }
+ this._addProfileHeader(this._temporaryTakingSnapshot);
+ }
+ InspectorBackend.takeHeapSnapshot(detailed);
+ },
+
_reportHeapSnapshotProgress: function(done, total)
{
+ if (this.hasTemporaryProfile(WebInspector.HeapSnapshotProfileType.TypeId)) {
+ this._temporaryTakingSnapshot.sideBarElement.subtitle = WebInspector.UIString("%.2f%%", (done / total) * 100);
+ if (done >= total)
+ this._removeProfileHeader(this._temporaryTakingSnapshot);
+ }
}
}
@@ -730,16 +761,6 @@ WebInspector.ProfileSidebarTreeElement.prototype = {
this.refreshTitles();
},
- get subtitle()
- {
- // There is no subtitle.
- },
-
- set subtitle(x)
- {
- // Can't change subtitle.
- },
-
set searchMatches(matches)
{
if (!matches) {
diff --git a/Source/WebCore/inspector/front-end/SidebarTreeElement.js b/Source/WebCore/inspector/front-end/SidebarTreeElement.js
index c08b0ef..a27c457 100644
--- a/Source/WebCore/inspector/front-end/SidebarTreeElement.js
+++ b/Source/WebCore/inspector/front-end/SidebarTreeElement.js
@@ -164,8 +164,10 @@ WebInspector.SidebarTreeElement.prototype = {
if (this.subtitleElement.textContent !== subtitle)
this.subtitleElement.textContent = subtitle;
this.titlesElement.removeStyleClass("no-subtitle");
- } else
+ } else {
+ this.subtitleElement.textContent = "";
this.titlesElement.addStyleClass("no-subtitle");
+ }
},
isEventWithinDisclosureTriangle: function(event)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list