diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
commit | aa9cf406d62004519ad54596e1c391f9a6439210 (patch) | |
tree | dd562b9c296981f2761b76623911be8496c7af84 /src/3rdparty/webkit/WebCore/inspector/front-end/Console.js | |
parent | 987aec28b950e1c9817a20a9dd71afc071cd93ea (diff) | |
parent | 56b6a5924008ab5cdbae36e9662eddba923acd5e (diff) |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/WebCore/inspector/front-end/Console.js')
-rw-r--r-- | src/3rdparty/webkit/WebCore/inspector/front-end/Console.js | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js b/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js index ca9ac0057..520e213a2 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js @@ -409,16 +409,35 @@ WebInspector.Console.prototype = { }, \ dir: function() { return console.dir.apply(console, arguments) }, \ dirxml: function() { return console.dirxml.apply(console, arguments) }, \ - keys: function(o) { var a = []; for (k in o) a.push(k); return a; }, \ - values: function(o) { var a = []; for (k in o) a.push(o[k]); return a; }, \ + keys: function(o) { var a = []; for (var k in o) a.push(k); return a; }, \ + values: function(o) { var a = []; for (var k in o) a.push(o[k]); return a; }, \ profile: function() { return console.profile.apply(console, arguments) }, \ - profileEnd: function() { return console.profileEnd.apply(console, arguments) } \ + profileEnd: function() { return console.profileEnd.apply(console, arguments) }, \ + _inspectedNodes: [], \ + _addInspectedNode: function(node) { \ + var inspectedNodes = _inspectorCommandLineAPI._inspectedNodes; \ + inspectedNodes.unshift(node); \ + if (inspectedNodes.length >= 5) \ + inspectedNodes.pop(); \ + }, \ + get $0() { return _inspectorCommandLineAPI._inspectedNodes[0] }, \ + get $1() { return _inspectorCommandLineAPI._inspectedNodes[1] }, \ + get $2() { return _inspectorCommandLineAPI._inspectedNodes[2] }, \ + get $3() { return _inspectorCommandLineAPI._inspectedNodes[3] }, \ + get $4() { return _inspectorCommandLineAPI._inspectedNodes[4] } \ };"); inspectedWindow._inspectorCommandLineAPI.clear = InspectorController.wrapCallback(this.clearMessages.bind(this)); } }, - + + addInspectedNode: function(node) + { + var inspectedWindow = InspectorController.inspectedWindow(); + this._ensureCommandLineAPIInstalled(inspectedWindow); + inspectedWindow._inspectorCommandLineAPI._addInspectedNode(node); + }, + doEvalInWindow: function(expression, callback) { if (!expression) { |