Changeset 111212 in webkit
- Timestamp:
- Mar 19, 2012 12:02:27 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r111211 r111212 1 2012-03-19 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Implement snippets evaluation. 4 https://bugs.webkit.org/show_bug.cgi?id=81334 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/debugger/snippets-model-expected.txt: 9 * inspector/debugger/snippets-model.html: 10 1 11 2012-03-19 Joshua Bell <jsbell@chromium.org> 2 12 -
trunk/LayoutTests/inspector/debugger/snippets-model-expected.txt
r110864 r111212 38 38 Running: testEvaluate 39 39 Last evaluation source url for snippet: snippets://1_1 40 Snippet script added, sourceURL = snippets://1_1 40 41 Last evaluation source url for snippet: snippets://2_2 42 Snippet script added, sourceURL = snippets://2_2 41 43 Last evaluation source url for snippet: snippets://1_3 44 Snippet script added, sourceURL = snippets://1_3 42 45 -
trunk/LayoutTests/inspector/debugger/snippets-model.html
r110864 r111212 13 13 14 14 // FIXME: Remove once snippets are taken out of experiments. 15 if (!WebInspector.experimentsSettings.snippetsSupport.isEnabled())16 WebInspector.snippetsModel = new WebInspector.SnippetsModel();15 WebInspector.experimentsSettings.snippetsSupport = {}; 16 WebInspector.experimentsSettings.snippetsSupport.isEnabled = function() { return true; }; 17 17 18 18 InspectorTest.runTestSuite([ … … 104 104 callback(); 105 105 } 106 107 // FIXME: This should be removed once snippets evaluation itself is implemented.108 callback();109 106 } 110 107 -
trunk/Source/WebCore/ChangeLog
r111208 r111212 1 2012-03-19 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Implement snippets evaluation. 4 https://bugs.webkit.org/show_bug.cgi?id=81334 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/front-end/ConsoleView.js: 9 (WebInspector.ConsoleView.prototype.evaluateUsingTextPrompt): 10 (WebInspector.ConsoleView.prototype._enterKeyPressed): 11 * inspector/front-end/ScriptMapping.js: 12 (WebInspector.MainScriptMapping): 13 * inspector/front-end/SnippetsModel.js: 14 * inspector/front-end/externs.js: 15 (WebInspector.evaluateInConsole): 16 * inspector/front-end/inspector.js: 17 (WebInspector.evaluateInConsole): 18 1 19 2012-03-19 Tommy Widenflycht <tommyw@google.com> 2 20 -
trunk/Source/WebCore/inspector/front-end/ConsoleView.js
r109927 r111212 619 619 }, 620 620 621 evaluateUsingTextPrompt: function(expression )622 { 623 this._appendCommand(expression, this.prompt.text );621 evaluateUsingTextPrompt: function(expression, showResultOnly) 622 { 623 this._appendCommand(expression, this.prompt.text, false, showResultOnly); 624 624 }, 625 625 … … 637 637 if (!str.length) 638 638 return; 639 this._appendCommand(str, ""); 640 }, 641 642 _appendCommand: function(text, newPromptText) 643 { 644 var commandMessage = new WebInspector.ConsoleCommand(text); 645 WebInspector.console.interruptRepeatCount(); 646 this._appendConsoleMessage(commandMessage); 639 this._appendCommand(str, "", true, false); 640 }, 641 642 _appendCommand: function(text, newPromptText, useCommandLineAPI, showResultOnly) 643 { 644 if (!showResultOnly) { 645 var commandMessage = new WebInspector.ConsoleCommand(text); 646 WebInspector.console.interruptRepeatCount(); 647 this._appendConsoleMessage(commandMessage); 648 } 649 this.prompt.text = newPromptText; 647 650 648 651 function printResult(result, wasThrown) … … 651 654 return; 652 655 653 this.prompt.pushHistoryItem(text);654 this.prompt.text = newPromptText;655 656 WebInspector.settings.consoleHistory.set(this.prompt.historyData.slice(-30));656 if (!showResultOnly) { 657 this.prompt.pushHistoryItem(text); 658 WebInspector.settings.consoleHistory.set(this.prompt.historyData.slice(-30)); 659 } 657 660 658 661 this._appendConsoleMessage(new WebInspector.ConsoleCommandResult(result, wasThrown, commandMessage, this._linkifier)); -
trunk/Source/WebCore/inspector/front-end/ScriptMapping.js
r110868 r111212 76 76 this._compilerMapping = new WebInspector.CompilerScriptMapping(); 77 77 this._mappings.push(this._compilerMapping); 78 79 for (var i = 0; i < this._mappings.length; ++i) 80 this._mappings[i].addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeListChanged, this._handleUISourceCodeListChanged, this); 81 82 if (WebInspector.experimentsSettings.snippetsSupport.isEnabled()) { 83 this._snippetsMapping = new WebInspector.SnippetsScriptMapping(); 84 this._mappings.push(this._snippetsMapping); 85 } 78 this._snippetsMapping = new WebInspector.SnippetsScriptMapping(); 79 this._mappings.push(this._snippetsMapping); 86 80 87 81 for (var i = 0; i < this._mappings.length; ++i) -
trunk/Source/WebCore/inspector/front-end/SnippetsModel.js
r110864 r111212 130 130 snippet._lastEvaluationSourceURL = sourceURL; 131 131 var expression = "\n//@ sourceURL=" + sourceURL + "\n" + snippet.content; 132 // FIXME: evaluate snippet here.132 WebInspector.evaluateInConsole(expression, true); 133 133 }, 134 134 -
trunk/Source/WebCore/inspector/front-end/externs.js
r108495 r111212 119 119 WebInspector.populateResourceContextMenu = function(contextMenu, url, preferredLineNumber) {} 120 120 121 WebInspector.evaluateInConsole = function(expression) {} 121 /** 122 * @param {string} expression 123 * @param {boolean=} showResultOnly 124 */ 125 WebInspector.evaluateInConsole = function(expression, showResultOnly) {} 122 126 123 127 var InjectedFakeWorker = function() {} -
trunk/Source/WebCore/inspector/front-end/inspector.js
r110576 r111212 407 407 408 408 this.debuggerModel = new WebInspector.DebuggerModel(); 409 if (WebInspector.experimentsSettings.snippetsSupport.isEnabled()) 410 this.snippetsModel = new WebInspector.SnippetsModel(); 409 this.snippetsModel = new WebInspector.SnippetsModel(); 411 410 this.debuggerPresentationModel = new WebInspector.DebuggerPresentationModel(); 412 411 … … 983 982 } 984 983 985 WebInspector.evaluateInConsole = function(expression )984 WebInspector.evaluateInConsole = function(expression, showResultOnly) 986 985 { 987 986 this.showConsole(); 988 this.consoleView.evaluateUsingTextPrompt(expression );987 this.consoleView.evaluateUsingTextPrompt(expression, showResultOnly); 989 988 } 990 989
Note: See TracChangeset
for help on using the changeset viewer.