summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 13:00:06 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 13:00:06 +0000
commit3244c8cb2fd6f976c7d4c7da181347dfceab9f70 (patch)
tree0994d54a20e0aad9049a9c95b57613d8c5a6ed3c /webkit
parent765fd25ca2db4c7677f14c0fc65aae4a7ee34967 (diff)
downloadchromium_src-3244c8cb2fd6f976c7d4c7da181347dfceab9f70.zip
chromium_src-3244c8cb2fd6f976c7d4c7da181347dfceab9f70.tar.gz
chromium_src-3244c8cb2fd6f976c7d4c7da181347dfceab9f70.tar.bz2
DevTools: Fix implications of the DOMAgent migration upstream.
Review URL: http://codereview.chromium.org/164556 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/devtools/js/devtools.js63
-rw-r--r--webkit/glue/devtools/js/inject.js7
-rw-r--r--webkit/glue/devtools/js/inspector_controller_impl.js2
3 files changed, 22 insertions, 50 deletions
diff --git a/webkit/glue/devtools/js/devtools.js b/webkit/glue/devtools/js/devtools.js
index 16cbd0f..49550e9 100644
--- a/webkit/glue/devtools/js/devtools.js
+++ b/webkit/glue/devtools/js/devtools.js
@@ -136,16 +136,16 @@ devtools.ToolsAgent.prototype.setResourcesPanelEnabled_ = function(enabled) {
if (enabled) {
panel.enableToggleButton.title =
WebInspector.UIString("Resource tracking enabled. Click to disable.");
- panel.enableToggleButton.addStyleClass("toggled-on");
- panel.largerResourcesButton.removeStyleClass("hidden");
- panel.sortingSelectElement.removeStyleClass("hidden");
+ panel.enableToggleButton.toggled = true;
+ panel.largerResourcesButton.visible = true;
+ panel.sortingSelectElement.visible = false;
panel.panelEnablerView.visible = false;
} else {
panel.enableToggleButton.title =
WebInspector.UIString("Resource tracking disabled. Click to enable.");
- panel.enableToggleButton.removeStyleClass("toggled-on");
- panel.largerResourcesButton.addStyleClass("hidden");
- panel.sortingSelectElement.addStyleClass("hidden");
+ panel.enableToggleButton.toggled = false;
+ panel.largerResourcesButton.visible = false;
+ panel.sortingSelectElement.visible = false;
panel.panelEnablerView.visible = true;
}
};
@@ -421,7 +421,7 @@ WebInspector.DebuggedObjectTreeElement.inherits(
*/
WebInspector.DebuggedObjectTreeElement.prototype.onpopulate =
function() {
- var obj = this.property.childObject;
+ var obj = this.property.value.objectId;
devtools.tools.getDebuggerAgent().resolveChildren(obj,
goog.bind(this.didResolveChildren_, this), false /* no intrinsic */ );
};
@@ -451,18 +451,14 @@ WebInspector.DebuggedObjectTreeElement.prototype.didResolveChildren_ =
WebInspector.DebuggedObjectTreeElement.addResolvedChildren = function(
resolvedObject, treeElementContainer, treeElementConstructor) {
var object = resolvedObject.resolvedValue;
- var names = [];
- for (var name in object) {
- names.push(name);
- }
- names.sort();
+ var names = Object.sortedProperties(object);
for (var i = 0; i < names.length; i++) {
+ var childObject = object[names[i]];
var property = {};
property.name = names[i];
- property.childObject = object[property.name];
- property.type = typeof property.childObject;
- property.hasChildren = property.type == 'object' && Object.hasProperties(property.childObject);
- property.textContent = Object.describe(property.childObject, true);
+ property.value = new WebInspector.ObjectProxy(childObject, [], 0,
+ Object.describe(childObject, true),
+ typeof childObject == 'object' && Object.hasProperties(childObject));
treeElementContainer.appendChild(new treeElementConstructor(property));
}
};
@@ -514,7 +510,7 @@ WebInspector.ScriptsPanel.prototype.doEvalInCallFrame =
var oldShow = WebInspector.ScriptsPanel.prototype.show;
WebInspector.ScriptsPanel.prototype.show = function() {
devtools.tools.getDebuggerAgent().initUI();
- this.enableToggleButton.addStyleClass('hidden');
+ this.enableToggleButton.visible = false;
oldShow.call(this);
};
})();
@@ -558,7 +554,7 @@ WebInspector.ScriptsPanel.prototype.doEvalInCallFrame =
var oldShow = WebInspector.ProfilesPanel.prototype.show;
WebInspector.ProfilesPanel.prototype.show = function() {
devtools.tools.getDebuggerAgent().initializeProfiling();
- this.enableToggleButton.addStyleClass('hidden');
+ this.enableToggleButton.visible = false;
oldShow.call(this);
// Show is called on every show event of a panel, so
// we only need to intercept it once.
@@ -605,28 +601,9 @@ WebInspector.UIString = function(string) {
}
return result;
};
-
- // This is needed to evaluate 'instanceof' against win.Node, etc.
- // Need a real window, not just InspectorController.inspectedWindow wrapper.
- var oldType = Object.type;
- Object.type = function(obj) {
- return oldType.call(this, obj, window);
- };
})();
-Object.sortedProperties = function(obj) {
- var properties = [];
- for (var prop in obj) {
- if (prop != '___devtools_id' && prop != '___devtools_class_name') {
- properties.push(prop);
- }
- }
- properties.sort();
- return properties;
-};
-
-
// Highlight extension content scripts in the scripts list.
(function () {
var original = WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu;
@@ -687,18 +664,6 @@ WebInspector.ConsoleView.prototype._formatobject = function(object, elem) {
})();
-// We do not inspect DOM nodes using $ shortcuts yet.
-WebInspector.ConsoleView.prototype.addInspectedNode = function(node) {
-};
-
-
-// Stub until moved to async access in WebKit.
-WebInspector.StylePropertiesSection.prototype._doesSelectorAffectSelectedNode =
- function() {
- return true;
-};
-
-
(function() {
var originalCreatePanels = WebInspector._createPanels;
WebInspector._createPanels = function() {
diff --git a/webkit/glue/devtools/js/inject.js b/webkit/glue/devtools/js/inject.js
index e214766..78e8165 100644
--- a/webkit/glue/devtools/js/inject.js
+++ b/webkit/glue/devtools/js/inject.js
@@ -112,3 +112,10 @@ Object.describe = function(obj, abbreviated)
return String(obj);
}
}
+
+Function.prototype.bind = function(thisObject)
+{
+ var func = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ return function() { return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0))) };
+}
diff --git a/webkit/glue/devtools/js/inspector_controller_impl.js b/webkit/glue/devtools/js/inspector_controller_impl.js
index b0c6947..8de209c 100644
--- a/webkit/glue/devtools/js/inspector_controller_impl.js
+++ b/webkit/glue/devtools/js/inspector_controller_impl.js
@@ -290,7 +290,7 @@ devtools.InspectorControllerImpl.prototype.callInspectorController_ =
function(methodName, var_arg) {
var args = Array.prototype.slice.call(arguments);
RemoteToolsAgent.ExecuteUtilityFunction(
- devtools.InspectorControllerImpl.parseWrap_(undefined),
+ devtools.Callback.wrap(function(){}),
'InspectorController', JSON.stringify(args));
};