Title: [201133] branches/safari-602.1.32-branch/Source/WebInspectorUI

Diff

Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog (201132 => 201133)


--- branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog	2016-05-19 08:39:53 UTC (rev 201132)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog	2016-05-19 08:39:56 UTC (rev 201133)
@@ -1,5 +1,28 @@
 2016-05-19  Babak Shafiei  <[email protected]>
 
+        Merge r200716. rdar://problem/26232856
+
+    2016-05-11  Matt Baker  <[email protected]>
+
+            Web Inspector: Make it possible to do special styling on selected TimelineOverviewGraphs
+            https://bugs.webkit.org/show_bug.cgi?id=157593
+            <rdar://problem/26232886>
+
+            Reviewed by Timothy Hatcher.
+
+            * UserInterface/Views/TimelineOverview.js:
+            (WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange.updateGraphSelectedState):
+            (WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
+            Select the new overview graph and deselect the old one.
+
+            * UserInterface/Views/TimelineOverviewGraph.js:
+            (WebInspector.TimelineOverviewGraph):
+            (WebInspector.TimelineOverviewGraph.prototype.get selected):
+            (WebInspector.TimelineOverviewGraph.prototype.set selected):
+            New property, toggles "selected" class on the graph element.
+
+2016-05-19  Babak Shafiei  <[email protected]>
+
         Merge r200656. rdar://problem/25898256
 
     2016-05-10  Matt Baker  <[email protected]>

Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (201132 => 201133)


--- branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-05-19 08:39:53 UTC (rev 201132)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-05-19 08:39:56 UTC (rev 201133)
@@ -789,16 +789,29 @@
         return this._viewMode === WebInspector.TimelineOverview.ViewMode.Timelines ? this._timelinesViewModeSettings : this._renderingFramesViewModeSettings;
     }
 
-    _timelinesTreeSelectionDidChange()
+    _timelinesTreeSelectionDidChange(event)
     {
-        let treeElement = this._timelinesTreeOutline.selectedTreeElement;
+        function updateGraphSelectedState(timeline, selected)
+        {
+            let overviewGraph = this._overviewGraphsByTypeMap.get(timeline.type);
+            console.assert(overviewGraph, "Missing overview graph for timeline", timeline);
+            overviewGraph.selected = selected;
+        }
+
+        let selectedTreeElement = event.data.selectedElement;
+        let deselectedTreeElement = event.data.deselectedElement;
         let timeline = null;
-        if (treeElement) {
-            timeline = treeElement.representedObject;
+        if (selectedTreeElement) {
+            timeline = selectedTreeElement.representedObject;
             console.assert(timeline instanceof WebInspector.Timeline, timeline);
             console.assert(this._recording.timelines.get(timeline.type) === timeline, timeline);
+
+            updateGraphSelectedState.call(this, timeline, true);
         }
 
+        if (deselectedTreeElement)
+            updateGraphSelectedState.call(this, deselectedTreeElement.representedObject, false);
+
         this._selectedTimeline = timeline;
         this.dispatchEventToListeners(WebInspector.TimelineOverview.Event.TimelineSelected);
     }

Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js (201132 => 201133)


--- branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js	2016-05-19 08:39:53 UTC (rev 201132)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js	2016-05-19 08:39:56 UTC (rev 201133)
@@ -39,6 +39,7 @@
         this._selectedRecord = null;
         this._selectedRecordChanged = false;
         this._scheduledSelectedRecordLayoutUpdateIdentifier = undefined;
+        this._selected = false;
         this._visible = true;
     }
 
@@ -174,6 +175,17 @@
         return 36;
     }
 
+    get selected() { return this._selected; }
+
+    set selected(x)
+    {
+        if (this._selected === x)
+            return;
+
+        this._selected = x;
+        this.element.classList.toggle("selected", this._selected);
+    }
+
     shown()
     {
         if (this._visible)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to