Title: [198605] trunk/Source/WebInspectorUI
Revision
198605
Author
[email protected]
Date
2016-03-23 16:47:35 -0700 (Wed, 23 Mar 2016)

Log Message

Web Inspector: Allow clicking the Timeline in Editing Mode to toggle the checkbox
https://bugs.webkit.org/show_bug.cgi?id=155815

Patch by Joseph Pecoraro <[email protected]> on 2016-03-23
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._startEditingInstruments):
Remove unused variable.

* UserInterface/Views/TimelineTreeElement.js:
(WebInspector.TimelineTreeElement.prototype.onattach):
(WebInspector.TimelineTreeElement.prototype._clickHandler):
Make clicking on the tree element toggle the checkbox.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (198604 => 198605)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-23 23:47:29 UTC (rev 198604)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-23 23:47:35 UTC (rev 198605)
@@ -1,5 +1,21 @@
 2016-03-23  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Allow clicking the Timeline in Editing Mode to toggle the checkbox
+        https://bugs.webkit.org/show_bug.cgi?id=155815
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TimelineOverview.js:
+        (WebInspector.TimelineOverview.prototype._startEditingInstruments):
+        Remove unused variable.
+        
+        * UserInterface/Views/TimelineTreeElement.js:
+        (WebInspector.TimelineTreeElement.prototype.onattach):
+        (WebInspector.TimelineTreeElement.prototype._clickHandler):
+        Make clicking on the tree element toggle the checkbox.
+
+2016-03-23  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: Timeline Tab sometimes restores as blank
         https://bugs.webkit.org/show_bug.cgi?id=155811
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (198604 => 198605)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-03-23 23:47:29 UTC (rev 198604)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-03-23 23:47:35 UTC (rev 198605)
@@ -864,7 +864,6 @@
 
         for (let type of this._instrumentTypes) {
             let treeElement = this._treeElementsByTypeMap.get(type);
-            let checked = !!treeElement;
             if (!treeElement) {
                 let timeline = this._recording.timelines.get(type);
                 console.assert(timeline, "Missing timeline for type " + type);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTreeElement.js (198604 => 198605)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTreeElement.js	2016-03-23 23:47:29 UTC (rev 198604)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTreeElement.js	2016-03-23 23:47:35 UTC (rev 198605)
@@ -60,6 +60,15 @@
         this._updateStatusButton();
     }
 
+    // Protected
+
+    onattach()
+    {
+        super.onattach();
+
+        this.listItemElement.addEventListener("click", this._clickHandler.bind(this));
+    }
+
     // Private
 
     _showCloseButton()
@@ -88,4 +97,12 @@
         else
             this._showCloseButton();
     }
+
+    _clickHandler()
+    {
+        if (!this._editing)
+            return;
+
+        this.status.checked = !this.status.checked;
+    }
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to