Changeset 49988 in webkit
- Timestamp:
- Oct 23, 2009 12:30:54 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r49987 r49988 1 2009-10-23 Keishi Hattori <casey.hattori@gmail.com> 2 3 Reviewed by Timothy Hatcher. 4 5 Inspector injects _inspectorCommandLineAPI into global object when opened 6 https://bugs.webkit.org/show_bug.cgi?id=30675 7 8 * inspector/front-end/InjectedScript.js: 9 (InjectedScript.getCompletions): 10 (InjectedScript._evaluateOn): 11 (InjectedScript.addInspectedNode): 12 (InjectedScript._ensureCommandLineAPIInstalled): Moved _inspectorCommandLineAPI from window to console. 13 1 14 2009-10-23 Janne Koskinen <janne.p.koskinen@digia.com> 2 15 -
trunk/WebCore/inspector/front-end/InjectedScript.js
r49940 r49988 541 541 props[prop] = true; 542 542 if (includeInspectorCommandLineAPI) 543 for (var prop in InjectedScript._window(). _inspectorCommandLineAPI)543 for (var prop in InjectedScript._window().console._inspectorCommandLineAPI) 544 544 if (prop.charAt(0) !== '_') 545 545 props[prop] = true; … … 576 576 // Surround the expression in with statements to inject our command line API so that 577 577 // the window object properties still take more precedent than our API functions. 578 expression = "with (window. _inspectorCommandLineAPI) { with (window) { " + expression + " } }";578 expression = "with (window.console._inspectorCommandLineAPI) { with (window) { " + expression + " } }"; 579 579 var value = evalFunction.call(object, expression); 580 580 … … 593 593 594 594 InjectedScript._ensureCommandLineAPIInstalled(InjectedScript._window().eval, InjectedScript._window()); 595 var inspectedNodes = InjectedScript._window(). _inspectorCommandLineAPI._inspectedNodes;595 var inspectedNodes = InjectedScript._window().console._inspectorCommandLineAPI._inspectedNodes; 596 596 inspectedNodes.unshift(node); 597 597 if (inspectedNodes.length >= 5) … … 902 902 InjectedScript._ensureCommandLineAPIInstalled = function(evalFunction, evalObject) 903 903 { 904 if (evalFunction.call(evalObject, "window. _inspectorCommandLineAPI"))904 if (evalFunction.call(evalObject, "window.console._inspectorCommandLineAPI")) 905 905 return; 906 var inspectorCommandLineAPI = evalFunction.call(evalObject, "window. _inspectorCommandLineAPI = { \906 var inspectorCommandLineAPI = evalFunction.call(evalObject, "window.console._inspectorCommandLineAPI = { \ 907 907 $: function() { return document.getElementById.apply(document, arguments) }, \ 908 908 $$: function() { return document.querySelectorAll.apply(document, arguments) }, \ … … 962 962 }, \ 963 963 _inspectedNodes: [], \ 964 get $0() { return _inspectorCommandLineAPI._inspectedNodes[0] }, \965 get $1() { return _inspectorCommandLineAPI._inspectedNodes[1] }, \966 get $2() { return _inspectorCommandLineAPI._inspectedNodes[2] }, \967 get $3() { return _inspectorCommandLineAPI._inspectedNodes[3] }, \968 get $4() { return _inspectorCommandLineAPI._inspectedNodes[4] } \964 get $0() { return console._inspectorCommandLineAPI._inspectedNodes[0] }, \ 965 get $1() { return console._inspectorCommandLineAPI._inspectedNodes[1] }, \ 966 get $2() { return console._inspectorCommandLineAPI._inspectedNodes[2] }, \ 967 get $3() { return console._inspectorCommandLineAPI._inspectedNodes[3] }, \ 968 get $4() { return console._inspectorCommandLineAPI._inspectedNodes[4] } \ 969 969 };"); 970 970
Note: See TracChangeset
for help on using the changeset viewer.