summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end')
-rw-r--r--WebCore/inspector/front-end/BreakpointsSidebarPane.js12
-rw-r--r--WebCore/inspector/front-end/DOMAgent.js127
-rw-r--r--WebCore/inspector/front-end/ElementsPanel.js14
-rw-r--r--WebCore/inspector/front-end/ElementsTreeOutline.js18
-rw-r--r--WebCore/inspector/front-end/ExtensionServer.js12
-rw-r--r--WebCore/inspector/front-end/HAREntry.js6
-rw-r--r--WebCore/inspector/front-end/InspectorFrontendHostStub.js5
-rw-r--r--WebCore/inspector/front-end/Resource.js25
-rw-r--r--WebCore/inspector/front-end/Script.js3
-rw-r--r--WebCore/inspector/front-end/ScriptsPanel.js12
-rw-r--r--WebCore/inspector/front-end/SourceFrame.js4
-rw-r--r--WebCore/inspector/front-end/SourceView.js3
-rw-r--r--WebCore/inspector/front-end/WebKit.qrc1
-rw-r--r--WebCore/inspector/front-end/heapProfiler.css136
-rw-r--r--WebCore/inspector/front-end/inspector.css109
-rw-r--r--WebCore/inspector/front-end/inspector.html1
-rw-r--r--WebCore/inspector/front-end/inspector.js8
17 files changed, 311 insertions, 185 deletions
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
index 3a0860f..cda72fb 100644
--- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js
+++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
@@ -106,7 +106,7 @@ WebInspector.BreakpointItem = function(breakpoint)
this._element.appendChild(checkboxElement);
this._breakpoint.addEventListener("enable-changed", this._enableChanged, this);
- this._breakpoint.addEventListener("removed", this._removed, this);
+ this._breakpoint.addEventListener("removed", this.dispatchEventToListeners.bind(this, "removed"));
}
WebInspector.BreakpointItem.prototype = {
@@ -128,15 +128,10 @@ WebInspector.BreakpointItem.prototype = {
event.stopPropagation();
},
- _enableChanged: function()
+ _enableChanged: function(event)
{
var checkbox = this._element.firstChild;
checkbox.checked = this._breakpoint.enabled;
- },
-
- _removed: function()
- {
- this.dispatchEventToListeners("removed");
}
}
@@ -188,7 +183,8 @@ WebInspector.DOMBreakpointItem = function(breakpoint)
{
WebInspector.BreakpointItem.call(this, breakpoint);
- var link = WebInspector.panels.elements.linkifyNodeReference(this._breakpoint.node);
+ var node = WebInspector.domAgent.nodeForId(this._breakpoint.nodeId);
+ var link = WebInspector.panels.elements.linkifyNodeReference(node);
this._element.appendChild(link);
var type = WebInspector.DOMBreakpoint.labelForType(this._breakpoint.type);
diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js
index 5aaa0d3..9b386c3 100644
--- a/WebCore/inspector/front-end/DOMAgent.js
+++ b/WebCore/inspector/front-end/DOMAgent.js
@@ -143,6 +143,40 @@ WebInspector.DOMNode.prototype = {
this.ownerDocument._domAgent.removeAttributeAsync(this, name, callback);
},
+ path: function()
+ {
+ var path = [];
+ var node = this;
+ while (node && "index" in node && node.nodeName.length) {
+ path.push([node.index, node.nodeName]);
+ node = node.parentNode;
+ }
+ path.reverse();
+ return path.join(",");
+ },
+
+ setBreakpoint: function(type)
+ {
+ return WebInspector.domBreakpointManager.setBreakpoint(this.id, type, true, this.path());
+ },
+
+ hasBreakpoint: function(type)
+ {
+ return !!WebInspector.domBreakpointManager.findBreakpoint(this.id, type);
+ },
+
+ removeBreakpoint: function(type)
+ {
+ var breakpoint = WebInspector.domBreakpointManager.findBreakpoint(this.id, type);
+ if (breakpoint)
+ breakpoint.remove();
+ },
+
+ removeBreakpoints: function()
+ {
+ WebInspector.domBreakpointManager.removeBreakpointsForNode(this.id);
+ },
+
_setAttributesPayload: function(attrs)
{
this.attributes = [];
@@ -362,6 +396,7 @@ WebInspector.DOMAgent.prototype = {
this.document = new WebInspector.DOMDocument(this, this._window, payload);
this._idToDOMNode[payload.id] = this.document;
this._bindNodes(this.document.children);
+ WebInspector.domBreakpointManager.restoreBreakpoints();
} else
this.document = null;
WebInspector.panels.elements.setDocument(this.document);
@@ -418,7 +453,17 @@ WebInspector.DOMAgent.prototype = {
var event = { target : node, relatedNode : parent };
this.document._fireDomEvent("DOMNodeRemoved", event);
delete this._idToDOMNode[nodeId];
- }
+ this._removeBreakpoints(node);
+ },
+
+ _removeBreakpoints: function(node)
+ {
+ node.removeBreakpoints();
+ if (!node.children)
+ return;
+ for (var i = 0; i < node.children.length; ++i)
+ this._removeBreakpoints(node.children[i]);
+ }
}
WebInspector.ApplicationCache = {}
@@ -679,20 +724,24 @@ WebInspector.childNodeRemoved = function()
WebInspector.DOMBreakpointManager = function()
{
this._breakpoints = {};
+ this._pathCache = {};
}
WebInspector.DOMBreakpointManager.prototype = {
- setBreakpoint: function(node, type)
+ setBreakpoint: function(nodeId, type, enabled, path)
{
- if (!(node.id in this._breakpoints))
- this._breakpoints[node.id] = {};
- else if (type in this._breakpoints[node.id])
+ if (!(nodeId in this._breakpoints))
+ this._breakpoints[nodeId] = {};
+ else if (type in this._breakpoints[nodeId])
return;
- var breakpoint = new WebInspector.DOMBreakpoint(node, type);
- this._breakpoints[node.id][type] = breakpoint;
+ var breakpoint = new WebInspector.DOMBreakpoint(nodeId, type, enabled);
+ this._breakpoints[nodeId][type] = breakpoint;
breakpoint.addEventListener("removed", this._breakpointRemoved, this);
+ if (!(nodeId in this._pathCache))
+ this._pathCache[nodeId] = path;
+
this.dispatchEventToListeners("dom-breakpoint-added", breakpoint);
},
@@ -703,9 +752,9 @@ WebInspector.DOMBreakpointManager.prototype = {
return nodeBreakpoints[type];
},
- removeBreakpointsForNode: function(node)
+ removeBreakpointsForNode: function(nodeId)
{
- var nodeBreakpoints = this._breakpoints[node.id];
+ var nodeBreakpoints = this._breakpoints[nodeId];
for (var type in nodeBreakpoints)
nodeBreakpoints[type].remove();
},
@@ -714,23 +763,49 @@ WebInspector.DOMBreakpointManager.prototype = {
{
var breakpoint = event.target;
- var nodeBreakpoints = this._breakpoints[breakpoint.node.id];
+ var nodeBreakpoints = this._breakpoints[breakpoint.nodeId];
delete nodeBreakpoints[breakpoint.type];
for (var type in nodeBreakpoints)
return;
- delete this._breakpoints[breakpoint.node.id];
+
+ delete this._breakpoints[breakpoint.nodeId];
+ delete this._pathCache[breakpoint.nodeId];
+ },
+
+ restoreBreakpoints: function()
+ {
+ var breakpoints = this._breakpoints;
+ this._breakpoints = {};
+ var pathCache = this._pathCache;
+ this._pathCache = {};
+
+ for (var oldNodeId in breakpoints) {
+ var path = pathCache[oldNodeId];
+ InspectorBackend.pushNodeByPathToFrontend(path, restoreBreakpointsForNode.bind(this, breakpoints[oldNodeId], path));
+ }
+
+ function restoreBreakpointsForNode(nodeBreakpoints, path, nodeId)
+ {
+ if (!nodeId)
+ return;
+ for (var type in nodeBreakpoints) {
+ var breakpoint = nodeBreakpoints[type];
+ this.setBreakpoint(nodeId, breakpoint.type, breakpoint.enabled, path);
+ }
+ }
}
}
WebInspector.DOMBreakpointManager.prototype.__proto__ = WebInspector.Object.prototype;
-WebInspector.DOMBreakpoint = function(node, type)
+WebInspector.DOMBreakpoint = function(nodeId, type, enabled)
{
- this.node = node;
- this.type = type;
- this._enabled = true;
+ this._nodeId = nodeId;
+ this._type = type;
+ this._enabled = enabled;
- InspectorBackend.setDOMBreakpoint(this.node.id, this.type);
+ if (this.enabled)
+ InspectorBackend.setDOMBreakpoint(this.nodeId, this.type);
}
WebInspector.DOMBreakpoint.Types = {
@@ -762,6 +837,16 @@ WebInspector.DOMBreakpoint.contextMenuLabelForType = function(type)
}
WebInspector.DOMBreakpoint.prototype = {
+ get nodeId()
+ {
+ return this._nodeId;
+ },
+
+ get type()
+ {
+ return this._type;
+ },
+
get enabled()
{
return this._enabled;
@@ -773,18 +858,18 @@ WebInspector.DOMBreakpoint.prototype = {
return;
this._enabled = enabled;
- if (this._enabled)
- InspectorBackend.setDOMBreakpoint(this.node.id, this.type);
+ if (this.enabled)
+ InspectorBackend.setDOMBreakpoint(this.nodeId, this.type);
else
- InspectorBackend.removeDOMBreakpoint(this.node.id, this.type);
+ InspectorBackend.removeDOMBreakpoint(this.nodeId, this.type);
this.dispatchEventToListeners("enable-changed");
},
remove: function()
{
- if (this._enabled)
- InspectorBackend.removeDOMBreakpoint(this.node.id, this.type);
+ if (this.enabled)
+ InspectorBackend.removeDOMBreakpoint(this.nodeId, this.type);
this.dispatchEventToListeners("removed");
}
}
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index e1bc637..c60d4b1 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -159,16 +159,8 @@ WebInspector.ElementsPanel.prototype = {
reset: function()
{
- if (this.focusedDOMNode) {
- this._selectedPathOnReset = [];
- var node = this.focusedDOMNode;
- while ("index" in node && node.nodeName && node.nodeName.length) {
- this._selectedPathOnReset.push(node.nodeName);
- this._selectedPathOnReset.push(node.index);
- node = node.parentNode;
- }
- this._selectedPathOnReset.reverse();
- }
+ if (this.focusedDOMNode)
+ this._selectedPathOnReset = this.focusedDOMNode.path();
this.rootDOMNode = null;
this.focusedDOMNode = null;
@@ -225,7 +217,7 @@ WebInspector.ElementsPanel.prototype = {
}
if (this._selectedPathOnReset)
- InspectorBackend.pushNodeByPathToFrontend(this._selectedPathOnReset.join(","), selectLastSelectedNode.bind(this));
+ InspectorBackend.pushNodeByPathToFrontend(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
else
selectNode.call(this);
delete this._selectedPathOnReset;
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index ba3b320..10131f4 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -765,15 +765,17 @@ WebInspector.ElementsTreeElement.prototype = {
if (Preferences.domBreakpointsEnabled) {
// Add debbuging-related actions
contextMenu.appendSeparator();
- for (var type in WebInspector.DOMBreakpoint.Types) {
- var typeId = WebInspector.DOMBreakpoint.Types[type];
- var label = WebInspector.DOMBreakpoint.contextMenuLabelForType(typeId);
- var breakpoint = WebInspector.domBreakpointManager.findBreakpoint(this.representedObject.id, typeId);
- if (!breakpoint)
- var handler = WebInspector.domBreakpointManager.setBreakpoint.bind(WebInspector.domBreakpointManager, this.representedObject, typeId);
+
+ var node = this.representedObject;
+ for (var key in WebInspector.DOMBreakpoint.Types) {
+ var type = WebInspector.DOMBreakpoint.Types[key];
+ var label = WebInspector.DOMBreakpoint.contextMenuLabelForType(type);
+ var hasBreakpoint = node.hasBreakpoint(type);
+ if (!hasBreakpoint)
+ var handler = node.setBreakpoint.bind(node, type);
else
- var handler = breakpoint.remove.bind(breakpoint);
- contextMenu.appendCheckboxItem(label, handler, !!breakpoint);
+ var handler = node.removeBreakpoint.bind(node, type);
+ contextMenu.appendCheckboxItem(label, handler, hasBreakpoint);
}
}
},
diff --git a/WebCore/inspector/front-end/ExtensionServer.js b/WebCore/inspector/front-end/ExtensionServer.js
index f410d8c..bdf3a25 100644
--- a/WebCore/inspector/front-end/ExtensionServer.js
+++ b/WebCore/inspector/front-end/ExtensionServer.js
@@ -103,7 +103,7 @@ WebInspector.ExtensionServer.prototype = {
{
return {
id: resource.identifier,
- type: resource.type,
+ type: WebInspector.Resource.Type.toString(resource.type),
har: (new WebInspector.HAREntry(resource)).build(),
};
},
@@ -321,10 +321,20 @@ WebInspector.ExtensionServer.prototype = {
_buildExtensionAPIInjectedScript: function()
{
+ var resourceTypes = {};
+ var resourceTypeProperties = Object.getOwnPropertyNames(WebInspector.Resource.Type);
+ for (var i = 0; i < resourceTypeProperties.length; ++i) {
+ var propName = resourceTypeProperties[i];
+ var propValue = WebInspector.Resource.Type[propName];
+ if (typeof propValue === "number")
+ resourceTypes[propName] = WebInspector.Resource.Type.toString(propValue);
+ }
+
return "(function(){ " +
"var private = {};" +
"(" + WebInspector.commonExtensionSymbols.toString() + ")(private);" +
"(" + WebInspector.injectedExtensionAPI.toString() + ").apply(this, arguments);" +
+ "webInspector.resources.Types = " + JSON.stringify(resourceTypes) + ";" +
"})";
},
diff --git a/WebCore/inspector/front-end/HAREntry.js b/WebCore/inspector/front-end/HAREntry.js
index c06e64f..9f188ed 100644
--- a/WebCore/inspector/front-end/HAREntry.js
+++ b/WebCore/inspector/front-end/HAREntry.js
@@ -116,11 +116,13 @@ WebInspector.HAREntry.prototype = {
_buildPostData: function()
{
- return {
+ var res = {
mimeType: this._resource.requestHeaderValue("Content-Type"),
- params: this._buildParameters(this._resource.formParameters),
text: this._resource.requestFormData
};
+ if (this._resource.formParameters)
+ res.params = this._buildParameters(this._resource.formParameters);
+ return res;
},
_buildParameters: function(parameters)
diff --git a/WebCore/inspector/front-end/InspectorFrontendHostStub.js b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
index c4e6bf4..07f392d 100644
--- a/WebCore/inspector/front-end/InspectorFrontendHostStub.js
+++ b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
@@ -64,6 +64,11 @@ WebInspector.InspectorFrontendHostStub.prototype = {
this._windowVisible = false;
},
+ disconnectFromBackend: function()
+ {
+ this._windowVisible = false;
+ },
+
attach: function()
{
},
diff --git a/WebCore/inspector/front-end/Resource.js b/WebCore/inspector/front-end/Resource.js
index 06a610d..de87047 100644
--- a/WebCore/inspector/front-end/Resource.js
+++ b/WebCore/inspector/front-end/Resource.js
@@ -52,24 +52,33 @@ WebInspector.Resource.Type = {
return (type === this.Document) || (type === this.Stylesheet) || (type === this.Script) || (type === this.XHR);
},
+ toUIString: function(type)
+ {
+ return WebInspector.UIString(WebInspector.Resource.Type.toString(type));
+ },
+
+ // Returns locale-independent string identifier of resource type (primarily for use in extension API).
+ // The IDs need to be kept in sync with webInspector.resoureces.Types object in ExtensionAPI.js.
toString: function(type)
{
switch (type) {
case this.Document:
- return WebInspector.UIString("document");
+ return "document";
case this.Stylesheet:
- return WebInspector.UIString("stylesheet");
+ return "stylesheet";
case this.Image:
- return WebInspector.UIString("image");
+ return "image";
case this.Font:
- return WebInspector.UIString("font");
+ return "font";
case this.Script:
- return WebInspector.UIString("script");
+ return "script";
case this.XHR:
- return WebInspector.UIString("XHR");
+ return "XHR";
+ case this.Media:
+ return "media";
case this.Other:
default:
- return WebInspector.UIString("other");
+ return "other";
}
}
}
@@ -603,7 +612,7 @@ WebInspector.Resource.prototype = {
this.url,
null,
1,
- String.sprintf(WebInspector.Warnings.IncorrectMIMEType.message, WebInspector.Resource.Type.toString(this.type), this.mimeType),
+ String.sprintf(WebInspector.Warnings.IncorrectMIMEType.message, WebInspector.Resource.Type.toUIString(this.type), this.mimeType),
null,
null);
break;
diff --git a/WebCore/inspector/front-end/Script.js b/WebCore/inspector/front-end/Script.js
index 42d6850..be3f020 100644
--- a/WebCore/inspector/front-end/Script.js
+++ b/WebCore/inspector/front-end/Script.js
@@ -62,11 +62,14 @@ WebInspector.Script.prototype = {
{
if (!this.source)
return 0;
+ if (this._linesCount)
+ return this._linesCount;
this._linesCount = 0;
var lastIndex = this.source.indexOf("\n");
while (lastIndex !== -1) {
lastIndex = this.source.indexOf("\n", lastIndex + 1)
this._linesCount++;
}
+ return this._linesCount;
}
}
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index 75fd6f7..c5267f7 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -276,14 +276,6 @@ WebInspector.ScriptsPanel.prototype = {
// Remove script from the files list.
script.filesSelectOption.parentElement.removeChild(script.filesSelectOption);
-
- // Move breakpoints to the resource's frame.
- if (script._scriptView) {
- var sourceFrame = script._scriptView.sourceFrame;
- var resourceFrame = this._sourceFrameForScriptOrResource(resource);
- for (var j = 0; j < sourceFrame.breakpoints; ++j)
- resourceFrame.addBreakpoint(sourceFrame.breakpoints[j]);
- }
}
// Adding first script will add resource.
this._addScriptToFilesMenu(resource._scriptsPendingResourceLoad[0]);
@@ -599,10 +591,6 @@ WebInspector.ScriptsPanel.prototype = {
return null;
view = WebInspector.panels.resources.resourceViewForResource(scriptOrResource);
view.headersVisible = false;
- var sourceFrame = this._sourceFrameForScriptOrResource(scriptOrResource);
- var breakpoints = WebInspector.breakpointManager.breakpointsForURL(scriptOrResource.url);
- for (var i = 0; i < breakpoints.length; ++i)
- sourceFrame.addBreakpoint(breakpoints[i]);
} else if (scriptOrResource instanceof WebInspector.Script)
view = this.scriptViewForScript(scriptOrResource);
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 16b8e8d..a9033f2 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -598,9 +598,11 @@ WebInspector.SourceFrame.prototype = {
var popupContentElement = null;
if (result.type !== "object" && result.type !== "node" && result.type !== "array") {
popupContentElement = document.createElement("span");
- popupContentElement.className = "monospace";
+ popupContentElement.className = "monospace console-formatted-" + result.type;
popupContentElement.style.whiteSpace = "pre";
popupContentElement.textContent = result.description;
+ if (result.type === "string")
+ popupContentElement.textContent = "\"" + popupContentElement.textContent + "\"";
this._popup = new WebInspector.Popover(popupContentElement);
this._popup.show(element);
} else {
diff --git a/WebCore/inspector/front-end/SourceView.js b/WebCore/inspector/front-end/SourceView.js
index 240dca1..3f762cc 100644
--- a/WebCore/inspector/front-end/SourceView.js
+++ b/WebCore/inspector/front-end/SourceView.js
@@ -99,6 +99,9 @@ WebInspector.SourceView.prototype = {
var mimeType = this._canonicalMimeType(this.resource);
this.sourceFrame.setContent(mimeType, content, this.resource.url);
this._sourceFrameSetupFinished();
+ var breakpoints = WebInspector.breakpointManager.breakpointsForURL(this.resource.url);
+ for (var i = 0; i < breakpoints.length; ++i)
+ this.sourceFrame.addBreakpoint(breakpoints[i]);
},
_canonicalMimeType: function(resource)
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index b640936..f90a9fe 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -106,6 +106,7 @@
<file>WelcomeView.js</file>
<file>WorkersSidebarPane.js</file>
<file>audits.css</file>
+ <file>heapProfiler.css</file>
<file>helpScreen.css</file>
<file>inspector.css</file>
<file>inspectorSyntaxHighlight.css</file>
diff --git a/WebCore/inspector/front-end/heapProfiler.css b/WebCore/inspector/front-end/heapProfiler.css
new file mode 100644
index 0000000..03a6dd0
--- /dev/null
+++ b/WebCore/inspector/front-end/heapProfiler.css
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.heap-snapshot-sidebar-tree-item .icon {
+ content: url(Images/profileIcon.png);
+}
+
+.heap-snapshot-sidebar-tree-item.small .icon {
+ content: url(Images/profileSmallIcon.png);
+}
+
+.heap-snapshot-view {
+ display: none;
+ overflow: hidden;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+
+.heap-snapshot-view.visible {
+ display: block;
+}
+
+.heap-snapshot-view .data-grid {
+ border: none;
+ max-height: 100%;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 93px;
+}
+
+.heap-snapshot-view .data-grid th.count-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.count-column {
+ text-align: right;
+}
+
+.heap-snapshot-view .data-grid th.size-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.size-column {
+ text-align: right;
+}
+
+.heap-snapshot-view .data-grid th.countDelta-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.countDelta-column {
+ text-align: right;
+}
+
+.heap-snapshot-view .data-grid th.sizeDelta-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.sizeDelta-column {
+ text-align: right;
+}
+
+#heap-snapshot-summary-container {
+ position: absolute;
+ padding-top: 20px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 93px;
+ margin-left: -1px;
+ border-left: 1px solid rgb(102, 102, 102);
+ background-color: rgb(101, 111, 130);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
+ background-repeat: repeat-x;
+ background-position: top;
+ text-align: center;
+ text-shadow: black 0 1px 1px;
+ white-space: nowrap;
+ color: white;
+ -webkit-background-size: 1px 6px;
+ -webkit-background-origin: padding;
+ -webkit-background-clip: padding;
+}
+
+.heap-snapshot-summary {
+ display: inline-block;
+ width: 50%;
+ min-width: 300px;
+ position: relative;
+}
+
+.heap-snapshot-summary canvas.summary-graph {
+ width: 225px;
+}
+
+.heap-snapshot-summary-label {
+ font-size: 12px;
+ font-weight: bold;
+ position: absolute;
+ top: 1px;
+ width: 50%;
+ left: 25%;
+}
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index a3ffa44..4319816 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -3910,115 +3910,6 @@ button.enable-toggle-status-bar-item .glyph {
-webkit-mask-image: url(Images/reloadButtonGlyph.png);
}
-/* Heap Snapshot View Styles */
-
-/* FIXME: move to a separate css file */
-.heap-snapshot-sidebar-tree-item .icon {
- content: url(Images/profileIcon.png);
-}
-
-.heap-snapshot-sidebar-tree-item.small .icon {
- content: url(Images/profileSmallIcon.png);
-}
-
-.heap-snapshot-view {
- display: none;
- overflow: hidden;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
-}
-
-.heap-snapshot-view.visible {
- display: block;
-}
-
-.heap-snapshot-view .data-grid {
- border: none;
- max-height: 100%;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 93px;
-}
-
-.heap-snapshot-view .data-grid th.count-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.count-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.size-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.size-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.countDelta-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.countDelta-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.sizeDelta-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.sizeDelta-column {
- text-align: right;
-}
-
-#heap-snapshot-summary-container {
- position: absolute;
- padding-top: 20px;
- bottom: 0;
- left: 0;
- right: 0;
- height: 93px;
- margin-left: -1px;
- border-left: 1px solid rgb(102, 102, 102);
- background-color: rgb(101, 111, 130);
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
- background-repeat: repeat-x;
- background-position: top;
- text-align: center;
- text-shadow: black 0 1px 1px;
- white-space: nowrap;
- color: white;
- -webkit-background-size: 1px 6px;
- -webkit-background-origin: padding;
- -webkit-background-clip: padding;
-}
-
-.heap-snapshot-summary {
- display: inline-block;
- width: 50%;
- min-width: 300px;
- position: relative;
-}
-
-.heap-snapshot-summary canvas.summary-graph {
- width: 225px;
-}
-
-.heap-snapshot-summary-label {
- font-size: 12px;
- font-weight: bold;
- position: absolute;
- top: 1px;
- width: 50%;
- left: 25%;
-}
-
.delete-storage-status-bar-item .glyph {
-webkit-mask-image: url(Images/excludeButtonGlyph.png);
}
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index 3e4b6c1..0536ee6 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -30,6 +30,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="audits.css">
+ <link rel="stylesheet" type="text/css" href="heapProfiler.css">
<link rel="stylesheet" type="text/css" href="inspector.css">
<link rel="stylesheet" type="text/css" href="inspectorSyntaxHighlight.css">
<link rel="stylesheet" type="text/css" href="popover.css">
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 0bff335..840745f 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -715,9 +715,9 @@ WebInspector.close = function(event)
InspectorFrontendHost.closeWindow();
}
-WebInspector.inspectedPageDestroyed = function()
+WebInspector.disconnectFromBackend = function()
{
- WebInspector.close();
+ InspectorFrontendHost.disconnectFromBackend();
}
WebInspector.documentMouseOver = function(event)
@@ -1445,9 +1445,9 @@ WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLin
this.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLine, errorMessage);
}
-WebInspector.pausedScript = function(callFrames)
+WebInspector.pausedScript = function(details)
{
- this.panels.scripts.debuggerPaused(callFrames);
+ this.panels.scripts.debuggerPaused(details.callFrames);
InspectorFrontendHost.bringToFront();
}