⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 126851 in webkit


Ignore:
Timestamp:
Aug 28, 2012, 12:01:03 AM (14 years ago)
Author:
caseq@chromium.org
Message:

Web Inspector: persist the state of glue records to parents button of Timeline panel
https://bugs.webkit.org/show_bug.cgi?id=95091

Reviewed by Vsevolod Vlasov.

Add a setting for "Glue records" button on the timeline, use it to persist the state of the button.

  • inspector/front-end/TimelinePanel.js:

(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype._createStatusBarItems.get this):
(WebInspector.TimelinePanel.prototype._createStatusBarItems):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r126847 r126851  
     12012-08-27  Andrey Kosyakov  <caseq@chromium.org>
     2
     3        Web Inspector: persist the state of glue records to parents button of Timeline panel
     4        https://bugs.webkit.org/show_bug.cgi?id=95091
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        Add a setting for "Glue records" button on the timeline, use it to persist the state of the button.
     9
     10        * inspector/front-end/TimelinePanel.js:
     11        (WebInspector.TimelinePanel):
     12        (WebInspector.TimelinePanel.prototype._createStatusBarItems.get this):
     13        (WebInspector.TimelinePanel.prototype._createStatusBarItems):
     14
    1152012-08-27  Taiju Tsuiki  <tzik@chromium.org>
    216
  • trunk/Source/WebCore/inspector/front-end/TimelinePanel.js

    r126765 r126851  
    4747    this._presentationModel = new WebInspector.TimelinePresentationModel();
    4848
     49    this._overviewModeSetting = WebInspector.settings.createSetting("timelineOverviewMode", WebInspector.TimelineOverviewPane.Mode.Events);
     50    this._glueRecordsSetting = WebInspector.settings.createSetting("timelineGlueRecords", true);
     51
    4952    this._overviewPane = new WebInspector.TimelineOverviewPane(this._model);
    5053    this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.WindowChanged, this._scheduleRefresh.bind(this, false));
     
    146149    this._presentationModel.addFilter(new WebInspector.TimelineCategoryFilter());
    147150    this._presentationModel.addFilter(new WebInspector.TimelineIsLongFilter(this));
    148 
    149     this._overviewModeSetting = WebInspector.settings.createSetting("timelineOverviewMode", WebInspector.TimelineOverviewPane.Mode.Events);
    150151}
    151152
     
    236237
    237238        this._glueParentButton = new WebInspector.StatusBarButton(WebInspector.UIString("Glue asynchronous events to causes"), "glue-async-status-bar-item");
    238         this._glueParentButton.toggled = true;
    239         this._presentationModel.setGlueRecords(true);
     239        this._glueParentButton.toggled = this._glueRecordsSetting.get();
     240        this._presentationModel.setGlueRecords(this._glueParentButton.toggled);
    240241        this._glueParentButton.addEventListener("click", this._glueParentButtonClicked, this);
    241242        this._statusBarButtons.push(this._glueParentButton);
     
    540541    _glueParentButtonClicked: function()
    541542    {
    542         this._glueParentButton.toggled = !this._glueParentButton.toggled;
    543         this._presentationModel.setGlueRecords(this._glueParentButton.toggled);
     543        var newValue = !this._glueParentButton.toggled;
     544        this._glueParentButton.toggled = newValue;
     545        this._presentationModel.setGlueRecords(newValue);
     546        this._glueRecordsSetting.set(newValue);
    544547        this._repopulateRecords();
    545548    },
Note: See TracChangeset for help on using the changeset viewer.