Web Inspector: Add a new Scanner TimelineMarker to show up when mousing over Timeline...
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 06:54:21 +0000 (06:54 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 06:54:21 +0000 (06:54 +0000)
commit5468147dbc1734c03ac98f5575bd3b5311cf2203
tree08186f72700af2700a020c954100c713b265bf4c
parentdf7fe10e4166228d0ada31677f9590f03d76ca6a
Web Inspector: Add a new Scanner TimelineMarker to show up when mousing over TimelineView graphs
https://bugs.webkit.org/show_bug.cgi?id=195079

Reviewed by Devin Rousso.

* UserInterface/Base/Utilities.js:
(Note.prototype.enclosingNodeOrSelfWithClassInArray):
Helper for a set of classes.

* UserInterface/Models/TimelineMarker.js:
Add a new marker type, "Scanner".

* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype.initialLayout):
(WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
(WI.CPUTimelineView.prototype._handleGraphMouseMove):
* UserInterface/Views/MemoryTimelineView.js:
(WI.MemoryTimelineView):
(WI.MemoryTimelineView.prototype._graphPositionForMouseEvent):
(WI.MemoryTimelineView.prototype._handleGraphMouseMove):
Update a scanner time when mousing over various graphs that span the entire time range.
These use the containing graph element because there was a single pixel between
adjacent graphs which would cause the scanner to flicker because the mouse event target
was not an svg element.

* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype.hidden):
(WI.TimelineOverview.prototype.updateScannerTime):
(WI.TimelineOverview.prototype.clearScanner):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerTimeDidChange):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerDidClear):
Update the overview's ruler with scanner changes.

* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .markers > .marker.scanner):
* UserInterface/Views/TimelineRuler.js:
(WI.TimelineRuler):
(WI.TimelineRuler.prototype.clearMarkers):
(WI.TimelineRuler.prototype.updateScannerTime):
(WI.TimelineRuler.prototype.clearScanner):
(WI.TimelineRuler.prototype._updateMarkers):
Have a special scanner marker that updates.

* UserInterface/Views/TimelineView.js:
New events that a TimelineView can dispatch to update the overview.

* UserInterface/Views/Variables.css:
(:root):
(@media (prefers-color-scheme: dark)):
Scanner marker colors.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/TimelineMarker.js
Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js
Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js
Source/WebInspectorUI/UserInterface/Views/ShaderProgramContentView.css
Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js
Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js
Source/WebInspectorUI/UserInterface/Views/TimelineRuler.css
Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js
Source/WebInspectorUI/UserInterface/Views/TimelineView.js
Source/WebInspectorUI/UserInterface/Views/Variables.css