[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:02:04 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 1a757cd50cad821249610f8027ad51bb64370459
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 23 19:30:54 2009 +0000

    2009-10-23  Keishi Hattori  <casey.hattori at gmail.com>
    
            Reviewed by Timothy Hatcher.
    
            Inspector injects _inspectorCommandLineAPI into global object when opened
            https://bugs.webkit.org/show_bug.cgi?id=30675
    
            * inspector/front-end/InjectedScript.js:
            (InjectedScript.getCompletions):
            (InjectedScript._evaluateOn):
            (InjectedScript.addInspectedNode):
            (InjectedScript._ensureCommandLineAPIInstalled): Moved _inspectorCommandLineAPI from window to console.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49988 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f7ecba0..6ed4e0f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-23  Keishi Hattori  <casey.hattori at gmail.com>
+
+        Reviewed by Timothy Hatcher.
+
+        Inspector injects _inspectorCommandLineAPI into global object when opened
+        https://bugs.webkit.org/show_bug.cgi?id=30675
+
+        * inspector/front-end/InjectedScript.js:
+        (InjectedScript.getCompletions):
+        (InjectedScript._evaluateOn):
+        (InjectedScript.addInspectedNode):
+        (InjectedScript._ensureCommandLineAPIInstalled): Moved _inspectorCommandLineAPI from window to console.
+
 2009-10-23  Janne Koskinen  <janne.p.koskinen at digia.com>
 
         Reviewed by Tor Arne Vestbø.
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index e7c8530..b912a28 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -540,7 +540,7 @@ InjectedScript.getCompletions = function(expression, includeInspectorCommandLine
             for (var prop in expressionResult)
                 props[prop] = true;
         if (includeInspectorCommandLineAPI)
-            for (var prop in InjectedScript._window()._inspectorCommandLineAPI)
+            for (var prop in InjectedScript._window().console._inspectorCommandLineAPI)
                 if (prop.charAt(0) !== '_')
                     props[prop] = true;
     } catch(e) {
@@ -575,7 +575,7 @@ InjectedScript._evaluateOn = function(evalFunction, object, expression)
     InjectedScript._ensureCommandLineAPIInstalled(evalFunction, object);
     // Surround the expression in with statements to inject our command line API so that
     // the window object properties still take more precedent than our API functions.
-    expression = "with (window._inspectorCommandLineAPI) { with (window) { " + expression + " } }";
+    expression = "with (window.console._inspectorCommandLineAPI) { with (window) { " + expression + " } }";
     var value = evalFunction.call(object, expression);
 
     // When evaluating on call frame error is not thrown, but returned as a value.
@@ -592,7 +592,7 @@ InjectedScript.addInspectedNode = function(nodeId)
         return false;
 
     InjectedScript._ensureCommandLineAPIInstalled(InjectedScript._window().eval, InjectedScript._window());
-    var inspectedNodes = InjectedScript._window()._inspectorCommandLineAPI._inspectedNodes;
+    var inspectedNodes = InjectedScript._window().console._inspectorCommandLineAPI._inspectedNodes;
     inspectedNodes.unshift(node);
     if (inspectedNodes.length >= 5)
         inspectedNodes.pop();
@@ -901,9 +901,9 @@ InjectedScript._inspectObject = function(o)
 
 InjectedScript._ensureCommandLineAPIInstalled = function(evalFunction, evalObject)
 {
-    if (evalFunction.call(evalObject, "window._inspectorCommandLineAPI"))
+    if (evalFunction.call(evalObject, "window.console._inspectorCommandLineAPI"))
         return;
-    var inspectorCommandLineAPI = evalFunction.call(evalObject, "window._inspectorCommandLineAPI = { \
+    var inspectorCommandLineAPI = evalFunction.call(evalObject, "window.console._inspectorCommandLineAPI = { \
         $: function() { return document.getElementById.apply(document, arguments) }, \
         $$: function() { return document.querySelectorAll.apply(document, arguments) }, \
         $x: function(xpath, context) { \
@@ -961,11 +961,11 @@ InjectedScript._ensureCommandLineAPIInstalled = function(evalFunction, evalObjec
             } \
         }, \
         _inspectedNodes: [], \
-        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] } \
+        get $0() { return console._inspectorCommandLineAPI._inspectedNodes[0] }, \
+        get $1() { return console._inspectorCommandLineAPI._inspectedNodes[1] }, \
+        get $2() { return console._inspectorCommandLineAPI._inspectedNodes[2] }, \
+        get $3() { return console._inspectorCommandLineAPI._inspectedNodes[3] }, \
+        get $4() { return console._inspectorCommandLineAPI._inspectedNodes[4] } \
     };");
 
     inspectorCommandLineAPI.clear = InspectorController.wrapCallback(InjectedScript._clearConsoleMessages);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list