Changeset 56165 in webkit


Ignore:
Timestamp:
Mar 18, 2010, 9:20:57 AM (15 years ago)
Author:
yurys@chromium.org
Message:

2010-03-18 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Preserve console history between debugging sessions.

https://bugs.webkit.org/show_bug.cgi?id=36223

  • inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._settingsLoaded): (WebInspector.ConsoleView.prototype._enterKeyPressed.printResult): (WebInspector.ConsoleView.prototype._enterKeyPressed):
  • inspector/front-end/Settings.js: (WebInspector.Settings.prototype._load):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r56164 r56165  
     12010-03-18  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Preserve console history between debugging sessions.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=36223
     8
     9        * inspector/front-end/ConsoleView.js:
     10        (WebInspector.ConsoleView.prototype._settingsLoaded):
     11        (WebInspector.ConsoleView.prototype._enterKeyPressed.printResult):
     12        (WebInspector.ConsoleView.prototype._enterKeyPressed):
     13        * inspector/front-end/Settings.js:
     14        (WebInspector.Settings.prototype._load):
     15
    1162010-03-18  Kim Grönholm  <kim.gronholm@nomovok.com>
    217
  • trunk/WebCore/inspector/front-end/ConsoleView.js

    r55364 r56165  
    4949    this.promptElement.addEventListener("keydown", this._promptKeyDown.bind(this), true);
    5050    this.prompt = new WebInspector.TextPrompt(this.promptElement, this.completions.bind(this), ExpressionStopCharacters + ".");
     51    WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
    5152
    5253    this.topGroup = new WebInspector.ConsoleGroup(null, 0);
     
    116117
    117118WebInspector.ConsoleView.prototype = {
     119    _settingsLoaded: function()
     120    {
     121        this.prompt.history = WebInspector.settings.consoleHistory;
     122    },
    118123   
    119124    _updateFilter: function(e)
     
    505510            self.prompt.historyOffset = 0;
    506511            self.prompt.text = "";
     512
     513            WebInspector.settings.consoleHistory = self.prompt.history.slice(-30);
     514
    507515            self.addMessage(new WebInspector.ConsoleCommandResult(result, exception, commandMessage));
    508516        }
  • trunk/WebCore/inspector/front-end/Settings.js

    r55790 r56165  
    7272        this._installSetting("showUserAgentStyles", "show-user-agent-styles", true);
    7373        this._installSetting("resourceViewTab", "resource-view-tab", "content");
     74        this._installSetting("consoleHistory", "console-history", []);
    7475        this.dispatchEventToListeners("loaded");
    7576    },
Note: See TracChangeset for help on using the changeset viewer.