Changeset 88815 in webkit


Ignore:
Timestamp:
Jun 14, 2011 10:03:38 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-14 Sreeram Ramachandran <sreeram@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: Allow the console to persist on page refresh or navigation
https://bugs.webkit.org/show_bug.cgi?id=53359

Tests that console messages are preserved upon navigation.

  • inspector/console/console-preserve-log-expected.txt: Added.
  • inspector/console/console-preserve-log.html: Added.

2011-06-14 Sreeram Ramachandran <sreeram@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: Allow the console to persist on page refresh or navigation
https://bugs.webkit.org/show_bug.cgi?id=53359

Adds a context menu checkbox to preserve the console log across
navigations. However, the underlying messages and objects are actually
deleted from the backend, so they are not expandable; their continued
display in the console frontend is merely cosmetic.

Test: inspector/console/console-preserve-log.html

  • English.lproj/localizedStrings.js:
  • inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared): (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher): (WebInspector.ConsoleView.prototype.requestClearMessages): (WebInspector.ConsoleView.prototype._handleContextMenuEvent.monitoringXHRItemAction): (WebInspector.ConsoleView.prototype._handleContextMenuEvent.preserveLogItemAction): (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
  • inspector/front-end/Settings.js: (WebInspector.Settings):
  • inspector/front-end/inspector.js: (WebInspector.reset):
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r88808 r88815  
     12011-06-14  Sreeram Ramachandran  <sreeram@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Allow the console to persist on page refresh or navigation
     6        https://bugs.webkit.org/show_bug.cgi?id=53359
     7
     8        Tests that console messages are preserved upon navigation.
     9
     10        * inspector/console/console-preserve-log-expected.txt: Added.
     11        * inspector/console/console-preserve-log.html: Added.
     12
    1132011-06-14  Pavel Podivilov  <podivilov@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r88808 r88815  
     12011-06-14  Sreeram Ramachandran  <sreeram@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Allow the console to persist on page refresh or navigation
     6        https://bugs.webkit.org/show_bug.cgi?id=53359
     7
     8        Adds a context menu checkbox to preserve the console log across
     9        navigations. However, the underlying messages and objects are actually
     10        deleted from the backend, so they are not expandable; their continued
     11        display in the console frontend is merely cosmetic.
     12
     13        Test: inspector/console/console-preserve-log.html
     14
     15        * English.lproj/localizedStrings.js:
     16        * inspector/front-end/ConsoleView.js:
     17        (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
     18        (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
     19        (WebInspector.ConsoleView.prototype.requestClearMessages):
     20        (WebInspector.ConsoleView.prototype._handleContextMenuEvent.monitoringXHRItemAction):
     21        (WebInspector.ConsoleView.prototype._handleContextMenuEvent.preserveLogItemAction):
     22        (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
     23        * inspector/front-end/Settings.js:
     24        (WebInspector.Settings):
     25        * inspector/front-end/inspector.js:
     26        (WebInspector.reset):
     27
    1282011-06-14  Pavel Podivilov  <podivilov@chromium.org>
    229
  • trunk/Source/WebCore/inspector/front-end/ConsoleView.js

    r86768 r88815  
    149149            messagesCleared: function()
    150150            {
    151                 console.clearMessages();
     151                if (!WebInspector.settings.preserveConsoleLog)
     152                    console.clearMessages();
    152153            },
    153154        }
     
    328329    {
    329330        ConsoleAgent.clearConsoleMessages();
     331        this.clearMessages();
    330332    },
    331333
     
    450452        }
    451453
    452         var itemAction = function () {
     454        var contextMenu = new WebInspector.ContextMenu();
     455
     456        var monitoringXHRItemAction = function () {
    453457            WebInspector.settings.monitoringXHREnabled = !WebInspector.settings.monitoringXHREnabled;
    454458            ConsoleAgent.setMonitoringXHREnabled(WebInspector.settings.monitoringXHREnabled);
    455459        }.bind(this);
    456         var contextMenu = new WebInspector.ContextMenu();
    457         contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "XMLHttpRequest logging" : "XMLHttpRequest Logging"), itemAction, WebInspector.settings.monitoringXHREnabled)
     460        contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "XMLHttpRequest logging" : "XMLHttpRequest Logging"), monitoringXHRItemAction, WebInspector.settings.monitoringXHREnabled);
     461
     462        var preserveLogItemAction = function () {
     463            WebInspector.settings.preserveConsoleLog = !WebInspector.settings.preserveConsoleLog;
     464        }.bind(this);
     465        contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Preserve log" : "Preserve Log"), preserveLogItemAction, WebInspector.settings.preserveConsoleLog);
     466
    458467        contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Clear console" : "Clear Console"), this.requestClearMessages.bind(this));
    459468        contextMenu.show(event);
  • trunk/Source/WebCore/inspector/front-end/Settings.js

    r88348 r88815  
    6767    this.installApplicationSetting("lastViewedScriptFile", "application");
    6868    this.installApplicationSetting("monitoringXHREnabled", false);
     69    this.installApplicationSetting("preserveConsoleLog", false);
    6970    this.installApplicationSetting("pauseOnExceptionStateString", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);
    7071    this.installApplicationSetting("resourcesLargeRows", true);
  • trunk/Source/WebCore/inspector/front-end/inspector.js

    r87992 r88815  
    983983    this.highlightDOMNode(0);
    984984
    985     this.console.clearMessages();
     985    if (!WebInspector.settings.preserveConsoleLog)
     986        this.console.clearMessages();
    986987    this.extensionServer.notifyInspectorReset();
    987988    if (this.workerManager)
Note: See TracChangeset for help on using the changeset viewer.