Changeset 109109 in webkit


Ignore:
Timestamp:
Feb 28, 2012 8:27:25 AM (12 years ago)
Author:
yurys@chromium.org
Message:

Web Inspector: preserve memory counters size after frontend reopening
https://bugs.webkit.org/show_bug.cgi?id=79792

Clear collected counter values when timeline panel is reset. Persist
timeline grid/counters splitter position to restore it when front-end
is opened next time.

Reviewed by Pavel Feldman.

  • inspector/front-end/MemoryStatistics.js:

(WebInspector.MemoryStatistics.prototype.reset):

  • inspector/front-end/TimelinePanel.js:

(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype._setSplitterPosition):
(WebInspector.TimelinePanel.prototype._resetPanel):

  • inspector/front-end/timelinePanel.css:

(#counter-values-bar):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109107 r109109  
     12012-02-28  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Web Inspector: preserve memory counters size after frontend reopening
     4        https://bugs.webkit.org/show_bug.cgi?id=79792
     5
     6        Clear collected counter values when timeline panel is reset. Persist
     7        timeline grid/counters splitter position to restore it when front-end
     8        is opened next time.
     9
     10        Reviewed by Pavel Feldman.
     11
     12        * inspector/front-end/MemoryStatistics.js:
     13        (WebInspector.MemoryStatistics.prototype.reset):
     14        * inspector/front-end/TimelinePanel.js:
     15        (WebInspector.TimelinePanel):
     16        (WebInspector.TimelinePanel.prototype._setSplitterPosition):
     17        (WebInspector.TimelinePanel.prototype._resetPanel):
     18        * inspector/front-end/timelinePanel.css:
     19        (#counter-values-bar):
     20
    1212012-02-28  Pavel Feldman  <pfeldman@google.com>
    222
  • trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js

    r109102 r109109  
    208208
    209209WebInspector.MemoryStatistics.prototype = {
     210    reset: function()
     211    {
     212        this._counters = [];
     213    },
     214
    210215    setMainTimelineGrid: function(timelineGrid)
    211216    {
  • trunk/Source/WebCore/inspector/front-end/TimelinePanel.js

    r109107 r109109  
    6464        this._memoryStatistics = new WebInspector.MemoryStatistics(this, this.splitView.preferredSidebarWidth());
    6565        this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.ModeChanged, this._timelinesOverviewModeChanged, this);
     66        WebInspector.settings.memoryCounterGraphsHeight = WebInspector.settings.createSetting("memoryCounterGraphsHeight", 150);
    6667    }
    6768
     
    164165        if (this._memoryStatistics)
    165166            this._memoryStatistics.show();
     167        WebInspector.settings.memoryCounterGraphsHeight.set(this.splitView.element.offsetHeight);
    166168    },
    167169
     
    389391            this._memoryStatistics.show();
    390392            this.splitView.element.style.bottom = "auto";
    391             this._setSplitterPosition(600);
     393            this._setSplitterPosition(WebInspector.settings.memoryCounterGraphsHeight.get());
    392394        }
    393395        this._refresh();
     
    507509        this._closeRecordDetails();
    508510        this._allRecordsCount = 0;
     511        if (this._memoryStatistics)
     512            this._memoryStatistics.reset();
    509513    },
    510514
  • trunk/Source/WebCore/inspector/front-end/timelinePanel.css

    r109102 r109109  
    600600#counter-values-bar {
    601601    border-bottom: solid 1px lightgray;
     602    min-height: 15px;
    602603}
    603604
Note: See TracChangeset for help on using the changeset viewer.