Title: [126851] trunk/Source/WebCore
Revision
126851
Author
[email protected]
Date
2012-08-28 00:01:03 -0700 (Tue, 28 Aug 2012)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126850 => 126851)


--- trunk/Source/WebCore/ChangeLog	2012-08-28 06:58:53 UTC (rev 126850)
+++ trunk/Source/WebCore/ChangeLog	2012-08-28 07:01:03 UTC (rev 126851)
@@ -1,3 +1,17 @@
+2012-08-27  Andrey Kosyakov  <[email protected]>
+
+        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):
+
 2012-08-27  Taiju Tsuiki  <[email protected]>
 
         Web Inspector: Add delete button to FileSystemView

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (126850 => 126851)


--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-08-28 06:58:53 UTC (rev 126850)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-08-28 07:01:03 UTC (rev 126851)
@@ -46,6 +46,9 @@
     this._model = new WebInspector.TimelineModel();
     this._presentationModel = new WebInspector.TimelinePresentationModel();
 
+    this._overviewModeSetting = WebInspector.settings.createSetting("timelineOverviewMode", WebInspector.TimelineOverviewPane.Mode.Events);
+    this._glueRecordsSetting = WebInspector.settings.createSetting("timelineGlueRecords", true);
+
     this._overviewPane = new WebInspector.TimelineOverviewPane(this._model);
     this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.WindowChanged, this._scheduleRefresh.bind(this, false));
     this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.ModeChanged, this._overviewModeChanged, this);
@@ -145,8 +148,6 @@
     this._presentationModel.addFilter(this._overviewPane);
     this._presentationModel.addFilter(new WebInspector.TimelineCategoryFilter()); 
     this._presentationModel.addFilter(new WebInspector.TimelineIsLongFilter(this)); 
-
-    this._overviewModeSetting = WebInspector.settings.createSetting("timelineOverviewMode", WebInspector.TimelineOverviewPane.Mode.Events);
 }
 
 // Define row height, should be in sync with styles for timeline graphs.
@@ -235,8 +236,8 @@
         this._statusBarButtons.push(this.garbageCollectButton);
 
         this._glueParentButton = new WebInspector.StatusBarButton(WebInspector.UIString("Glue asynchronous events to causes"), "glue-async-status-bar-item");
-        this._glueParentButton.toggled = true;
-        this._presentationModel.setGlueRecords(true);
+        this._glueParentButton.toggled = this._glueRecordsSetting.get();
+        this._presentationModel.setGlueRecords(this._glueParentButton.toggled);
         this._glueParentButton.addEventListener("click", this._glueParentButtonClicked, this);
         this._statusBarButtons.push(this._glueParentButton);
 
@@ -539,8 +540,10 @@
 
     _glueParentButtonClicked: function()
     {
-        this._glueParentButton.toggled = !this._glueParentButton.toggled;
-        this._presentationModel.setGlueRecords(this._glueParentButton.toggled);
+        var newValue = !this._glueParentButton.toggled;
+        this._glueParentButton.toggled = newValue;
+        this._presentationModel.setGlueRecords(newValue);
+        this._glueRecordsSetting.set(newValue);
         this._repopulateRecords();
     },
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to