Web Inspector: Search: allow DOM searches to be case sensitive
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-03-20  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Search: allow DOM searches to be case sensitive
4         https://bugs.webkit.org/show_bug.cgi?id=194673
5         <rdar://problem/48087577>
6
7         Reviewed by Timothy Hatcher.
8
9         * UserInterface/Views/SearchSidebarPanel.js:
10         (WI.SearchSidebarPanel.prototype.performSearch):
11
12         * UserInterface/Views/DOMTreeContentView.js:
13         (WI.DOMTreeContentView.prototype.performSearch.contextNodesReady):
14
15         * UserInterface/Controllers/DOMManager.js:
16         (WI.DOMManager.prototype.performSearch.callback): Deleted.
17         (WI.DOMManager.prototype.performSearch): Deleted.
18         (WI.DOMManager.prototype.searchResult.mycallback): Deleted.
19         (WI.DOMManager.prototype.searchResult): Deleted.
20         (WI.DOMManager.prototype.cancelSearch): Deleted.
21         Drive-by: remove unused code.
22
23 2019-03-19  Devin Rousso  <drousso@apple.com>
24
25         Web Inspector: Sources: provide option to group by path
26         https://bugs.webkit.org/show_bug.cgi?id=195203
27         <rdar://problem/27340680>
28
29         Reviewed by Timothy Hatcher.
30
31         Create top-level folders for each origin and nest all resources (in a folder chain) underneath.
32
33         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
34         (WI.SourcesNavigationSidebarPanel):
35         (WI.SourcesNavigationSidebarPanel.prototype.closed):
36         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.searchTreeOutline): Added.
37         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
38         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
39         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
40         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
41         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
42         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
43         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown.addOption): Added.
44         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Added.
45         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
46         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
47         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
48         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
49         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
50         (.sidebar > .panel.navigation.sources > .content):
51         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
52         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Added.
53         (.sidebar > .panel.navigation.sources > .content > .resources): Added.
54         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
55         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
56         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)): Deleted.
57         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
58         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
59         Drive-by: fix "No Filter Results" message view to not overlap eachother.
60         Drive-by: try to be more smart about what tree we focus when selecting a represented object.
61
62         * UserInterface/Views/ResourceTreeElement.js:
63         (WI.ResourceTreeElement):
64         (WI.ResourceTreeElement.prototype.get mainTitleText):
65         (WI.ResourceTreeElement.prototype._updateTitles):
66         * UserInterface/Base/URLUtilities.js:
67         (WI.displayNameForURL):
68         Provide a way for the display name to use a directory "/" instead of the last path component.
69         This is needed in cases where the loaded resource is an implicit "index.*".
70
71         * UserInterface/Views/GeneralTreeElement.js:
72         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath): Added.
73         * UserInterface/Views/SourceCodeTreeElement.js:
74         (WI.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath): Deleted.
75
76         * Localizations/en.lproj/localizedStrings.js:
77         * UserInterface/Models/Resource.js:
78
79         * UserInterface/Views/DetailsSection.css:
80         (.details-section > .header .go-to-arrow):
81         Drive-by: vertically center go-to-arrow.
82
83         * UserInterface/Protocol/InspectorFrontendAPI.js:
84         (InspectorFrontendAPI.contextMenuItemSelected):
85
86         * UserInterface/Base/Setting.js:
87         * UserInterface/Views/NetworkTableContentView.js:
88         (WI.NetworkTableContentView):
89         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
90         (WI.NetworkTableContentView.prototype._populateNameCell):
91         (WI.NetworkTableContentView.prototype._generateSortComparator):
92         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
93         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
94         (WI.NetworkTableContentView.prototype._handleGroupMediaRequestsByDOMNodeCheckedDidChange): Added.
95         (WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange): Deleted.
96         Rename the `groupByNode` setting to be more specific.
97
98 2019-03-19  Devin Rousso  <drousso@apple.com>
99
100         Web Inspector: CPU Usage Timeline - the right edge of each column should align with a CPU measurement
101         https://bugs.webkit.org/show_bug.cgi?id=195789
102         <rdar://problem/48915271>
103
104         Reviewed by Joseph Pecoraro.
105
106         Right now, each column is rendered such that the middle of the column is aligned with the
107         time of the CPU measurement. This could potentially be misleading, as the width/position of
108         the bar implies that there was a period of time after the actual time of the CPU measurement
109         that should be "attributed" to that same CPU measurement.
110
111            1      2      3
112                _______
113                [  *  ]
114                [  *  ]_______
115                [  *  ][  *  ]
116         _______[  *  ][  *  ]
117         [  *  ][  *  ][  *  ]
118         [__*__][__*__][__*__]
119          A   B  C   D  E   F
120
121         In this example, one might "attribute" any work done at time B to record 1, when in reality,
122         it should be "attributed" to record 2, since the CPU measurement had already been taken by
123         the time B was captured, meaning that the work for B hadn't yet been done and could
124         therefore not have affected the CPU measurement for record 1.
125
126         We should be rendering the columns such that the CPU measurement aligns with the trailing
127         edge of the column, so that all of the work that could be "attributed" to a given CPU
128         measurement comes before it.
129
130           1      2      3
131             _______       ___
132             [    *]       [
133             [    *]_______[
134             [    *][    *][
135         ____[    *][    *][
136           *][    *][    *][
137         __*][____*][____*][__
138          A   B  C   D  E   F
139
140                 NOTE: this "rendering" isn't exactly accurate, as the `*` should overlap the `]`.
141
142         Legend:
143          - `[     ]` represents a column for a CPU measurement
144          - `*` represents the time when the measurement actually takes place
145
146         * UserInterface/Views/CPUTimelineOverviewGraph.js:
147         (WI.CPUTimelineOverviewGraph.prototype.layout):
148         (WI.CPUTimelineOverviewGraph.prototype._handleChartClick):
149         * UserInterface/Views/TimelineOverview.js:
150         (WI.TimelineOverview.prototype._recordSelected):
151
152 2019-03-19  Devin Rousso  <drousso@apple.com>
153
154         Web Inspector: Provide $event in the console when paused on an event listener
155         https://bugs.webkit.org/show_bug.cgi?id=188672
156
157         Reviewed by Timothy Hatcher.
158
159         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
160         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
161
162 2019-03-19  Devin Rousso  <drousso@apple.com>
163
164         Web Inspector: DOM: "Capture Screenshot" should only be shown if the node is attached
165         https://bugs.webkit.org/show_bug.cgi?id=195793
166         <rdar://problem/48916594>
167
168         Reviewed by Joseph Pecoraro.
169
170         * UserInterface/Models/DOMNode.js:
171         (WI.DOMNode.prototype.get attached): Added.
172
173         * UserInterface/Views/ContextMenuUtilities.js:
174         (WI.appendContextMenuItemsForDOMNode):
175         * UserInterface/Views/DOMTreeElement.js:
176         (WI.DOMTreeElement.prototype._populateTagContextMenu):
177
178 2019-03-18  Joseph Pecoraro  <pecoraro@apple.com>
179
180         Web Inspector: HAR Extension for `serverIPAddress` port number
181         https://bugs.webkit.org/show_bug.cgi?id=195695
182
183         Reviewed by Matt Baker.
184
185         * UserInterface/Controllers/HARBuilder.js:
186         (WI.HARBuilder.entry):
187         (WI.HARBuilder.port):
188         * UserInterface/Models/LocalResource.js:
189         (WI.LocalResource.fromHAREntry):
190
191 2019-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
192
193         Web Inspector: Changes: style attribute changes aren't being tracked
194         https://bugs.webkit.org/show_bug.cgi?id=193859
195         <rdar://problem/47568977>
196
197         Reviewed by Devin Rousso.
198
199         * UserInterface/Controllers/CSSManager.js:
200         (WI.CSSManager):
201         (WI.CSSManager.prototype.get modifiedStyles):
202         (WI.CSSManager.prototype.addModifiedStyle):
203         (WI.CSSManager.prototype._mainResourceDidChange):
204         (WI.CSSManager.prototype.get modifiedCSSRules): Deleted.
205         (WI.CSSManager.prototype.addModifiedCSSRule): Deleted.
206         (WI.CSSManager.prototype.removeModifiedCSSRule): Deleted.
207         * UserInterface/Models/CSSRule.js:
208         (WI.CSSRule.prototype.get stringId): Deleted.
209         (WI.CSSRule.prototype.markModified): Deleted.
210         * UserInterface/Models/CSSStyleDeclaration.js:
211         (WI.CSSStyleDeclaration.prototype.get stringId):
212         (WI.CSSStyleDeclaration.prototype.markModified):
213         Inline styles weren't tracked because they didn't have owner rules.
214         Track style declarations instead of CSS rules.
215
216         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
217         (.sidebar > .panel.changes-panel .css-rule):
218         (.sidebar > .panel.changes-panel .css-rule + .css-rule):
219         (.changes-panel .selector.style-attribute):
220         (.changes-panel .selector:not(.style-attribute)):
221         (.changes-panel .css-property-line > .property):
222         (.changes-panel .css-property-line.unchanged): Deleted.
223         Drive-by: use text-color-secondary for unchanged properties instead of altering opacity.
224
225         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
226         (WI.ChangesDetailsSidebarPanel.prototype.layout):
227         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
228         For an inline style declaration, instead of showing a CSS source file location show an appropriate selector for its DOM node.
229
230 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
231
232         Web Inspector: HAR Extension for Resource Priority
233         https://bugs.webkit.org/show_bug.cgi?id=195693
234
235         Reviewed by Devin Rousso.
236
237         * UserInterface/Controllers/HARBuilder.js:
238         (WI.HARBuilder.entry):
239         (WI.HARBuilder.priority):
240         (WI.HARBuilder.networkPriorityFromHARPriority):
241         Include priority custom extension.
242
243         * UserInterface/Models/LocalResource.js:
244         (WI.LocalResource.fromHAREntry):
245         Import priority.
246
247 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
248
249         Web Inspector: CPU Usage Timeline - Give long thread names a tooltip if they could be ellipsized
250         https://bugs.webkit.org/show_bug.cgi?id=195314
251
252         Reviewed by Devin Rousso.
253
254         * UserInterface/Views/CPUUsageView.js:
255         (WI.CPUUsageView):
256
257 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
258
259         Web Inspector: CPU Usage Timeline - Reduce the intensity of the orange overlay color in dark mode
260         https://bugs.webkit.org/show_bug.cgi?id=195772
261
262         Reviewed by Devin Rousso.
263
264         * UserInterface/Views/Variables.css:
265         (@media (prefers-color-scheme: dark)):
266         (:root):
267
268 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
269
270         Web Inspector: Timelines - Import / Export Timeline Recordings
271         https://bugs.webkit.org/show_bug.cgi?id=195709
272         <rdar://problem/23188921>
273
274         Reviewed by Devin Rousso.
275
276         Timeline exporting saves TimelineRecording and TimelineOverview state.
277         The TimelineRecording includes all kinds of model objects, such as
278         records, markers, memory pressure events, etc. It also includes raw
279         protocol data, such as script profiler samples. TimelineOverview
280         includes some of the view state to restore, such as the selected
281         time range, zoom level, and selected timeline.
282
283         Timeline importing constructs a new TimelineRecording by replaying
284         the records, markers, and other events, as well as re-initializing
285         more state. To finally display the imported recording, the content
286         view will immediately initialize start/current/end times and the
287         overview will restore the view state.
288
289         * Localizations/en.lproj/localizedStrings.js:
290         New strings.
291
292         * UserInterface/Controllers/TimelineManager.js:
293         (WI.TimelineManager.synthesizeImportError):
294         (WI.TimelineManager.prototype.importRecording):
295         Import API.
296
297         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
298         Initialize the samples on the recording via a different path
299         so that the data can be saved for exporting.
300
301         * UserInterface/Models/TimelineRecording.js:
302         (WI.TimelineRecording):
303         (WI.TimelineRecording.import):
304         (WI.TimelineRecording.prototype.exportData):
305         (WI.TimelineRecording.prototype.get capturing):
306         (WI.TimelineRecording.prototype.get imported):
307         (WI.TimelineRecording.prototype.unloaded):
308         (WI.TimelineRecording.prototype.reset):
309         (WI.TimelineRecording.prototype.addEventMarker):
310         (WI.TimelineRecording.prototype.addRecord):
311         (WI.TimelineRecording.prototype.addMemoryPressureEvent):
312         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
313         (WI.TimelineRecording.prototype.canExport):
314         Save data at the TimelineRecording level that can be used for export.
315         We only allow exporting a TimelineRecording that has started/stopped
316         at least once and is not currently capturing.
317
318         * UserInterface/Views/TimelineRecordingContentView.js:
319         (WI.TimelineRecordingContentView):
320         (WI.TimelineRecordingContentView.prototype.get navigationItems):
321         (WI.TimelineRecordingContentView.prototype.get supportsSave):
322         (WI.TimelineRecordingContentView.prototype.get saveData):
323         (WI.TimelineRecordingContentView.prototype.shown):
324         (WI.TimelineRecordingContentView.prototype._capturingStarted):
325         (WI.TimelineRecordingContentView.prototype._capturingStopped):
326         (WI.TimelineRecordingContentView.prototype._initializeImportedRecording):
327         (WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
328         (WI.TimelineRecordingContentView.prototype._importButtonNavigationItemClicked):
329         (WI.TimelineRecordingContentView.prototype._recordingReset):
330         Add Import and Export buttons in the Timeline navigation bar.
331
332         * UserInterface/Views/TimelineOverview.js:
333         (WI.TimelineOverview):
334         (WI.TimelineOverview.prototype.exportData):
335         (WI.TimelineOverview.prototype._instrumentAdded):
336         (WI.TimelineOverview.prototype._recordingImported):
337         When importing a recording update the TimelineOverview state
338         soon afterwards.
339
340         * UserInterface/Models/CPUTimelineRecord.js:
341         (WI.CPUTimelineRecord.fromJSON):
342         (WI.CPUTimelineRecord.prototype.toJSON):
343         * UserInterface/Models/GarbageCollection.js:
344         (WI.GarbageCollection.fromJSON):
345         (WI.GarbageCollection.prototype.toJSON):
346         * UserInterface/Models/Geometry.js:
347         (WI.Quad.fromJSON):
348         (WI.Quad.prototype.toJSON):
349         * UserInterface/Models/HeapAllocationsTimelineRecord.js:
350         (WI.HeapAllocationsTimelineRecord.fromJSON):
351         (WI.HeapAllocationsTimelineRecord.prototype.toJSON):
352         * UserInterface/Models/LayoutTimelineRecord.js:
353         (WI.LayoutTimelineRecord.fromJSON):
354         (WI.LayoutTimelineRecord.prototype.toJSON):
355         * UserInterface/Models/MediaTimelineRecord.js:
356         (WI.MediaTimelineRecord.fromJSON):
357         (WI.MediaTimelineRecord.prototype.toJSON):
358         * UserInterface/Models/MemoryPressureEvent.js:
359         (WI.MemoryPressureEvent.fromJSON):
360         (WI.MemoryPressureEvent.prototype.toJSON):
361         * UserInterface/Models/MemoryTimelineRecord.js:
362         (WI.MemoryTimelineRecord):
363         (WI.MemoryTimelineRecord.fromJSON):
364         (WI.MemoryTimelineRecord.prototype.toJSON):
365         * UserInterface/Models/RenderingFrameTimelineRecord.js:
366         (WI.RenderingFrameTimelineRecord.fromJSON):
367         (WI.RenderingFrameTimelineRecord.prototype.toJSON):
368         * UserInterface/Models/ResourceTimelineRecord.js:
369         (WI.ResourceTimelineRecord.fromJSON):
370         (WI.ResourceTimelineRecord.prototype.toJSON):
371         * UserInterface/Models/ScriptTimelineRecord.js:
372         (WI.ScriptTimelineRecord.fromJSON):
373         (WI.ScriptTimelineRecord.prototype.toJSON):
374         * UserInterface/Models/TimelineMarker.js:
375         (WI.TimelineMarker.fromJSON):
376         (WI.TimelineMarker.prototype.toJSON):
377         (WI.TimelineMarker.prototype.get type):
378         (WI.TimelineMarker.prototype.get details):
379         (WI.TimelineMarker.prototype.set time):
380         (WI.TimelineMarker):
381         * UserInterface/Models/TimelineRecord.js:
382         (WI.TimelineRecord.fromJSON):
383         (WI.TimelineRecord.prototype.toJSON):
384         Import / Export toJSON / fromJSON implementations.
385         
386         * UserInterface/Views/CPUTimelineOverviewGraph.js:
387         (WI.CPUTimelineOverviewGraph):
388         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
389         (WI.CPUTimelineOverviewGraph.prototype._processRecord):
390         * UserInterface/Views/LayoutTimelineOverviewGraph.js:
391         (WI.LayoutTimelineOverviewGraph):
392         (WI.LayoutTimelineOverviewGraph.prototype._layoutTimelineRecordAdded):
393         (WI.LayoutTimelineOverviewGraph.prototype._processRecord):
394         * UserInterface/Views/LayoutTimelineView.js:
395         (WI.LayoutTimelineView):
396         (WI.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
397         (WI.LayoutTimelineView.prototype._processRecord):
398         * UserInterface/Views/MediaTimelineView.js:
399         (WI.MediaTimelineView):
400         (WI.MediaTimelineView.prototype._handleRecordAdded):
401         (WI.MediaTimelineView.prototype._processRecord):
402         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
403         (WI.MemoryTimelineOverviewGraph):
404         (WI.MemoryTimelineOverviewGraph.prototype._memoryTimelineRecordAdded):
405         (WI.MemoryTimelineOverviewGraph.prototype._processRecord):
406         * UserInterface/Views/MemoryTimelineView.js:
407         (WI.MemoryTimelineView):
408         (WI.MemoryTimelineView.prototype._memoryTimelineRecordAdded):
409         (WI.MemoryTimelineView.prototype._processRecord):
410         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
411         (WI.NetworkTimelineOverviewGraph):
412         (WI.NetworkTimelineOverviewGraph.prototype.reset):
413         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
414         (WI.NetworkTimelineOverviewGraph.prototype._processRecord):
415         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded.compareByStartTime): Deleted.
416         * UserInterface/Views/NetworkTimelineView.js:
417         (WI.NetworkTimelineView):
418         (WI.NetworkTimelineView.prototype._networkTimelineRecordAdded):
419         (WI.NetworkTimelineView.prototype._processRecord):
420         * UserInterface/Views/RenderingFrameTimelineView.js:
421         (WI.RenderingFrameTimelineView):
422         (WI.RenderingFrameTimelineView.prototype._renderingFrameTimelineRecordAdded):
423         (WI.RenderingFrameTimelineView.prototype._processRecord):
424         * UserInterface/Views/ScriptDetailsTimelineView.js:
425         (WI.ScriptDetailsTimelineView):
426         (WI.ScriptDetailsTimelineView.prototype._scriptTimelineRecordAdded):
427         (WI.ScriptDetailsTimelineView.prototype._processRecord):
428         Add common _processRecord path to each timeline OverviewGraph and TimelineView.
429         By calling this in construction we populate graphs with TimelineRecords that
430         may have already existed. This is necessary for imports, but this also fixes
431         the case where you enable a timeline that had data and it didn't show data.
432
433         * UserInterface/Views/LayoutTimelineOverviewGraph.css:
434         (.timeline-overview-graph.layout-overview > .graph-row):
435         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar):
436         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar > .segment):
437         (.timeline-overview-graph.layout > .graph-row): Deleted.
438         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar): Deleted.
439         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar > .segment): Deleted.
440         * UserInterface/Views/TimelineRecordBar.css:
441         (.timeline-record-bar.timeline-record-type-layout.paint > .segment,):
442         (.timeline-record-bar.timeline-record-type-layout.layout-timeline-record-paint > .segment,): Deleted.
443         We simplified some of the sub-record type enum strings. To do this we needed to change
444         "layout" to "layout-overview" to avoid a conflict.
445
446 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
447
448         Web Inspector: Network - Toggle Between Live Activity and Imported HAR resource collections
449         https://bugs.webkit.org/show_bug.cgi?id=195734
450
451         Reviewed by Devin Rousso.
452
453         * Localizations/en.lproj/localizedStrings.js:
454         * UserInterface/Images/NetworkHAR.svg: Added.
455         * UserInterface/Images/NetworkOverview.svg: Added.
456         * UserInterface/Views/NetworkTableContentView.css:
457         (.content-view.tab.network > .content-browser > .navigation-bar .hierarchical-path .icon):
458         (.network-overview-icon > .icon):
459         (.network-har-icon > .icon):
460         (@media (prefers-color-scheme: dark)):
461
462         * UserInterface/Views/NetworkTableContentView.js:
463         (WI.NetworkTableContentView):
464         (WI.NetworkTableContentView.prototype.get navigationItems):
465         (WI.NetworkTableContentView.prototype.reset):
466         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
467         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
468         (WI.NetworkTableContentView.prototype.tableNumberOfRows):
469         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
470         (WI.NetworkTableContentView.prototype.tableSelectionDidChange):
471         (WI.NetworkTableContentView.prototype.tablePopulateCell):
472         (WI.NetworkTableContentView.prototype._addCollection):
473         (WI.NetworkTableContentView.prototype._setActiveCollection):
474         (WI.NetworkTableContentView.prototype._addCollectionPathComponent):
475         (WI.NetworkTableContentView.prototype._collectionsHierarchicalPathComponentWasSelected):
476         (WI.NetworkTableContentView.prototype._changeCollection):
477         (WI.NetworkTableContentView.prototype.handleClearShortcut):
478         (WI.NetworkTableContentView.prototype._updateWaterfallTimeRange):
479         (WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
480         (WI.NetworkTableContentView.prototype._canExportHAR):
481         (WI.NetworkTableContentView.prototype._processPendingEntries):
482         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
483         (WI.NetworkTableContentView.prototype._rowIndexForRepresentedObject):
484         (WI.NetworkTableContentView.prototype._updateEntryForResource):
485         (WI.NetworkTableContentView.prototype._updateEmptyFilterResultsMessage):
486         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
487         (WI.NetworkTableContentView.prototype._mainFrameDidChange):
488         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
489         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
490         (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
491         (WI.NetworkTableContentView.prototype._handleResourceAdded):
492         (WI.NetworkTableContentView.prototype._runForMainCollection):
493         (WI.NetworkTableContentView.prototype._isShowingMainCollection):
494         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
495         (WI.NetworkTableContentView.prototype._handleNodeDidFireEvent):
496         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged):
497         (WI.NetworkTableContentView.prototype._updateSort):
498         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
499         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
500         (WI.NetworkTableContentView.prototype._HARResources):
501         (WI.NetworkTableContentView.prototype._importHAR):
502         Introduce the concept of collections that can be swapped in/out
503         to re-render the Network Table with different contents.
504
505 2019-03-15  Devin Rousso  <drousso@apple.com>
506
507         Web Inspector: provide a way to capture a screenshot of a node from within the page
508         https://bugs.webkit.org/show_bug.cgi?id=194279
509         <rdar://problem/10731573>
510
511         Reviewed by Joseph Pecoraro.
512
513         Add `console.screenshot` functionality, which displays a screenshot of a given object (if
514         able) within Web Inspector's Console tab. From there, it can be viewed and saved.
515
516         Currently, `console.screenshot` will
517          - capture an image of a `Node` (if provided)
518          - capture an image of the viewport if nothing is provided
519
520         * UserInterface/Models/ConsoleMessage.js:
521         (WI.ConsoleMessage):
522         * UserInterface/Views/ConsoleCommandView.js:
523         (WI.ConsoleCommandView.prototype.render):
524         * UserInterface/Views/ConsoleMessageView.js:
525         (WI.ConsoleMessageView.prototype.render):
526         (WI.ConsoleMessageView.prototype.toClipboardString):
527         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
528         (WI.ConsoleMessageView.prototype._appendSavedResultIndex):
529         (WI.ConsoleMessageView.prototype._appendStackTrace):
530         (WI.ConsoleMessageView.prototype._makeExpandable):
531         (WI.ConsoleMessageView.prototype._handleContextMenu): Added.
532         * UserInterface/Views/ConsoleMessageView.css:
533         (.console-user-command.special-user-log > .console-message-body): Added.
534         (.console-message-body): Added.
535         (.console-message-body > span): Added.
536         (.console-message-body > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Added.
537         (.console-message-body > .console-image): Added.
538         (.console-message-body > .show-grid): Added.
539         (.console-error-level .console-message-body): Added.
540         (.console-warning-level .console-message-body): Added.
541         (.console-log-level.console-image-container::before): Added.
542         (.console-user-command > .console-message-body): Added.
543         (.console-warning-level .console-message-body): Added.
544         (.console-error-level .console-message-body): Added.
545         (.console-user-command > .console-message-body): Added.
546         (.console-user-command.special-user-log > .console-message-text): Deleted.
547         (.console-message-text): Deleted.
548         (.console-message-text > span): Deleted.
549         (.console-message-text > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Deleted.
550         (.console-error-level .console-message-text): Deleted.
551         (.console-warning-level .console-message-text): Deleted.
552         (.console-user-command > .console-message-text): Deleted.
553         (.console-warning-level .console-message-text): Deleted.
554         (.console-error-level .console-message-text): Deleted.
555         (.console-user-command > .console-message-text): Deleted.
556         * UserInterface/Views/LogContentView.css:
557         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-text .highlighted): Added.
558         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-body .highlighted): Deleted.
559         Renamed variables/classes to be more semantically correct when the content is an image.
560          - `_messageTextElement` to `_messageBodyElement` (JS)
561          - `.console-message-text` to `.console-message-body` (CSS)
562
563         * UserInterface/Controllers/JavaScriptLogViewController.js:
564         (WI.JavaScriptLogViewController.prototype.renderPendingMessages):
565
566         * UserInterface/Views/Main.css:
567         (:matches(img, canvas).show-grid):
568         (@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):
569
570         * UserInterface/Base/FileUtilities.js:
571         (WI.FileUtilities.screenshotString): Added.
572
573         * UserInterface/Models/NativeFunctionParameters.js:
574         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
575
576         * UserInterface/Images/ConsoleImage.svg: Copied from UserInterface/Images/Canvas.svg.
577         * Localizations/en.lproj/localizedStrings.js:
578
579 2019-03-14  Nikita Vasilyev  <nvasilyev@apple.com>
580
581         Web Inspector: Styles: Jump to effective property button doesn't hide after overridden property become effective
582         https://bugs.webkit.org/show_bug.cgi?id=195770
583         <rdar://problem/48903634>
584
585         Reviewed by Matt Baker.
586
587         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
588         (.spreadsheet-style-declaration-editor .property .select-effective-property): Added.
589         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property): Deleted.
590         Hide `.select-effective-property` element for properties that aren't overridden.
591
592 2019-03-14  Devin Rousso  <drousso@apple.com>
593
594         Web Inspector: REGRESSION: Canvas: the first processed action should be selected as soon as it's available if no previous selected action exists
595         https://bugs.webkit.org/show_bug.cgi?id=195732
596         <rdar://problem/48875214>
597
598         Reviewed by Matt Baker.
599
600         * UserInterface/Views/CanvasSidebarPanel.js:
601         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
602         Rather than wait until the entire recording is ready, set the selected action as soon as the
603         first action is ready (assuming there isn't already a selected action).
604
605 2019-03-14  Joseph Pecoraro  <pecoraro@apple.com>
606
607         Web Inspector: Network - HAR Import
608         https://bugs.webkit.org/show_bug.cgi?id=195642
609         <rdar://problem/34820974>
610
611         Reviewed by Devin Rousso.
612
613         * Localizations/en.lproj/localizedStrings.js
614         * UserInterface/Test.html:
615         * UserInterface/Test.html:
616         New strings and resources.
617
618         * UserInterface/Controllers/HARBuilder.js:
619         (WI.HARBuilder.dateFromHARDate):
620         (WI.HARBuilder.protocolFromHARProtocol):
621         (WI.HARBuilder.responseSourceFromHARFetchType):
622         Reverse parsers from HAR to WI.Resource types.
623
624         * UserInterface/Models/LocalResource.js: Added.
625         (WI.LocalResource):
626         (WI.LocalResource.headersArrayToHeadersObject):
627         (WI.LocalResource.fromHAREntry):
628         (WI.LocalResource.prototype.hasContent):
629         (WI.LocalResource.prototype.setContent):
630         (WI.LocalResource.prototype.requestContentFromBackend):
631         A Resource subclass with data fully supplied in the frontend.
632
633         * UserInterface/Controllers/NetworkManager.js:
634         (WI.NetworkManager):
635         (WI.NetworkManager.synthesizeImportError):
636         (WI.NetworkManager.prototype.localResourceForURL):
637         (WI.NetworkManager.prototype.processHAR):
638         Process a HAR and extract local resources.
639
640         * UserInterface/Views/NetworkTableContentView.js:
641         (WI.NetworkTableContentView):
642         (WI.NetworkTableContentView.prototype.reset):
643         (WI.NetworkTableContentView.prototype._handleResourceAdded):
644         (WI.NetworkTableContentView.prototype._importHAR):
645         Add an import button. When an import succeeds reset the
646         table and only show imported resources (ignoring page
647         loaded resources).
648
649 2019-03-14  Devin Rousso  <drousso@apple.com>
650
651         Web Inspector: Console: getEventListeners should work for any EventTarget
652         https://bugs.webkit.org/show_bug.cgi?id=195713
653
654         Reviewed by Joseph Pecoraro.
655
656         * UserInterface/Models/NativeFunctionParameters.js:
657
658 2019-03-14  Devin Rousso  <drousso@apple.com>
659
660         Web Inspector: Styles: `::-webkit-scrollbar*` rules aren't shown
661         https://bugs.webkit.org/show_bug.cgi?id=195123
662         <rdar://problem/48450148>
663
664         Reviewed by Joseph Pecoraro.
665
666         * UserInterface/Controllers/CSSManager.js:
667         (WI.CSSManager.displayNameForPseudoId): Added.
668
669         * UserInterface/Models/DOMNodeStyles.js:
670         (WI.DOMNodeStyles.static uniqueOrderedStyles): Added.
671         (WI.DOMNodeStyles.prototype.get uniqueOrderedStyles):
672
673         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
674         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
675         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
676         Rather than iterate over the `WI.DOMNode`'s list of pseudo-elements (which is only ::before
677         and ::after), we iterate over the `WI.DOMNodeStyle`'s list of pseudo-element rules. This is
678         an object where the key is a `CSS.PseudoId` and the value is an object containing all the
679         matched rules and ordered styles for that pseudo-type. We can preserve the current
680         functionality by using the ::before/::after `WI.DOMNode` when we encounter one of those
681         pseudo-ids.
682
683         An additional benefit of this change is that `::before`/`::after` styles will still appear
684         in the Rules panel even if they don't have a `content` property set (e.g. when the
685         `::before`/`::after` pseudo-element doesn't exist). This is because the styles are no longer
686         fetched from those pseudo-element nodes directly, but rather as a matched style for the
687         parent node. As such, editing a `content` property to become invalid/disablde in a
688         `::before`/`::after` rule won't make the entire rule disappeaer.
689
690 2019-03-14  Devin Rousso  <drousso@apple.com>
691
692         Web Inspector: we should show artificial context menus on mousedown instead of click
693         https://bugs.webkit.org/show_bug.cgi?id=195494
694
695         Reviewed by Joseph Pecoraro.
696
697         * UserInterface/Views/ContextMenu.js:
698         (WI.ContextMenu):
699         (WI.ContextMenu.prototype.show):
700         (WI.ContextMenu.prototype.addBeforeShowCallback): Added.
701         (WI.ContextMenu.prototype.handleEvent):
702         Provide a way to register a callback that will be called right as the "contextmenu" event is
703         handled, but before the context menu is actually shown. Since "mousedown" events are also
704         fired when/before a "contextmenu" event is fired, each of the below callers has to maintain
705         some state indicating "we are about to show a context menu, so ignore all "mousedown" events
706         until that time". Without this, the below callers wouldn't be able to tell when the context
707         menu is finally shown.
708
709         * UserInterface/Base/SearchUtilities.js:
710         (WI.SearchUtilities.createSettingsButton):
711         * UserInterface/Views/CanvasContentView.js:
712         (WI.CanvasContentView):
713         (WI.CanvasContentView.prototype.initialLayout):
714         (WI.CanvasContentView.prototype._handleCanvasElementButtonMouseDown): Added.
715         (WI.CanvasContentView.prototype._handleViewShaderButtonMouseDown): Added.
716         (WI.CanvasContentView.prototype._handleViewRecordingButtonMouseDown): Added.
717         (WI.CanvasContentView.prototype._canvasElementButtonClicked): Deleted.
718         (WI.CanvasContentView.prototype._handleViewShaderButtonClicked): Deleted.
719         (WI.CanvasContentView.prototype._handleViewRecordingButtonClicked): Deleted.
720         * UserInterface/Views/DebuggerSidebarPanel.js:
721         (WI.DebuggerSidebarPanel):
722         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): Added.
723         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked): Deleted.
724         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
725         (WI.SourcesNavigationSidebarPanel):
726         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): Added.
727         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked): Deleted.
728         * UserInterface/Views/TabBar.js:
729         (WI.TabBar.prototype._handleMouseDown):
730         * UserInterface/Views/LegacyTabBar.js:
731         (WI.LegacyTabBar.prototype._handleMouseDown):
732
733 2019-03-13  Devin Rousso  <drousso@apple.com>
734
735         Web Inspector: Debugger: pausing in an inline script on a page with a URL query creates an Extra Script
736         https://bugs.webkit.org/show_bug.cgi?id=195705
737         <rdar://problem/48853820>
738
739         Reviewed by Antoine Quint.
740
741         * UserInterface/Models/Script.js:
742         (WI.Script.prototype._resolveResource):
743         If the page's URL has a query parameter, the payload we receive for any inline <script>s
744         doesn't include the query parameter as part of its URL. As such, if there isn't an existing
745         resource with a URL that exactly matches the URL of the script and if the URL of the main
746         resource for the script's target starts with the URL of the script, we assume that the
747         script "belongs" to the target's main resource and associate the script with it as such.
748
749 2019-03-13  Keith Rollin  <krollin@apple.com>
750
751         Add support for new StagedFrameworks layout
752         https://bugs.webkit.org/show_bug.cgi?id=195543
753
754         Reviewed by Alexey Proskuryakov.
755
756         When creating the WebKit layout for out-of-band Safari/WebKit updates,
757         use an optional path prefix when called for.
758
759         Opportunistic cleanup: remove unused
760         OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH variable, which otherwise would
761         have needlessly been updated to also incorporate the new prefix.
762
763         * Configurations/Base.xcconfig:
764         * Configurations/WebKitTargetConditionals.xcconfig: Added.
765
766 2019-03-13  Nikita Vasilyev  <nvasilyev@apple.com>
767
768         REGRESSION(r240946): Web Inspector: Styles: removing selected property doesn't update overridden status
769         https://bugs.webkit.org/show_bug.cgi?id=195389
770         <rdar://problem/48658929>
771
772         Reviewed by Matt Baker.
773
774         * UserInterface/Models/DOMNodeStyles.js:
775         (WI.DOMNodeStyles.prototype.changeStyleText):
776         Call DOMNodeStyles.prototype.refresh after the callback. No updates
777         to CSSStyleDeclaration happen until the callback is called.
778
779 2019-03-13  Devin Rousso  <drousso@apple.com>
780
781         Web Inspector: Protocol Logging: log messages with backtrace if inspector^2 is open
782         https://bugs.webkit.org/show_bug.cgi?id=195687
783
784         Reviewed by Joseph Pecoraro.
785
786         * UserInterface/Protocol/LoggingProtocolTracer.js:
787         (WI.LoggingProtocolTracer.prototype._processEntry):
788
789 2019-03-13  Devin Rousso  <drousso@apple.com>
790
791         Web Inspector: REGRESSION(r242737): unnecessary semicolon added when populating WI.TreeOutline stylesheet
792         https://bugs.webkit.org/show_bug.cgi?id=195689
793
794         Reviewed by Joseph Pecoraro.
795
796         * UserInterface/Views/TreeOutline.js:
797         (WI.TreeOutline._generateStyleRulesIfNeeded):
798
799 2019-03-13  Joseph Pecoraro  <pecoraro@apple.com>
800
801         Web Inspector: Network - HAR Export duplicates blocked/send time if there was no dns/connect block
802         https://bugs.webkit.org/show_bug.cgi?id=195655
803         <rdar://problem/48831152>
804
805         Reviewed by Devin Rousso.
806
807         * UserInterface/Controllers/HARBuilder.js:
808         (WI.HARBuilder.timings):
809
810 2019-03-12  Devin Rousso  <drousso@apple.com>
811
812         Web Inspector: Sources: allow image collections to be filtered by type
813         https://bugs.webkit.org/show_bug.cgi?id=195630
814
815         Reviewed by Matt Baker.
816
817         * UserInterface/Views/ResourceCollectionContentView.js:
818         (WI.ResourceCollectionContentView):
819         (WI.ResourceCollectionContentView.prototype.get navigationItems): Added.
820         (WI.ResourceCollectionContentView.prototype.contentViewAdded):
821         (WI.ResourceCollectionContentView.prototype.contentViewRemoved): Added.
822         (WI.ResourceCollectionContentView.prototype._updateImageTypeScopeBar): Added.
823         (WI.ResourceCollectionContentView.prototype._handleImageTypeSelectionChanged): Added.
824         * UserInterface/Views/ResourceCollectionContentView.css: Asdded.
825         (.resource-collection-image-type-scope-bar.default-item-selected):
826
827         * UserInterface/Views/CollectionContentView.css:
828         (.content-view.collection > .content-view[hidden]): Added.
829
830         * UserInterface/Views/ScopeBarItem.js:
831         (WI.ScopeBarItem.prototype.set hidden):
832         * UserInterface/Views/MultipleScopeBarItem.js:
833         (WI.MultipleScopeBarItem.prototype.set scopeBarItems):
834         (WI.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
835         (WI.MultipleScopeBarItem.prototype.get _visibleScopeBarItems): Added.
836         (WI.MultipleScopeBarItem.prototype._selectElementSelectionChanged):
837         (WI.MultipleScopeBarItem.prototype._handleItemHiddenChanged): Added.
838         Dispatch an event when an item is hidden so that any owner `WI.MultipleScopeBarItem` can
839         rerender it's <select> without that item.
840
841         * Localizations/en.lproj/localizedStrings.js:
842         * UserInterface/Main.html:
843
844 2019-03-12  Nikita Vasilyev  <nvasilyev@apple.com>
845
846         Web Inspector: Keyboard shortcut for settings tab too greedy on non-US keyboards
847         https://bugs.webkit.org/show_bug.cgi?id=192947
848         <rdar://problem/46886779>
849
850         Reviewed by Devin Rousso.
851
852         * UserInterface/Base/Main.js:
853         (WI._showSettingsTab):
854
855 2019-03-12  Devin Rousso  <drousso@apple.com>
856
857         Web Inspector: Elements: provide node context menu items for event listeners sorted by node
858         https://bugs.webkit.org/show_bug.cgi?id=195633
859
860         Reviewed by Matt Baker.
861
862         * UserInterface/Base/DOMUtilities.js:
863         (WI.linkifyNodeReferenceElement):
864         (WI.bindInteractionsForNodeToElement): Added.
865         Split logic for adding event listeners into a separate function so it can be used on
866         existing DOM without modifying it.
867
868         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
869         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
870
871 2019-03-12  Devin Rousso  <drousso@apple.com>
872
873         Web Inspector: DOM Debugger: remove left padding when the last DOM breakpoint is removed
874         https://bugs.webkit.org/show_bug.cgi?id=195522
875
876         Reviewed by Matt Baker.
877
878         * UserInterface/Views/DOMTreeContentView.js:
879         (WI.DOMTreeContentView.prototype._updateBreakpointStatus):
880         * UserInterface/Views/DOMTreeElement.js:
881         (WI.DOMTreeElement.prototype.get hasBreakpoint): Added.
882
883 2019-03-12  Devin Rousso  <drousso@apple.com>
884
885         Web Inspector: Canvas: export recording as HTML
886         https://bugs.webkit.org/show_bug.cgi?id=195311
887         <rdar://problem/48588673>
888
889         Reviewed by Joseph Pecoraro.
890
891         * UserInterface/Models/Recording.js:
892         (WI.Recording.prototype.async swizzle):
893         (WI.Recording.prototype.toHTML): Added.
894         (WI.Recording.prototype.toHTML.escapeHTML): Added.
895         (WI.Recording.prototype.toHTML.processObject): Added.
896         (WI.Recording.prototype.toHTML.processValue): Added.
897
898         * UserInterface/Views/RecordingContentView.js:
899         (WI.RecordingContentView):
900         (WI.RecordingContentView.prototype._exportRecording):
901         (WI.RecordingContentView.prototype._exportReduction): Added.
902         (WI.RecordingContentView.prototype._updateExportButton): Added.
903         (WI.RecordingContentView.prototype._handleExportNavigationItemClicked): Added.
904         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
905
906         * UserInterface/Views/CanvasOverviewContentView.js:
907         (WI.CanvasOverviewContentView):
908         * UserInterface/Views/HeapAllocationsTimelineView.js:
909         (WI.HeapAllocationsTimelineView):
910         * UserInterface/Views/HeapSnapshotContentView.js:
911         (WI.HeapSnapshotContentView):
912         Drive-by: s/`toolTip`/`tooltip`.
913
914         * Localizations/en.lproj/localizedStrings.js:
915
916 2019-03-12  Devin Rousso  <drousso@apple.com>
917
918         Web Inspector: Audit: there should be a centralized place for reusable code
919         https://bugs.webkit.org/show_bug.cgi?id=195265
920         <rdar://problem/47040673>
921
922         Reviewed by Joseph Pecoraro.
923
924         * UserInterface/Controllers/AuditManager.js:
925         (WI.AuditManager.prototype.async start):
926         (WI.AuditManager.prototype._topLevelTestForTest): Added.
927         (WI.AuditManager.prototype._topLevelTestForTest.walk): Added.
928
929         * UserInterface/Models/AuditTestBase.js:
930         (WI.AuditTestBase):
931         (WI.AuditTestBase.prototype.async setup): Added.
932         (WI.AuditTestBase.toJSON):
933
934         * UserInterface/Models/AuditTestCase.js:
935         (WI.AuditTestCase.async.fromPayload):
936         (WI.AuditTestCase.prototype.async run.async parseResponse):
937         Allow additional data to be passed back to the result's `data` for testing.
938
939         * UserInterface/Models/AuditTestGroup.js:
940         (WI.AuditTestGroup.async.fromPayload):
941
942 2019-03-12  Joseph Pecoraro  <pecoraro@apple.com>
943
944         Web Inspector: Timelines - Improve handling of past recordings (readonly)
945         https://bugs.webkit.org/show_bug.cgi?id=195594
946
947         Reviewed by Devin Rousso.
948
949         * UserInterface/Views/TimelineRecordingContentView.js:
950         (WI.TimelineRecordingContentView.prototype._clearTimeline):
951         Don't allow clearing of a readonly recording.
952
953         * UserInterface/Views/TimelineTabContentView.js:
954         (WI.TimelineTabContentView.prototype._toggleRecordingOnSpacebar):
955         Don't do anything when viewing a readonly recording.
956
957         (WI.TimelineTabContentView.prototype._recordButtonClicked):
958         Start a new recording if viewing a readonly recording.
959
960 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
961
962         Web Inspector: REGRESSION: Network Cookies Table does not load
963         https://bugs.webkit.org/show_bug.cgi?id=195599
964
965         Reviewed by Devin Rousso.
966
967         * UserInterface/Views/ResourceCookiesContentView.js:
968         (WI.ResourceCookiesContentView.prototype.tableIndexForRepresentedObject):
969         (WI.ResourceCookiesContentView.prototype.tableRepresentedObjectForIndex):
970         Include needed delegate methods.
971
972 2019-03-11  Devin Rousso  <drousso@apple.com>
973
974         Web Inspector: use -webkit-{margin,padding}-{start,end} instead of [dir={ltr/rtl}] rules
975         https://bugs.webkit.org/show_bug.cgi?id=195569
976         <rdar://problem/48778727>
977
978         Reviewed by Matt Baker.
979
980         * UserInterface/Debug/UncaughtExceptionReporter.css:
981         * UserInterface/Views/BoxModelDetailsSectionRow.css:
982         * UserInterface/Views/BreakpointActionView.css:
983         * UserInterface/Views/BreakpointPopoverController.css:
984         * UserInterface/Views/CPUTimelineView.css:
985         * UserInterface/Views/CallFrameTreeElement.css:
986         * UserInterface/Views/CallFrameView.css:
987         * UserInterface/Views/DOMTreeContentView.css:
988         * UserInterface/Views/DOMTreeOutline.css:
989         * UserInterface/Views/DashboardContainerView.css:
990         * UserInterface/Views/DataGrid.css:
991         * UserInterface/Views/DebuggerDashboardView.css:
992         * UserInterface/Views/DebuggerSidebarPanel.css:
993         * UserInterface/Views/DefaultDashboardView.css:
994         * UserInterface/Views/DetailsSection.css:
995         * UserInterface/Views/FilterBar.css:
996         * UserInterface/Views/FindBanner.css:
997         * UserInterface/Views/FontResourceContentView.css:
998         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
999         * UserInterface/Views/HierarchicalPathComponent.css:
1000         * UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
1001         * UserInterface/Views/Main.css:
1002         * UserInterface/Views/NetworkTableContentView.css:
1003         * UserInterface/Views/OpenResourceDialog.css:
1004         * UserInterface/Views/RecordingActionTreeElement.css:
1005         * UserInterface/Views/ScopeRadioButtonNavigationItem.css:
1006         * UserInterface/Views/SettingsTabContentView.css:
1007         * UserInterface/Views/ThreadTreeElement.css:
1008         * UserInterface/Views/Toolbar.css:
1009         * UserInterface/Views/TreeOutline.css:
1010         * UserInterface/Views/TypeTreeElement.css:
1011         * UserInterface/Views/TypeTreeView.css:
1012         * UserInterface/Views/URLBreakpointPopover.css:
1013         * UserInterface/Views/WebSocketContentView.css:
1014
1015         * UserInterface/Views/RecordingActionTreeElement.js:
1016         (WI.RecordingActionTreeElement.static _getClassNames):
1017         Replace class `.action` with `.recording-action` for better uniqueness/clarity.
1018
1019 2019-03-11  Devin Rousso  <drousso@apple.com>
1020
1021         Web Inspector: DOMDebugger: protocol error on first open
1022         https://bugs.webkit.org/show_bug.cgi?id=195248
1023         <rdar://problem/48538465>
1024
1025         Unreviewed followup of r242743 to fix test inspector/dom-debugger/dom-breakpoints.html.
1026
1027         * UserInterface/Controllers/DOMDebuggerManager.js:
1028         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
1029         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
1030         Still attempt to resolve the DOM breakpoint if it already has a `domNodeIdentifier` so that
1031         it will get added to the node's frame's DOM breakpoint map. Without this, some breakpoints
1032         might get "missed" when calling `WI.domDebuggerManager.removeDOMBreakpointsForNode`.
1033
1034 2019-03-11  Justin Fan  <justin_fan@apple.com>
1035
1036         [Web GPU] Update GPUSwapChainDescriptor, GPUSwapChain and implement GPUCanvasContext
1037         https://bugs.webkit.org/show_bug.cgi?id=194406
1038         <rdar://problem/47892466>
1039
1040         Reviewed by Myles C. Maxfield.
1041
1042         Name updates for Web GPU renaming in inspector.
1043
1044         * UserInterface/Models/Canvas.js:
1045         (WI.Canvas.displayNameForContextType):
1046
1047 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
1048
1049         Web Inspector: Editing Timelines shows two CPU Timelines
1050         https://bugs.webkit.org/show_bug.cgi?id=195578
1051
1052         Reviewed by Devin Rousso.
1053
1054         * UserInterface/Controllers/TimelineManager.js:
1055         (WI.TimelineManager.availableTimelineTypes):
1056         The CPU Instrument is already in the default list.
1057
1058 2019-03-11  Devin Rousso  <drousso@apple.com>
1059
1060         Web Inspector: DOMDebugger: protocol error on first open
1061         https://bugs.webkit.org/show_bug.cgi?id=195248
1062         <rdar://problem/48538465>
1063
1064         Reviewed by Joseph Pecoraro.
1065
1066         Don't try to call `DOMDebugger` commands until a target has been initialized.
1067         Still attempt to resolve DOM breakpoints whenever the main resource/frame changes.
1068
1069         * UserInterface/Controllers/DOMDebuggerManager.js:
1070         (WI.DOMDebuggerManager):
1071         (WI.DOMDebuggerManager.prototype.initializeTarget): Added.
1072         (WI.DOMDebuggerManager.supportsEventBreakpoints):
1073         (WI.DOMDebuggerManager.prototype.get supported):
1074         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
1075         (WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
1076         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
1077         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
1078         (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
1079         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
1080         (WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL): Added.
1081         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
1082         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
1083         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
1084         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
1085         (WI.DOMDebuggerManager.prototype._saveDOMBreakpoints):
1086         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
1087         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
1088         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
1089         (WI.DOMDebuggerManager.prototype._mainFrameDidChange):
1090         (WI.DOMDebuggerManager.prototype._mainResourceDidChange):
1091         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint.breakpointRemoved): Deleted.
1092         (WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints): Deleted.
1093         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint.breakpointUpdated): Deleted.
1094         (WI.DOMDebuggerManager.prototype._resolveEventBreakpoint): Deleted.
1095         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Deleted.
1096
1097         * UserInterface/Base/Multimap.js: Added.
1098         (Multimap):
1099         (Multimap.prototype.get):
1100         (Multimap.prototype.add):
1101         (Multimap.prototype.delete):
1102         (Multimap.prototype.clear):
1103         (Multimap.prototype.keys):
1104         (Multimap.prototype.*values):
1105         (Multimap.prototype.*[Symbol.iterator]):
1106         (Multimap.prototype.toJSON):
1107         * .eslintrc:
1108         * UserInterface/Main.html:
1109         * UserInterface/Test.html:
1110         Helper data structure for managing Maps of Sets (e.g. all DOM breakpoints for a URL).
1111
1112 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
1113
1114         Web Inspector: CPU Usage Timeline - Enable by default
1115         https://bugs.webkit.org/show_bug.cgi?id=195471
1116
1117         Reviewed by Devin Rousso.
1118
1119         Remove experimental setting and include the CPU timeline in the
1120         default set of timelines.
1121
1122         * UserInterface/Base/Setting.js:
1123         * UserInterface/Controllers/TimelineManager.js:
1124         (WI.TimelineManager.defaultTimelineTypes):
1125         * UserInterface/Main.html:
1126         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1127         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.selected):
1128         (.timeline-overview-graph.cpu > .column-chart > svg > rect): Deleted.
1129         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart): Deleted.
1130         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1131         (WI.CPUTimelineOverviewGraph):
1132         (WI.CPUTimelineOverviewGraph.prototype.layout):
1133         * UserInterface/Views/ContentView.js:
1134         (WI.ContentView.createFromRepresentedObject):
1135         * UserInterface/Views/LegacyCPUTimelineView.css: Removed.
1136         * UserInterface/Views/LegacyCPUTimelineView.js: Removed.
1137         * UserInterface/Views/SettingsTabContentView.js:
1138         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1139         * UserInterface/Views/Variables.css:
1140         (:root):
1141
1142 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
1143
1144         Web Inspector: CPU Usage Timeline - Better Thread chart layout values
1145         https://bugs.webkit.org/show_bug.cgi?id=195547
1146
1147         Reviewed by Devin Rousso.
1148
1149         * UserInterface/Views/CPUTimelineView.js:
1150         (WI.CPUTimelineView.prototype.layout.bestThreadLayoutMax):
1151         (WI.CPUTimelineView.prototype.layout.layoutView):
1152         (WI.CPUTimelineView.prototype._showGraphOverlay):
1153         Include a separate layoutMax for the combined view and a thread layoutMax
1154         for the thread groups.
1155
1156 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
1157
1158         Web Inspector: CPU Usage Timeline - Add legend and graph hover effects
1159         https://bugs.webkit.org/show_bug.cgi?id=195390
1160
1161         Reviewed by Devin Rousso.
1162
1163         * Localizations/en.lproj/localizedStrings.js:
1164         New strings for the legends.
1165
1166         * UserInterface/Main.html:
1167         Combined files.
1168
1169         * UserInterface/Views/Variables.css:
1170         (:root):
1171         (@media (prefers-color-scheme: dark)):
1172         Tweaked colors, including individual stroke and fill colors for each CPU section.
1173
1174         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1175         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.total-usage):
1176         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
1177         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
1178         Updated colors.
1179
1180         * UserInterface/Views/CPUUsageCombinedView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.css.
1181         (.cpu-usage-combined-view > .details > .legend-container):
1182         (.cpu-usage-combined-view > .details > .legend-container > .row):
1183         (.cpu-usage-combined-view > .details > .legend-container > .row + .row):
1184         (.cpu-usage-combined-view > .details > .legend-container > .row > .swatch):
1185         * UserInterface/Views/CPUUsageCombinedView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.js.
1186         (WI.CPUUsageCombinedView.appendLegendRow):
1187         (WI.CPUUsageCombinedView):
1188         (WI.CPUUsageCombinedView.prototype.get graphElement):
1189         (WI.CPUUsageCombinedView.prototype.get chart):
1190         (WI.CPUUsageCombinedView.prototype.get rangeChart):
1191         (WI.CPUUsageCombinedView.prototype.clear):
1192         (WI.CPUUsageCombinedView.prototype.updateChart):
1193         (WI.CPUUsageCombinedView.prototype.updateMainThreadIndicator):
1194         (WI.CPUUsageCombinedView.prototype.clearLegend):
1195         (WI.CPUUsageCombinedView.prototype.updateLegend):
1196         (WI.CPUUsageCombinedView.prototype._updateDetails):
1197         * UserInterface/Views/CPUUsageIndicatorView.css: Removed.
1198         * UserInterface/Views/CPUUsageIndicatorView.js: Removed.
1199         Combined the Indicator and StackedAreaChart into a single view
1200         that share a left details section.
1201
1202         * UserInterface/Views/CPUUsageView.js:
1203         (WI.CPUUsageView):
1204         (WI.CPUUsageView.prototype.get graphElement):
1205         (WI.CPUUsageView.prototype.clear):
1206         (WI.CPUUsageView.prototype.updateChart):
1207         (WI.CPUUsageView.prototype.clearLegend):
1208         (WI.CPUUsageView.prototype.updateLegend):
1209         (WI.CPUUsageView.prototype._updateDetails):
1210         Include a legend in the left details section.
1211
1212         * UserInterface/Views/AreaChart.js:
1213         (WI.AreaChart):
1214         (WI.AreaChart.prototype.addPointMarker):
1215         (WI.AreaChart.prototype.clearPointMarkers):
1216         (WI.AreaChart.prototype.clear):
1217         (WI.AreaChart.prototype.layout):
1218         * UserInterface/Views/StackedAreaChart.js:
1219         (WI.StackedAreaChart):
1220         (WI.StackedAreaChart.prototype.addPointMarker):
1221         (WI.StackedAreaChart.prototype.clearPointMarkers):
1222         (WI.StackedAreaChart.prototype.clear):
1223         (WI.StackedAreaChart.prototype.layout):
1224         Add point markers for the area charts.
1225
1226         * UserInterface/Views/CPUTimelineView.css:
1227         * UserInterface/Views/CPUTimelineView.js:
1228         (WI.CPUTimelineView):
1229         (WI.CPUTimelineView.prototype.get cpuUsageViewHeight):
1230         (WI.CPUTimelineView.prototype.clear):
1231         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
1232         (WI.CPUTimelineView.prototype.initialLayout):
1233         (WI.CPUTimelineView.prototype.layout):
1234         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
1235         (WI.CPUTimelineView.prototype._handleMouseClick):
1236         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
1237         (WI.CPUTimelineView.prototype._showGraphOverlayNearTo):
1238         (WI.CPUTimelineView.prototype._updateGraphOverlay):
1239         (WI.CPUTimelineView.prototype._showGraphOverlay.xScale):
1240         (WI.CPUTimelineView.prototype._showGraphOverlay.yScale):
1241         (WI.CPUTimelineView.prototype._showGraphOverlay.addOverlayPoint):
1242         (WI.CPUTimelineView.prototype._showGraphOverlay):
1243         (WI.CPUTimelineView.prototype._clearOverlayMarkers.clearGraphOverlayElement):
1244         (WI.CPUTimelineView.prototype._clearOverlayMarkers):
1245         (WI.CPUTimelineView.prototype._hideGraphOverlay):
1246         Include graph overlay markers.
1247
1248 2019-03-11  Devin Rousso  <drousso@apple.com>
1249
1250         Web Inspector: eliminate manual syncing of numeric constants used by JavaScript and CSS
1251         https://bugs.webkit.org/show_bug.cgi?id=194883
1252         <rdar://problem/48257785>
1253
1254         Reviewed by Joseph Pecoraro.
1255
1256         * UserInterface/Views/CanvasOverviewContentView.js:
1257         (WI.CanvasOverviewContentView):
1258         (WI.CanvasOverviewContentView.static get recordingAutoCaptureInputMargin): Added.
1259         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
1260         * UserInterface/Views/CanvasOverviewContentView.css:
1261         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
1262
1263         * UserInterface/Views/MemoryTimelineView.js:
1264         (WI.MemoryTimelineView.static get memoryCategoryViewHeight): Added.
1265         (WI.MemoryTimelineView.prototype.initialLayout): Added.
1266         (WI.MemoryTimelineView.prototype.layout):
1267         * UserInterface/Views/MemoryCategoryView.css:
1268         (.memory-category-view):
1269
1270         * UserInterface/Views/NetworkTableContentView.js:
1271         (WI.NetworkTableContentView.static get nodeWaterfallDOMEventSize): Added.
1272         (WI.NetworkTableContentView.prototype.initialLayout):
1273         * UserInterface/Views/NetworkTableContentView.css:
1274         (.content-view.network .network-table): Deleted.
1275
1276         * UserInterface/Views/TreeOutline.js:
1277         (WI.TreeOutline._generateStyleRulesIfNeeded):
1278         * UserInterface/Views/TreeOutline.css:
1279         (.tree-outline, .tree-outline .children):
1280         (.tree-outline .item):
1281
1282         * UserInterface/Controllers/CanvasManager.js:
1283         (WI.CanvasManager.supportsRecordingAutoCapture):
1284         Drive-by: fix usage of InspectorBackend.domains.{CanvasAgent => Canvas}
1285
1286 2019-03-11  Nikita Vasilyev  <nvasilyev@apple.com>
1287
1288         REGRESSION(r242622): Web Inspector: Fix asserts "Overridden property is missing overridingProperty"
1289         https://bugs.webkit.org/show_bug.cgi?id=195515
1290         <rdar://problem/48737315>
1291
1292         Reviewed by Matt Baker.
1293
1294         * UserInterface/Views/SpreadsheetStyleProperty.js:
1295         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1296
1297 2019-03-07  Nikita Vasilyev  <nvasilyev@apple.com>
1298
1299         Web Inspector: Styles: overridden CSS property should have go-to button to jump to effective property
1300         https://bugs.webkit.org/show_bug.cgi?id=185930
1301         <rdar://problem/40506252>
1302
1303         Reviewed by Matt Baker.
1304
1305         Introduce a new experimental jump to effective property button. The button is a small arrow button
1306         next to an overridden CSS property. Clicking the button scrolls to the effective CSS property and
1307         selects it.
1308
1309         * Localizations/en.lproj/localizedStrings.js:
1310         * UserInterface/Base/Setting.js:
1311         * UserInterface/Models/CSSProperty.js:
1312         (WI.CSSProperty):
1313         (WI.CSSProperty.prototype.update):
1314         (WI.CSSProperty.prototype.get overridingProperty):
1315         (WI.CSSProperty.prototype.set overridingProperty):
1316         * UserInterface/Models/DOMNodeStyles.js:
1317         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
1318         * UserInterface/Views/SettingsTabContentView.js:
1319         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1320         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1321         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property):
1322         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property,):
1323         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property::after,):
1324         (@media (prefers-color-scheme: dark)):
1325         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1326         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelectByProperty):
1327         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1328         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorSelectProperty):
1329         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1330         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionSelectProperty):
1331         * UserInterface/Views/SpreadsheetStyleProperty.js:
1332         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1333
1334 2019-03-07  Devin Rousso  <drousso@apple.com>
1335
1336         Web Inspector: Protocol: add type checking when commands are called via invoke
1337         https://bugs.webkit.org/show_bug.cgi?id=195310
1338         <rdar://problem/48588679>
1339
1340         Reviewed by Joseph Pecoraro.
1341
1342         * UserInterface/Protocol/InspectorBackend.js:
1343         (InspectorBackend.Command.prototype.invoke.deliverFailure): Added.
1344         (InspectorBackend.Command.prototype.invoke):
1345         (InspectorBackend.Command.prototype._invokeWithArguments):
1346
1347 2019-03-07  Devin Rousso  <drousso@apple.com>
1348
1349         Web Inspector: REGRESSION(r242118): WI.ScopeBar missing background
1350         https://bugs.webkit.org/show_bug.cgi?id=195299
1351
1352         Reviewed by Joseph Pecoraro.
1353
1354         Rework the way `color`, `background-color`, and `border-color` are set for `WI.ScopeBar` to
1355         use CSS variables instead. Divides the variables into three categories:
1356          - default: these are the values that the `WI.ScopeBar` would use normally
1357          - override: these are values that take precidence over the default (e.g. set by other elements)
1358             - falls back to default when no value is set
1359          - actual: this is the resulting value that will be used when displaying
1360             - this way, other elements can "mirror" the styling of the `WI.ScopeBar`
1361
1362         * UserInterface/Views/ScopeBar.css:
1363         (.scope-bar):
1364         (.scope-bar > li):
1365         (.scope-bar > li::before):
1366         (.scope-bar > li:matches(.selected, :hover)):
1367         (.scope-bar > li:not(.selected):hover::after):
1368         (.scope-bar > li.selected:active::after):
1369         (.scope-bar > li.multiple > select):
1370         (body[dir=ltr] .scope-bar > li.multiple > select):
1371         (body[dir=rtl] .scope-bar > li.multiple > select):
1372         (.scope-bar > li.multiple:not(.selected) > select): Added.
1373         (.scope-bar > li.multiple > .arrows):
1374         (.scope-bar > li::before): Deleted.
1375         (.scope-bar.default-item-selected > li.multiple.selected::before): Deleted.
1376         (.scope-bar > li:matches(.selected, :hover)::before): Deleted.
1377         (.scope-bar > li.selected:active::before): Deleted.
1378         (.scope-bar > li.multiple.selected > select): Deleted.
1379         (body[dir=ltr] .scope-bar > li.multiple > .arrows): Deleted.
1380         (body[dir=rtl] .scope-bar > li.multiple > .arrows): Deleted.
1381         (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows): Deleted.
1382         (.scope-bar > li:matches(.selected, :active)): Deleted.
1383         (@media (prefers-color-scheme: dark)): Deleted.
1384         Switch to using `::after` since `::before` is more commonly used.
1385
1386         * UserInterface/Views/MultipleScopeBarItem.js:
1387         (WI.MultipleScopeBarItem.prototype._handleMouseDown):
1388         Drive-by: fix the <select> alignment by re-firing the "mousedown" event on it.
1389
1390         * UserInterface/Views/AuditTestGroupContentView.js:
1391         (WI.AuditTestGroupContentView.prototype.layout):
1392         * UserInterface/Views/AuditTestGroupContentView.css:
1393         (.content-view.audit-test-group > header > nav > .scope-bar > li):
1394         (.content-view.audit-test-group > header > nav > .scope-bar > li:not(:hover, .selected)):
1395         (.content-view.audit-test-group > header > nav > .scope-bar > li > img): Added.
1396         (.content-view.audit-test-group > header > nav > .scope-bar > li.pass > img): Added.
1397         (.content-view.audit-test-group > header > nav > .scope-bar > li.warn > img): Added.
1398         (.content-view.audit-test-group > header > nav > .scope-bar > li.fail > img): Added.
1399         (.content-view.audit-test-group > header > nav > .scope-bar > li.error > img): Added.
1400         (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported > img): Added.
1401         (.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-case.filtered ~ .audit-test-case:not(.filtered), .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Added.
1402         (.content-view.audit-test-group > section > .audit-test-case:not(.filtered) ~ .audit-test-case:not(.filtered)): Added.
1403         (.content-view.audit-test-group > header > nav > .scope-bar > li::before): Deleted.
1404         (.content-view.audit-test-group > header > nav > .scope-bar > li.pass::before): Deleted.
1405         (.content-view.audit-test-group > header > nav > .scope-bar > li.warn::before): Deleted.
1406         (.content-view.audit-test-group > header > nav > .scope-bar > li.fail::before): Deleted.
1407         (.content-view.audit-test-group > header > nav > .scope-bar > li.error::before): Deleted.
1408         (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported::before): Deleted.
1409         (.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Deleted.
1410         Replace the `::before` image with an actual `<img>` now that the `WI.ScopeBar` itself uses
1411         a pseudo-element for the background styling.
1412
1413         * UserInterface/Views/LogContentView.js:
1414         (WI.LogContentView):
1415         * UserInterface/Views/LogContentView.css:
1416         (.log-scope-bar > li:not(.unread) > .indicator): Added.
1417         (.log-scope-bar > li.unread > .indicator): Added.
1418         (.log-scope-bar > li.unread:hover > .indicator): Added.
1419         (.log-scope-bar > li.unread.errors > .indicator): Added.
1420         (.log-scope-bar > li.unread.warnings > .indicator): Added.
1421         (.log-scope-bar > li.unread.logs > .indicator): Added.
1422         (.log-scope-bar > li.unread::before): Deleted.
1423         (body[dir=ltr] .log-scope-bar > li.unread::before): Deleted.
1424         (body[dir=rtl] .log-scope-bar > li.unread::before): Deleted.
1425         (.log-scope-bar > li.unread:hover::before): Deleted.
1426         (.log-scope-bar > li.unread.errors::before): Deleted.
1427         (.log-scope-bar > li.unread.warnings::before): Deleted.
1428         (.log-scope-bar > li.unread.logs::before): Deleted.
1429         Replace the `::before` unread indicator with an actual `<div>` now that the `WI.ScopeBar`
1430         itself uses a pseudo-element for the background styling.
1431
1432         * UserInterface/Views/TimelineRecordingContentView.css:
1433         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected):
1434         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple): Deleted.
1435         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows): Deleted.
1436
1437         * UserInterface/Views/CanvasSidebarPanel.js:
1438         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
1439         Drive-by: fix typo.
1440
1441 2019-03-07  Devin Rousso  <drousso@apple.com>
1442
1443         Web Inspector: CSS: there should be a way to inline-replace a variable with it's value
1444         https://bugs.webkit.org/show_bug.cgi?id=195335
1445
1446         Reviewed by Joseph Pecoraro.
1447
1448         * UserInterface/Views/InlineSwatch.js:
1449         (WI.InlineSwatch):
1450         (WI.InlineSwatch.prototype.didDismissPopover):
1451         (WI.InlineSwatch.prototype._swatchElementClicked):
1452         (WI.InlineSwatch.prototype._swatchElementClicked.optionsForType): Added.
1453         Shift-clicking a variable swatch replaces the text with the variable's value.
1454         Drive-by: try to create a readonly swatch for the variable's value (e.g. a color indicator).
1455
1456         * UserInterface/Views/SpreadsheetStyleProperty.js:
1457         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
1458         If the value of a variable swatch changes, re-render the value.
1459
1460         * UserInterface/Views/CodeMirrorTextMarkers.js:
1461         (createCodeMirrorTextMarkers):
1462         (createCodeMirrorColorTextMarkers):
1463         (createCodeMirrorGradientTextMarkers):
1464         (createCodeMirrorBezierTextMarkers):
1465         (createCodeMirrorSpringTextMarkers):
1466         Refactor function parameters for more flexibility.
1467
1468         * Localizations/en.lproj/localizedStrings.js:
1469
1470 2019-03-06  Devin Rousso  <drousso@apple.com>
1471
1472         Web Inspector: Elements: highlight the node when hovering event listeners sorted by node
1473         https://bugs.webkit.org/show_bug.cgi?id=195368
1474
1475         Reviewed by Joseph Pecoraro.
1476
1477         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1478         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
1479
1480 2019-03-06  Matt Baker  <mattbaker@apple.com>
1481
1482         Web Inspector: system accent color follow-ups
1483         https://bugs.webkit.org/show_bug.cgi?id=195190
1484
1485         Reviewed by Devin Rousso.
1486
1487         * UserInterface/Views/ButtonToolbarItem.css:
1488         (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
1489         (@media (prefers-color-scheme: dark)):
1490         (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)): Deleted.
1491         Drop pressed toolbar button style. It's extremely subtle and not worth the hassle.
1492
1493         * UserInterface/Views/LogContentView.css:
1494         (.console-messages:focus .console-item.selected::after):
1495         (@media (prefers-color-scheme: dark)):
1496
1497         * UserInterface/Views/ScopeBar.css:
1498         (.scope-bar > li.selected:active::before):
1499
1500         * UserInterface/Views/TimelineRecordBar.css:
1501         (.timeline-record-bar.selected > .segment):
1502
1503 2019-03-06  Matt Baker  <mattbaker@apple.com>
1504
1505         REGRESSION: Elements tab: Uncaught Exception: No node with given id found
1506         https://bugs.webkit.org/show_bug.cgi?id=194299
1507         <rdar://problem/47828647>
1508
1509         Reviewed by Devin Rousso.
1510
1511         When removing the selection, TreeOutline subclasses should have more
1512         control over which item becomes selected after the selection is removed.
1513         DOMTreeOutline should track the items that are being removed, and prevent
1514         them or their descendants from becoming selected.
1515
1516         * UserInterface/Views/DOMTreeOutline.js:
1517         (WI.DOMTreeOutline):
1518         (WI.DOMTreeOutline.prototype.ondelete):
1519         (WI.DOMTreeOutline.prototype.canSelectTreeElement):
1520
1521         * UserInterface/Views/TreeOutline.js:
1522         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
1523         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
1524         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
1525         (WI.TreeOutline.prototype.canSelectTreeElement):
1526
1527 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1528
1529         Web Inspector: CPU Usage Timeline - Allow clicking a bar in the overview to select a tight time range around it
1530         https://bugs.webkit.org/show_bug.cgi?id=195321
1531
1532         Reviewed by Devin Rousso.
1533
1534         * UserInterface/Models/Timeline.js:
1535         (WI.Timeline.prototype.closestRecordTo):
1536         Helper to get the closest record to a timestamp.
1537
1538         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1539         (.timeline-overview-graph.cpu > .stacked-column-chart):
1540         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.selected):
1541         Style a selected record with the active color.
1542
1543         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1544         (WI.CPUTimelineOverviewGraph):
1545         (WI.CPUTimelineOverviewGraph.prototype.get samplingRatePerSecond):
1546         (WI.CPUTimelineOverviewGraph.prototype.reset):
1547         (WI.CPUTimelineOverviewGraph.prototype.layout):
1548         (WI.CPUTimelineOverviewGraph.prototype.updateSelectedRecord):
1549         (WI.CPUTimelineOverviewGraph.prototype._graphPositionForMouseEvent):
1550         (WI.CPUTimelineOverviewGraph.prototype._handleGraphMouseClick):
1551         A click in the overview which hits a rect triggers a selection of
1552         the associated timeline record.
1553
1554         * UserInterface/Views/StackedColumnChart.js:
1555         (WI.StackedColumnChart.prototype.addColumnSet):
1556         (WI.StackedColumnChart.prototype.layout):
1557         Allow setting an additional class name with a column set.
1558         It will set the class name on each rect in that column.
1559
1560         * UserInterface/Views/TimelineOverview.js:
1561         (WI.TimelineOverview.prototype._recordSelected):
1562         When selecting a CPU record, make a selection range of 2 neighboring
1563         columns in each direction.
1564
1565         * UserInterface/Views/TimelineRuler.js:
1566         (WI.TimelineRuler.prototype._handleClick):
1567         When a sub-element has handled the click stop further event propagation.
1568
1569         * UserInterface/Views/TimelineOverviewGraph.js:
1570         (WI.TimelineOverviewGraph.prototype.get selected):
1571         Drive-by style fix.
1572
1573 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1574
1575         Web Inspector: TimelineOverview clicks do not always behave as expected
1576         https://bugs.webkit.org/show_bug.cgi?id=195319
1577
1578         Reviewed by Devin Rousso.
1579
1580         * UserInterface/Views/TimelineRuler.js:
1581         (WI.TimelineRuler.prototype._shouldIgnoreMicroMovement):
1582         (WI.TimelineRuler.prototype._handleMouseDown):
1583         (WI.TimelineRuler.prototype._handleMouseMove):
1584         Ignore moves that haven't gone more than 4px. Once the threshold is
1585         passed allow all moves. This improves the click behavior since
1586         previously click would never re-dispatch if there was any movement.
1587
1588 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1589
1590         Web Inspector: CPU Usage Timeline - Statistics and Sources sections
1591         https://bugs.webkit.org/show_bug.cgi?id=195202
1592
1593         Reviewed by Devin Rousso.
1594
1595         * Localizations/en.lproj/localizedStrings.js:
1596         New strings.
1597
1598         * UserInterface/Base/Utilities.js:
1599         (Map.prototype.getOrInitialize):
1600         Helper to get and if not found initialize with a value.
1601
1602         * UserInterface/Views/CPUTimelineView.css:
1603         (.timeline-view.cpu > .content > .overview > .chart > .container.stats):
1604         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table):
1605         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > th):
1606         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.number):
1607         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.label):
1608         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .show-more):
1609         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter):
1610         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter:hover):
1611         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active):
1612         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active + .active):
1613         (@media (prefers-color-scheme: dark)):
1614         Colors for the statistics sections.
1615
1616         * UserInterface/Views/CPUTimelineView.js:
1617         (WI.CPUTimelineView):
1618         (WI.CPUTimelineView.prototype.reset):
1619         (WI.CPUTimelineView.prototype.clear):
1620         (WI.CPUTimelineView.prototype._clearStatistics):
1621         (WI.CPUTimelineView.prototype._clearSources):
1622         Updates for additional sections.
1623         Include a cache of the statisiticsData so we can relayout parts of the UI and
1624         avoid an entire UI update.
1625
1626         (WI.CPUTimelineView.prototype.initialLayout):
1627         (WI.CPUTimelineView.prototype._layoutBreakdownChart):
1628         (WI.CPUTimelineView.prototype._layoutStatisticsAndSources):
1629         (WI.CPUTimelineView.prototype._layoutStatisticsSection.createEllipsisElement):
1630         (WI.CPUTimelineView.prototype._layoutStatisticsSection):
1631         (WI.CPUTimelineView.prototype._layoutSourcesSection.firstNonNativeCallFrame):
1632         (WI.CPUTimelineView.prototype._layoutSourcesSection.keyForSourceCodeLocation):
1633         (WI.CPUTimelineView.prototype._layoutSourcesSection.labelForLocation):
1634         (WI.CPUTimelineView.prototype._layoutSourcesSection.createEllipsisElement):
1635         (WI.CPUTimelineView.prototype._layoutSourcesSection):
1636         Extract layouts into helper methods to avoid an enormous layout method.
1637
1638         (WI.CPUTimelineView.prototype._computeSamplingData.incrementTypeCount):
1639         (WI.CPUTimelineView.prototype._computeSamplingData):
1640         Compute additional data when going through script events.
1641
1642         (WI.CPUTimelineView.prototype._resetSourcesFilters):
1643         (WI.CPUTimelineView.prototype._addSourcesFilter):
1644         (WI.CPUTimelineView.prototype._removeSourcesFilter):
1645         (WI.CPUTimelineView.prototype._updateSourcesFilters):
1646         Helpers for updating the source filters.
1647
1648         (WI.CPUTimelineView.prototype._createTableRow):
1649         (WI.CPUTimelineView.prototype._insertTableRow):
1650         Helpers for creating rows in the statistics / sources tables.
1651
1652 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1653
1654         Web Inspector: Simplify chart <rect>s with x/y attributes instead of transform(x, y)
1655         https://bugs.webkit.org/show_bug.cgi?id=195352
1656
1657         Reviewed by Matt Baker.
1658
1659         * UserInterface/Views/ColumnChart.js:
1660         (WI.ColumnChart.prototype.layout):
1661         (WI.ColumnChart):
1662         * UserInterface/Views/RangeChart.js:
1663         (WI.RangeChart.prototype.layout):
1664         (WI.RangeChart):
1665         * UserInterface/Views/StackedColumnChart.js:
1666         (WI.StackedColumnChart.prototype.layout):
1667         (WI.StackedColumnChart):
1668
1669 2019-03-06  Devin Rousso  <drousso@apple.com>
1670
1671         Web Inspector: CSS Changes: only show changes for the given node
1672         https://bugs.webkit.org/show_bug.cgi?id=194608
1673         <rdar://problem/48050206>
1674
1675         Reviewed by Timothy Hatcher.
1676
1677         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
1678         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
1679         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
1680         (WI.ChangesDetailsSidebarPanel.prototype.layout):
1681         Make this panel a subclass of `WI.DOMDetailsSidebarPanel` so it has access to the selected
1682         DOM node in the Elements tab.
1683
1684         * UserInterface/Base/Setting.js:
1685         * UserInterface/Views/SettingsTabContentView.js:
1686         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1687         Create new general setting for controlling this change.
1688
1689         * Localizations/en.lproj/localizedStrings.js:
1690
1691 2019-03-06  Devin Rousso  <drousso@apple.com>
1692
1693         Web Inspector: Canvas: color swatches aren't shown for valid inputs with leading/trailing whitespace
1694         https://bugs.webkit.org/show_bug.cgi?id=195298
1695
1696         Reviewed by Timothy Hatcher.
1697
1698         * UserInterface/Views/RecordingActionTreeElement.js:
1699         (WI.RecordingActionTreeElement._generateDOM):
1700         (WI.RecordingActionTreeElement._createSwatchForColorParameters):
1701         Trim the color string since it can be an arbitrary string, seeing as it is captured before
1702         the <canvas> has a chance to parse/fix it.
1703
1704 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
1705
1706         Web Inspector: recordsInTimeRange sometimes does not get the expected record when includeRecordBeforeStart
1707         https://bugs.webkit.org/show_bug.cgi?id=195317
1708
1709         Reviewed by Devin Rousso.
1710
1711         * UserInterface/Models/Timeline.js:
1712         (WI.Timeline.prototype.recordsOverlappingTimeRange):
1713
1714 2019-03-05  Devin Rousso  <drousso@apple.com>
1715
1716         Web Inspector: Canvas: remove event listeners once a recording is ready
1717         https://bugs.webkit.org/show_bug.cgi?id=195324
1718
1719         Reviewed by Matt Baker.
1720
1721         * UserInterface/Models/Recording.js:
1722         (WI.Recording):
1723         (WI.Recording.prototype.async swizzle):
1724         (WI.Recording.prototype.async _process):
1725
1726         * UserInterface/Views/RecordingActionTreeElement.js:
1727         (WI.RecordingActionTreeElement):
1728         (WI.RecordingActionTreeElement.prototype._handleValidityChanged):
1729
1730         * UserInterface/Views/CanvasSidebarPanel.js:
1731         (WI.CanvasSidebarPanel.prototype.set recording):
1732         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
1733
1734         * UserInterface/Views/RecordingContentView.js:
1735         (WI.RecordingContentView.prototype.initialLayout):
1736         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
1737
1738 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
1739
1740         Web Inspector: Attempting to select records in the bottom 16px of the timeline overview graph fails
1741         https://bugs.webkit.org/show_bug.cgi?id=195318
1742
1743         Reviewed by Devin Rousso.
1744
1745         The bottom few pixels of the overview are reserved for the scroll-container
1746         which may show a scrollbar if the overview needs to scroll. When the scrollbars
1747         are not visible we can allow pointer events to click through the invisible
1748         scroll-container and allow record selection.
1749
1750         * UserInterface/Views/TimelineOverview.css:
1751         (.timeline-overview:not(.has-scrollbar) > .scroll-container):
1752         * UserInterface/Views/TimelineOverview.js:
1753         (WI.TimelineOverview.prototype._handleScrollEvent):
1754         (WI.TimelineOverview.prototype._handleWheelEvent):
1755         (WI.TimelineOverview._handleGestureStart):
1756
1757 2019-03-05  Devin Rousso  <drousso@apple.com>
1758
1759         Web Inspector: iPod user agent UIString should have a lowercase "T"
1760         https://bugs.webkit.org/show_bug.cgi?id=195312
1761         <rdar://problem/48586853>
1762
1763         Reviewed by Matt Baker.
1764
1765         * UserInterface/Base/Main.js:
1766         (WI._handleDeviceSettingsToolbarButtonClicked):
1767
1768 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
1769
1770         Web Inspector: CPU Usage Timeline - Adjust sizes in timeline overview
1771         https://bugs.webkit.org/show_bug.cgi?id=195313
1772
1773         Reviewed by Devin Rousso.
1774
1775         Reduce the height slightly to save some precious vertical space.
1776         Also increase the size of the minimum bar height so that it doesn't
1777         look like there are no events when there is low CPU.
1778
1779         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1780         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
1781         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1782         (WI.CPUTimelineOverviewGraph.prototype.get height):
1783         Reduce the CPU overview graph height to 60px.
1784
1785         (WI.CPUTimelineOverviewGraph.prototype.layout):
1786         Increase the minimum size of a column bar to 4px.
1787
1788 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
1789
1790         Web Inspector: Reload actions from second level inspector should properly reload the inspected inspector
1791         https://bugs.webkit.org/show_bug.cgi?id=195306
1792
1793         Reviewed by Matt Baker.
1794
1795         * UserInterface/Base/Main.js:
1796         Provide a better reload for a Nth level inspector.
1797
1798         * UserInterface/Debug/Bootstrap.js:
1799         (WI.runBootstrapOperations):
1800         Simplify, should not need to check for InspectorFrontendHost.
1801
1802 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
1803
1804         Web Inspector: MediaSource logging not initialized properly
1805         https://bugs.webkit.org/show_bug.cgi?id=195307
1806
1807         Reviewed by Matt Baker.
1808
1809         * UserInterface/Controllers/ConsoleManager.js:
1810         (WI.ConsoleManager.prototype.initializeLogChannels):
1811         Typo caused undefined to be included and trigger assertions.
1812
1813 2019-03-04  Devin Rousso  <drousso@apple.com>
1814
1815         Web Inspector: CSS: class input isn't fully centered
1816         https://bugs.webkit.org/show_bug.cgi?id=195297
1817
1818         Reviewed by Matt Baker.
1819
1820         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
1821         (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):
1822         (body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
1823         (body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
1824
1825 2019-03-04  Devin Rousso  <drousso@apple.com>
1826
1827         Web Inspector: Audit: show the version number in the UI
1828         https://bugs.webkit.org/show_bug.cgi?id=195292
1829
1830         Reviewed by Matt Baker.
1831
1832         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1833         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
1834         (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
1835         Fix the logic for showing a placeholder when editing or with only disabled tests.
1836
1837         * UserInterface/Views/AuditNavigationSidebarPanel.css:
1838         (.sidebar > .panel.navigation.audit > .content > .message-text-view): Added.
1839         (.audit-version): Added.
1840         Don't obstruct the "Edit" button when showing a placeholder.
1841
1842         * Localizations/en.lproj/localizedStrings.js:
1843
1844 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
1845
1846         ITMLKit Inspector: Data Bindings / Associated Data for nodes
1847         https://bugs.webkit.org/show_bug.cgi?id=195290
1848         <rdar://problem/48304019>
1849
1850         Reviewed by Devin Rousso.
1851
1852         * Localizations/en.lproj/localizedStrings.js:
1853         New title and empty message strings.
1854
1855         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
1856         (.sidebar > .panel.dom-node-details .details-section.dom-node-associated-data > .content .row):
1857         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1858         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
1859         (WI.DOMNodeDetailsSidebarPanel.prototype.layout):
1860         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshDataBindings):
1861         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):
1862         (WI.DOMNodeDetailsSidebarPanel.prototype._attributesChanged):
1863         New Node sections only enabled for ITMLKit `WI.sharedApp.hasExtraDomains`.
1864
1865         * UserInterface/Views/ObjectTreeView.js:
1866         (WI.ObjectTreeView):
1867         Provide a way, like TreeElement/View to access the ObjectTreeView from an element.
1868
1869 2019-03-04  Devin Rousso  <drousso@apple.com>
1870
1871         Web Inspector: Canvas: protocol error on first open
1872         https://bugs.webkit.org/show_bug.cgi?id=195059
1873         <rdar://problem/48407871>
1874
1875         Reviewed by Joseph Pecoraro.
1876
1877         * UserInterface/Controllers/CanvasManager.js:
1878         (WI.CanvasManager.prototype.initializeTarget):
1879         (WI.CanvasManager.prototype.static supportsRecordingAutoCapture):
1880         (WI.CanvasManager.prototype.setRecordingAutoCaptureFrameCount):
1881         If targets aren't available, wait until they are and then set the auto-capture frame count.
1882
1883 2019-03-04  Devin Rousso  <drousso@apple.com>
1884
1885         Web Inspector: Toggling Timeline "Stop when page loads" to on should stop (immediately or soon) any active recording if already past the load event
1886         https://bugs.webkit.org/show_bug.cgi?id=195239
1887
1888         Reviewed by Joseph Pecoraro.
1889
1890         * UserInterface/Controllers/TimelineManager.js:
1891         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
1892
1893 2019-03-02  Devin Rousso  <drousso@apple.com>
1894
1895         Web Inspector: Unexpectedly frequent flashing of DOM node attributes
1896         https://bugs.webkit.org/show_bug.cgi?id=148049
1897         <rdar://problem/22296830>
1898
1899         Reviewed by Joseph Pecoraro.
1900
1901         Save a timestamp of when the CSS animation began, so that if the attribute's node is replaced,
1902         we can "resume" the CSS animation at the same point with the attribute's new node.
1903
1904         * UserInterface/Views/DOMTreeElement.js:
1905         (WI.DOMTreeElement):
1906         (WI.DOMTreeElement.prototype.attributeDidChange):
1907         (WI.DOMTreeElement.prototype._buildAttributeDOM):
1908         (WI.DOMTreeElement.prototype._createModifiedAnimation):
1909         (WI.DOMTreeElement.prototype._markNodeChanged): Deleted.
1910         (WI.DOMTreeElement.prototype._nodeChangedAnimationEnd): Deleted.
1911         (WI.DOMTreeElement.prototype._fireDidChange): Deleted.
1912
1913 2019-03-02  Devin Rousso  <drousso@apple.com>
1914
1915         Web Inspector: Debugger: DOM, URL, and Event breakpoints don't grey out when all breakpoints are disabled
1916         https://bugs.webkit.org/show_bug.cgi?id=195170
1917         <rdar://problem/48478193>
1918
1919         Reviewed by Joseph Pecoraro.
1920
1921         * UserInterface/Views/DOMBreakpointTreeElement.js:
1922         (WI.DOMBreakpointTreeElement):
1923         (WI.DOMBreakpointTreeElement.prototype.onattach):
1924         (WI.DOMBreakpointTreeElement.prototype.ondetach):
1925         (WI.DOMBreakpointTreeElement.prototype._updateStatus):
1926         * UserInterface/Views/EventBreakpointTreeElement.js:
1927         (WI.EventBreakpointTreeElement):
1928         (WI.EventBreakpointTreeElement.prototype.onattach):
1929         (WI.EventBreakpointTreeElement.prototype.ondetach):
1930         (WI.EventBreakpointTreeElement.prototype._updateStatus):
1931         * UserInterface/Views/URLBreakpointTreeElement.js:
1932         (WI.URLBreakpointTreeElement):
1933         (WI.URLBreakpointTreeElement.prototype.onattach):
1934         (WI.URLBreakpointTreeElement.prototype.ondetach):
1935         (WI.URLBreakpointTreeElement.prototype._updateStatus):
1936         Remove the `"resolved"` class when the global "breakpoints enabled" state is changed.
1937
1938         * UserInterface/Controllers/DOMDebuggerManager.js:
1939         (WI.DOMDebuggerManager):
1940         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged): Added.
1941         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
1942         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged): Added.
1943         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
1944         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
1945         (WI.DOMDebuggerManager.prototype._resolveEventBreakpoint):
1946         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint):
1947         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint.breakpointUpdated): Deleted.
1948         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint.breakpointUpdated): Deleted.
1949         * UserInterface/Models/DOMBreakpoint.js:
1950         (WI.DOMBreakpoint):
1951         (WI.DOMBreakpoint.deserialize): Added.
1952         (WI.DOMBreakpoint.prototype.set disabled):
1953         (WI.DOMBreakpoint.prototype.set domNodeIdentifier):
1954         * UserInterface/Models/EventBreakpoint.js:
1955         (WI.EventBreakpoint.deserialize): Added.
1956         (WI.EventBreakpoint.prototype.set disabled):
1957         (WI.EventBreakpoint.fromPayload): Deleted.
1958         * UserInterface/Models/URLBreakpoint.js:
1959         (WI.URLBreakpoint.deserialize): Added.
1960         (WI.URLBreakpoint.prototype.set disabled):
1961         * UserInterface/Views/DOMTreeContentView.js:
1962         (WI.DOMTreeContentView):
1963         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDisabledStateChanged): Added.
1964         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeChanged): Added.
1965         * UserInterface/Views/DebuggerSidebarPanel.js:
1966         (WI.DebuggerSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
1967         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1968         (WI.SourcesNavigationSidebarPanel):
1969         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
1970         Drive-by: rename all events with the name `*DidChange` to `*Changed`.
1971         Drive-by: create static `deserialize` helper functions.
1972
1973 2019-03-02  Devin Rousso  <drousso@apple.com>
1974
1975         Web Inspector: Sources: breakpoints should be disabled when an audit is running
1976         https://bugs.webkit.org/show_bug.cgi?id=195105
1977         <rdar://problem/48441373>
1978
1979         Reviewed by Joseph Pecoraro.
1980
1981         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1982         (WI.SourcesNavigationSidebarPanel):
1983         (WI.SourcesNavigationSidebarPanel.prototype.closed):
1984         (WI.SourcesNavigationSidebarPanel.prototype._updateTemporarilyDisabledBreakpointsButtons): Added.
1985         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
1986         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
1987         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
1988         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
1989         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
1990         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1991         (.sidebar > .panel.navigation.sources > .content > .warning-banner + .warning-banner): Added.
1992
1993         * UserInterface/Views/DebuggerSidebarPanel.js:
1994         (WI.DebuggerSidebarPanel):
1995
1996 2019-03-02  Devin Rousso  <drousso@apple.com>
1997
1998         Web Inspector: Debugger: don't enable breakpoints when source location changes
1999         https://bugs.webkit.org/show_bug.cgi?id=195081
2000         <rdar://problem/48422701>
2001
2002         Reviewed by Joseph Pecoraro.
2003
2004         * UserInterface/Controllers/DebuggerManager.js:
2005         (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
2006         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
2007
2008 2019-03-01  Joseph Pecoraro  <pecoraro@apple.com>
2009
2010         Web Inspector: CPU Usage - Energy Impact Section
2011         https://bugs.webkit.org/show_bug.cgi?id=195151
2012
2013         Reviewed by Devin Rousso.
2014
2015         * Localizations/en.lproj/localizedStrings.js:
2016         * UserInterface/Main.html:
2017         New strings and resources.
2018
2019         * UserInterface/Views/CPUTimelineView.css:
2020         (.timeline-view.cpu > .content .subtitle > .info):
2021         (@media (prefers-color-scheme: dark)):
2022         (.energy-info-popover-content):
2023         (.timeline-view.cpu > .content > .overview > .divider):
2024         (body[dir=ltr] .timeline-view.cpu > .content > .overview > .divider):
2025         (body[dir=rtl] .timeline-view.cpu > .content > .overview > .divider):
2026         (.timeline-view.cpu :matches(.area-chart, .stacked-area-chart) svg > path):
2027         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.low):
2028         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.medium):
2029         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.high):
2030         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > polygon.needle):
2031         (.timeline-view.cpu .energy):
2032         (.timeline-view.cpu .energy .energy-impact):
2033         (.timeline-view.cpu .energy .energy-impact.low):
2034         (.timeline-view.cpu .energy .energy-impact.medium):
2035         (.timeline-view.cpu .energy .energy-impact.high):
2036         (.timeline-view.cpu .energy .energy-impact-number):
2037         Styling the chart and text for the different energy impact levels.
2038
2039         * UserInterface/Views/CPUTimelineView.js:
2040         (WI.CPUTimelineView.prototype.get lowEnergyValue):
2041         (WI.CPUTimelineView.prototype.get highEnergyValue):
2042         (WI.CPUTimelineView.prototype.initialLayout):
2043         (WI.CPUTimelineView.prototype.layout):
2044         (WI.CPUTimelineView.prototype._layoutEnergyChart.mapWithBias):
2045         (WI.CPUTimelineView.prototype._layoutEnergyChart.valuesForGauge):
2046         (WI.CPUTimelineView.prototype._layoutEnergyChart):
2047         (WI.CPUTimelineView.prototype._clearEnergyImpactText):
2048         New gauge chart and associated popover.
2049         We do a bit of biasing of the data for each of the sections
2050         in the gauge chart. Each section biases toward the cap of the
2051         section so that:
2052           - we encourage lower power usage (sub 3%)
2053           - the gauge needle quickly moves past the low value of a range
2054
2055         * UserInterface/Views/GaugeChart.css: Added.
2056         (.gauge-chart):
2057         (body[dir=rtl] .gauge-chart):
2058         (.gauge-chart > svg > path,):
2059         (.gauge-chart > svg > polygon.needle):
2060         (.gauge-chart.empty > svg > polygon.needle):
2061         (@media (prefers-color-scheme: dark)):
2062         * UserInterface/Views/GaugeChart.js: Added.
2063         (WI.GaugeChart.prototype.get size):
2064         (WI.GaugeChart.prototype.get segments):
2065         (WI.GaugeChart.prototype.get value):
2066         (WI.GaugeChart.prototype.set value):
2067         (WI.GaugeChart.prototype.clear):
2068         (WI.GaugeChart.prototype.initialLayout):
2069         (WI.GaugeChart.prototype.layout):
2070         (WI.GaugeChart.prototype._validateSegments):
2071         (WI.GaugeChart.prototype._createSegmentPathData):
2072         GaugeChart with variable number of sections and a
2073         current value needle. It has a bit of customization
2074         when drawing the arc at the start of each segment.
2075
2076         * UserInterface/Views/Variables.css:
2077         (:root):
2078         (@media (prefers-color-scheme: dark)):
2079         New CPU colors for the different energy impact levels.
2080
2081 2019-03-01  Nikita Vasilyev  <nvasilyev@apple.com>
2082
2083         Web Inspector: Data grid border colors don't match accent colors
2084         https://bugs.webkit.org/show_bug.cgi?id=195232
2085
2086         Reviewed by Matt Baker.
2087
2088         * UserInterface/Views/DataGrid.css:
2089         (.data-grid:focus tr.selected td:not(:last-child)):
2090         (body[dir=ltr] .data-grid:focus tr.selected td:not(:last-child)):
2091         (body[dir=rtl] .data-grid:focus tr.selected td:not(:last-child)):
2092
2093 2019-02-28  Devin Rousso  <drousso@apple.com>
2094
2095         Web Inspector: Timelines: don't show the auto-stop UI when not inspecting a page
2096         https://bugs.webkit.org/show_bug.cgi?id=195192
2097
2098         Reviewed by Joseph Pecoraro.
2099
2100         * UserInterface/Views/TimelineRecordingContentView.js:
2101         (WI.TimelineRecordingContentView):
2102         (WI.TimelineRecordingContentView.prototype.get navigationItems):
2103
2104 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
2105
2106         Web Inspector: CPU Usage: Worker thread that dies might stay at a high value forever
2107         https://bugs.webkit.org/show_bug.cgi?id=195148
2108
2109         Reviewed by Matt Baker.
2110
2111         * UserInterface/Views/CPUTimelineView.js:
2112         (CPUTimelineView.prototype.layout):
2113         Handle workers dieing or at least zeroing out between records.
2114
2115 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
2116
2117         Web Inspector: CPU Usage Timeline - Make Threads section expandable / collapsable
2118         https://bugs.webkit.org/show_bug.cgi?id=195085
2119
2120         Reviewed by Matt Baker.
2121
2122         * UserInterface/Base/Setting.js:
2123         New setting to save the Threads expanded/collapsed state.
2124
2125         * UserInterface/Views/CPUTimelineView.css:
2126         (.timeline-view.cpu > .content > .details > .subtitle):
2127         (.timeline-view.cpu > .content > .details > details > .subtitle.threads):
2128         (.timeline-view.cpu > .content > .details > .subtitle): Deleted.
2129         (.timeline-view.cpu > .content > .details > .subtitle.threads): Deleted.
2130         Ensure subtitle styles apply now that one of the subtitles is inside
2131         of a <details> / <summary> element.
2132
2133         * UserInterface/Views/CPUTimelineView.js:
2134         (WI.CPUTimelineView.prototype.initialLayout):
2135         Make the Threads group a <details> / <summary> expandable / collapsed element.
2136
2137         * UserInterface/Views/Main.css:
2138         (summary):
2139         (summary::-webkit-details-marker):
2140         Default styles for <summary>.
2141
2142 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
2143
2144         Web Inspector: View.removeSubview not removing the element properly when not parented
2145         https://bugs.webkit.org/show_bug.cgi?id=195146
2146
2147         Reviewed by Matt Baker.
2148
2149         * UserInterface/Views/View.js:
2150         (WI.View.prototype.removeSubview):
2151         Since the element may not be a direct child, just use Element.prototype.remove.
2152
2153 2019-02-28  Matt Baker  <mattbaker@apple.com>
2154
2155         Web Inspector: Debugger: disabled breakpoint color is too dark
2156         https://bugs.webkit.org/show_bug.cgi?id=195103
2157         <rdar://problem/48440678>
2158
2159         Reviewed by Devin Rousso.
2160
2161         Increase the disabled breakpoint contrast, as well as the contrast between
2162         disabled and auto-continue breakpoints. Disabled breakpoints stand out by
2163         being somewhat brighter and less saturated. Using the same strategy for
2164         auto-continue breakpoints is too subtle to provide sufficient contrast.
2165
2166         We can adopt the technique used by Xcode, and overlay a white triangle
2167         marker on the breakpoint arrow to indicate an auto-continue breakpoint.
2168
2169         * UserInterface/Views/BreakpointTreeElement.css:
2170         (.item.breakpoint .status > .status-image):
2171         (.item.breakpoint.selected .status > .status-image.resolved):
2172         Add white outline to make selected breakpoint button stand out.
2173         (.item.breakpoint .status > .status-image.auto-continue::after):
2174         (.item.breakpoint .status > .status-image.disabled):
2175         (.item.breakpoint .status > .status-image.auto-continue): Deleted.
2176
2177
2178         * UserInterface/Views/DOMTreeContentView.css:
2179         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
2180         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled):
2181         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
2182         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,): Deleted.
2183
2184         * UserInterface/Views/TextEditor.css:
2185         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
2186         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.execution-line.primary) .CodeMirror-linenumber::after):
2187         (.text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before):
2188         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before): Deleted.
2189
2190         * UserInterface/Views/Variables.css:
2191         (:root):
2192         Add breakpoint color variables to use across all breakpoint controls.
2193         Use system colors if available, otherwise fall back to hard-coded values
2194         based on sampling the default (blue) accent color on Mojave.
2195
2196 2019-02-28  Nikita Vasilyev  <nvasilyev@apple.com>
2197
2198         Web Inspector: Styles: Control-Space should force completion
2199         https://bugs.webkit.org/show_bug.cgi?id=194796
2200         <rdar://problem/48180822>
2201
2202         Reviewed by Matt Baker.
2203
2204         Pressing Control-Space when editing CSS property should show completion popover,
2205         even if the value is empty.
2206
2207         * UserInterface/Models/CSSCompletions.js:
2208         (WI.CSSCompletions.prototype.startsWith):
2209         Performance optimization: exit early when `prefix` is empty.
2210
2211         * UserInterface/Views/SpreadsheetStyleProperty.js:
2212         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
2213         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
2214         * UserInterface/Views/SpreadsheetTextField.js:
2215         (WI.SpreadsheetTextField):
2216         (WI.SpreadsheetTextField.prototype._handleKeyDown):
2217         (WI.SpreadsheetTextField.prototype._updateCompletions):
2218
2219 2019-02-28  Devin Rousso  <drousso@apple.com>
2220
2221         Web Inspector: Canvas: enabling auto-capture if the frame count is empty triggers an assertion
2222         https://bugs.webkit.org/show_bug.cgi?id=195060
2223
2224         Reviewed by Matt Baker.
2225
2226         * UserInterface/Views/CanvasOverviewContentView.js:
2227         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
2228         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
2229         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureCheckedDidChange):
2230
2231 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
2232
2233         Web Inspector: Revert -webkit-border-end changes that are unreliable
2234         https://bugs.webkit.org/show_bug.cgi?id=195149
2235
2236         Reviewed by Matt Baker.
2237
2238         * UserInterface/Views/CPUUsageIndicatorView.css:
2239         (.cpu-usage-indicator-view > .details):
2240         (body[dir=ltr] .cpu-usage-indicator-view > .details):
2241         (body[dir=rtl] .cpu-usage-indicator-view > .details):
2242         * UserInterface/Views/CPUUsageStackedView.css:
2243         (.cpu-usage-stacked-view > .details):
2244         (body[dir=ltr] .cpu-usage-stacked-view > .details):
2245         (body[dir=rtl] .cpu-usage-stacked-view > .details):
2246         * UserInterface/Views/CPUUsageView.css:
2247         (.cpu-usage-view > .details):
2248         (body[dir=ltr] .cpu-usage-view > .details):
2249         (body[dir=rtl] .cpu-usage-view > .details):
2250         * UserInterface/Views/MemoryCategoryView.css:
2251         (.memory-category-view > .details):
2252         (body[dir=ltr] .memory-category-view > .details):
2253         (body[dir=rtl] .memory-category-view > .details):
2254
2255 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
2256
2257         Web Inspector: Cleanup some Chart code
2258         https://bugs.webkit.org/show_bug.cgi?id=195147
2259
2260         Reviewed by Matt Baker.
2261
2262         * UserInterface/Views/RangeChart.js:
2263         (WI.RangeChart.prototype.layout):
2264         (WI.RangeChart):
2265         * UserInterface/Views/StackedColumnChart.js:
2266         (WI.StackedColumnChart.prototype.layout):
2267         (WI.StackedColumnChart):
2268
2269 2019-02-27  Joseph Pecoraro  <pecoraro@apple.com>
2270
2271         Web Inspector: Add a new Scanner TimelineMarker to show up when mousing over TimelineView graphs
2272         https://bugs.webkit.org/show_bug.cgi?id=195079
2273
2274         Reviewed by Devin Rousso.
2275
2276         * UserInterface/Base/Utilities.js:
2277         (Note.prototype.enclosingNodeOrSelfWithClassInArray):
2278         Helper for a set of classes.
2279
2280         * UserInterface/Models/TimelineMarker.js:
2281         Add a new marker type, "Scanner".
2282
2283         * UserInterface/Views/CPUTimelineView.js:
2284         (WI.CPUTimelineView.prototype.initialLayout):
2285         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
2286         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
2287         * UserInterface/Views/MemoryTimelineView.js:
2288         (WI.MemoryTimelineView):
2289         (WI.MemoryTimelineView.prototype._graphPositionForMouseEvent):
2290         (WI.MemoryTimelineView.prototype._handleGraphMouseMove):
2291         Update a scanner time when mousing over various graphs that span the entire time range.
2292         These use the containing graph element because there was a single pixel between
2293         adjacent graphs which would cause the scanner to flicker because the mouse event target
2294         was not an svg element.
2295
2296         * UserInterface/Views/TimelineOverview.js:
2297         (WI.TimelineOverview.prototype.hidden):
2298         (WI.TimelineOverview.prototype.updateScannerTime):
2299         (WI.TimelineOverview.prototype.clearScanner):
2300         * UserInterface/Views/TimelineRecordingContentView.js:
2301         (WI.TimelineRecordingContentView):
2302         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerTimeDidChange):
2303         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerDidClear):
2304         Update the overview's ruler with scanner changes.
2305
2306         * UserInterface/Views/TimelineRuler.css:
2307         (.timeline-ruler > .markers > .marker.scanner):
2308         * UserInterface/Views/TimelineRuler.js:
2309         (WI.TimelineRuler):
2310         (WI.TimelineRuler.prototype.clearMarkers):
2311         (WI.TimelineRuler.prototype.updateScannerTime):
2312         (WI.TimelineRuler.prototype.clearScanner):
2313         (WI.TimelineRuler.prototype._updateMarkers):
2314         Have a special scanner marker that updates.
2315
2316         * UserInterface/Views/TimelineView.js:
2317         New events that a TimelineView can dispatch to update the overview.
2318
2319         * UserInterface/Views/Variables.css:
2320         (:root):
2321         (@media (prefers-color-scheme: dark)):
2322         Scanner marker colors.
2323
2324 2019-02-27  Devin Rousso  <drousso@apple.com>
2325
2326         Web Inspector: Use Element.closest for internal code
2327         https://bugs.webkit.org/show_bug.cgi?id=173747
2328
2329         Reviewed by Joseph Pecoraro.
2330
2331         Replace usage of added utility functions on the `Node` prototype with the built-in
2332         `Element.prototype.closest` as it's more flexible and is capable of doing the same thing.
2333
2334         * UserInterface/Base/Utilities.js:
2335         (Node.prototype.enclosingNodeOrSelfWithClass): Deleted.
2336         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Deleted.
2337         (Node.prototype.enclosingNodeOrSelfWithNodeName): Deleted.
2338         * UserInterface/Base/Main.js:
2339         (WI.handlePossibleLinkClick):
2340         (WI._focusedContentBrowser):
2341         * UserInterface/Views/CPUTimelineView.js:
2342         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
2343         * UserInterface/Views/CompletionSuggestionsView.js:
2344         (WI.CompletionSuggestionsView.prototype.set selectedIndex):
2345         (WI.CompletionSuggestionsView.prototype.update):
2346         (WI.CompletionSuggestionsView.prototype._itemClicked):
2347         * UserInterface/Views/ConsoleGroup.js:
2348         (WI.ConsoleGroup.prototype._titleClicked):
2349         * UserInterface/Views/DOMTreeContentView.js:
2350         (WI.DOMTreeContentView.prototype._mouseWasClicked):
2351         * UserInterface/Views/DOMTreeElement.js:
2352         (WI.DOMTreeElement.prototype._startEditingTarget):
2353         (WI.DOMTreeElement.prototype._populateTagContextMenu):
2354         * UserInterface/Views/DOMTreeOutline.js:
2355         (WI.DOMTreeOutline.prototype.populateContextMenu):
2356         * UserInterface/Views/DataGrid.js:
2357         (WI.DataGrid.prototype._startEditing):
2358         (WI.DataGrid.prototype._editingCancelled):
2359         (WI.DataGrid.prototype.dataGridNodeFromNode):
2360         (WI.DataGrid.prototype.dataGridNodeFromPoint):
2361         (WI.DataGrid.prototype._headerCellClicked):
2362         (WI.DataGrid.prototype._mouseoverColumnCollapser):
2363         (WI.DataGrid.prototype._mouseoutColumnCollapser):
2364         (WI.DataGrid.prototype._clickInColumnCollapser):
2365         (WI.DataGrid.prototype._contextMenuInHeader):
2366         (WI.DataGrid.prototype._contextMenuInDataTable):
2367         * UserInterface/Views/DataGridNode.js:
2368         (WI.DataGridNode.prototype.isEventWithinDisclosureTriangle):
2369         * UserInterface/Views/LegacyTabBar.js:
2370         (WI.LegacyTabBar.prototype._handleMouseDown):
2371         (WI.LegacyTabBar.prototype._handleClick):
2372         * UserInterface/Views/LogContentView.js:
2373         (WI.LogContentView.prototype._handleContextMenuEvent):
2374         (WI.LogContentView.prototype._mousedown):
2375         (WI.LogContentView.prototype._targetInMessageCanBeSelected):
2376         (WI.LogContentView.prototype._mousemove):
2377         (WI.LogContentView.prototype._mouseup):
2378         (WI.LogContentView.prototype._ondragstart):
2379         * UserInterface/Views/NavigationBar.js:
2380         (WI.NavigationBar.prototype._mouseDown):
2381         (WI.NavigationBar.prototype._mouseMoved):
2382         * UserInterface/Views/Popover.js:
2383         (WI.Popover.prototype.handleEvent):
2384         * UserInterface/Views/TabBar.js:
2385         (WI.TabBar.prototype._handleMouseDown):
2386         (WI.TabBar.prototype._handleClick):
2387         * UserInterface/Views/Table.js:
2388         (WI.Table.prototype._handleMouseDown):
2389         (WI.Table.prototype._handleContextMenu):
2390         * UserInterface/Views/TreeOutline.js:
2391         (WI.TreeOutline.prototype.treeElementFromNode):
2392
2393 2019-02-27  Devin Rousso  <drousso@apple.com>
2394
2395         Web Inspector: REGRESSION(r242118): Debugger: event breakpoints have no icon
2396         https://bugs.webkit.org/show_bug.cgi?id=195119
2397
2398         Reviewed by Matt Baker.
2399
2400         * UserInterface/Views/EventBreakpointTreeElement.js:
2401         (WI.EventBreakpointTreeElement):
2402
2403 2019-02-27  Devin Rousso  <drousso@apple.com>
2404
2405         Web Inspector: Dark Mode: unreadable text in bezier curve editor numeric input fields
2406         https://bugs.webkit.org/show_bug.cgi?id=195018
2407         <rdar://problem/48378541>
2408
2409         Reviewed by Matt Baker.
2410
2411         Simplify some styles using `-webkit-*` properties instead of `[dir=ltr]`/`[dir=rtl]` selectors.
2412
2413         * UserInterface/Views/BezierEditor.css:
2414         (.bezier-editor):
2415         (.bezier-editor > .bezier-preview):
2416         (.bezier-editor > .bezier-preview-timing):
2417         (.bezier-editor > .bezier-container .linear-curve):
2418         (.bezier-editor > .bezier-container .bezier-curve):
2419         (.bezier-editor > .bezier-container .control-line):
2420         (.bezier-editor > .bezier-container .control-handle):
2421         (.bezier-editor > .number-input-container):
2422         (.bezier-editor > .number-input-container > input):
2423         (body[dir=ltr] .bezier-editor > .bezier-preview-timing): Deleted.
2424         (body[dir=rtl] .bezier-editor > .bezier-preview-timing): Deleted.
2425         (body[dir=ltr] .bezier-editor > .number-input-container > input): Deleted.
2426         (body[dir=rtl] .bezier-editor > .number-input-container > input): Deleted.
2427         (@media (prefers-color-scheme: dark)): Deleted.
2428         Remove all custom styling on any <input>s, as they look fine with their default styling.
2429
2430         * UserInterface/Views/SpringEditor.css:
2431         (.spring-editor > .spring-preview):
2432         (.spring-editor > .spring-preview > div):
2433         (.spring-editor > .spring-timing > div):
2434
2435 2019-02-27  Devin Rousso  <drousso@apple.com>
2436
2437         Web Inspector: popover colors don't change when transitioning to/from dark mode
2438         https://bugs.webkit.org/show_bug.cgi?id=195113
2439         <rdar://problem/48444188>
2440
2441         Reviewed by Timothy Hatcher.
2442
2443         * UserInterface/Views/Popover.js:
2444         (WI.Popover.prototype.dismiss):
2445         (WI.Popover.prototype._addListenersIfNeeded):
2446
2447 2019-02-26  Matt Baker  <mattbaker@apple.com>
2448
2449         Web Inspector: Use system accent color throughout UI
2450         https://bugs.webkit.org/show_bug.cgi?id=193507
2451         <rdar://problem/47327971>
2452
2453         Reviewed by Timothy Hatcher.
2454
2455         * UserInterface/Images/Breakpoint.png: Removed.
2456         * UserInterface/Images/Breakpoint.svg: Added.
2457         * UserInterface/Images/Breakpoint@2x.png: Removed.
2458         * UserInterface/Images/BreakpointInactive.png: Removed.
2459         * UserInterface/Images/BreakpointInactive@2x.png: Removed.
2460         Replace breakpoint pixel art with an SVG image that can be styled in CSS.
2461
2462         * UserInterface/Images/CSSVariable.svg:
2463         * UserInterface/Images/CubicBezier.svg:
2464         * UserInterface/Images/UserInputPrompt.svg:
2465         Remove fill color since it is now styled in CSS.
2466
2467         * UserInterface/Views/BezierEditor.css:
2468         (.bezier-editor > .bezier-preview > div):
2469         (@media (prefers-color-scheme: dark)):
2470         (.bezier-editor > .bezier-container .control-handle):
2471         (.bezier-editor > .bezier-container .control-line):
2472         Use system accent color for control handles.
2473
2474         * UserInterface/Views/BreakpointTreeElement.css:
2475         (.item.breakpoint .status > .status-image):
2476         (.item.breakpoint .status > .status-image.resolved):
2477         Use system accent color for breakpoint fill, with a dark outline
2478         to match Xcode and make the button stand out against the selection.
2479
2480         * UserInterface/Views/BreakpointTreeElement.js:
2481         (WI.BreakpointTreeElement.prototype._updateStatus):
2482
2483         * UserInterface/Views/ButtonNavigationItem.css:
2484         (.navigation-bar .item.button > .glyph):
2485
2486         * UserInterface/Views/ConsolePrompt.js:
2487         (WI.ConsolePrompt):
2488
2489         * UserInterface/Views/DOMBreakpointTreeElement.js:
2490         * UserInterface/Views/DOMTreeContentView.css:
2491         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
2492         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,):
2493         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
2494         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled): Deleted.
2495         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint): Deleted.
2496         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint.disabled): Deleted.
2497
2498         * UserInterface/Views/DOMTreeOutline.css:
2499         (.tree-outline.dom li.selected .selection-area):
2500         (.tree-outline.dom li.elements-drag-over .selection-area):
2501         (.tree-outline.dom:focus li:matches(.selected, .hovered) .selection-area):
2502         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
2503         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
2504         Use the system accent color for the "pseudo-class enabled" marker.
2505         (@media (prefers-color-scheme: dark)):
2506         (.tree-outline.dom:focus li.selected .selection-area): Deleted.
2507         Use --selected-background-color for selection and hover styles, which is
2508         set to the system highlight color if available.
2509
2510         * UserInterface/Views/InlineSwatch.css:
2511         (.inline-swatch:matches(.bezier, .spring, .variable)):
2512         (.inline-swatch:matches(.bezier, .spring)): Deleted.
2513         (.inline-swatch.variable): Deleted.
2514
2515         * UserInterface/Views/InlineSwatch.js:
2516         (WI.InlineSwatch):
2517
2518         * UserInterface/Views/NetworkDetailView.css:
2519         (.network .network-detail .navigation-bar .item.radio.button.text-only:before):
2520         (.network .network-detail .navigation-bar .item.radio.button.text-only.selected):
2521         (@media (prefers-color-scheme: dark)):
2522         (.network-detail .item.close > .glyph):
2523
2524         * UserInterface/Views/QuickConsole.css:
2525         (.quick-console > .console-prompt > .glyph):
2526         (.quick-console > .console-prompt::before): Deleted.
2527
2528         * UserInterface/Views/RadioButtonNavigationItem.css:
2529         (.navigation-bar .item.radio.button.text-only):
2530         (.navigation-bar .item.radio.button.text-only::before):
2531         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)):
2532         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)::before):
2533         (.navigation-bar .item.radio.button.text-only:not(.selected):hover::before):
2534         (.navigation-bar .item.radio.button.text-only.selected:active::before):
2535         (.navigation-bar .item.radio.button.text-only:hover): Deleted.
2536         (.navigation-bar .item.radio.button.text-only.selected): Deleted.
2537         (.navigation-bar .item.radio.button.text-only:active): Deleted.
2538         (.navigation-bar .item.radio.button.text-only.selected:active): Deleted.
2539         Use system accent color for selection and hover styles. Since it isn't
2540         yet possible to derive new colors from the accent color in CSS, fake it
2541         with a ::before pseudo-element that can have have `filter` or `opacity`
2542         effects applied to it without altering the button text color.
2543
2544         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
2545         (.timeline-overview-graph.rendering-frame > .frame-marker):
2546         Use system accent color for selected frame marker.
2547
2548         * UserInterface/Views/ScopeBar.css:
2549         (.scope-bar > li):
2550         (.scope-bar > li::before):
2551         (.scope-bar.default-item-selected > li.multiple.selected::before):
2552         (.scope-bar > li:matches(.selected, :hover)):
2553         (.scope-bar > li:matches(.selected, :hover)::before):
2554         (.scope-bar > li:not(.selected):hover::before):
2555         (.scope-bar > li.selected:active::before):
2556         (.scope-bar > li:hover): Deleted.
2557         (.scope-bar > li.selected): Deleted.
2558         (.scope-bar > li:active): Deleted.
2559         (.scope-bar > li.selected:active): Deleted.
2560
2561         * UserInterface/Views/SettingsTabContentView.css:
2562         (.content-view.settings .navigation-bar .item.radio.button.text-only:before):
2563
2564         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2565         (.spreadsheet-style-declaration-editor):
2566         (@media (prefers-color-scheme: dark)):
2567
2568         * UserInterface/Views/TextEditor.css:
2569         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
2570         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
2571         (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
2572         (@keyframes text-editor-highlight-fadeout):
2573         (@keyframes text-editor-hovered-expression-highlight-fadeout):
2574         Replace breakpoint pixel art with a solid color (the system accent
2575         color) clipped to the shape of a breakpoint.
2576
2577         * UserInterface/Views/TimelineRecordFrame.css:
2578         (.timeline-record-frame.selected):
2579
2580         * UserInterface/Views/URLBreakpointTreeElement.js:
2581
2582         * UserInterface/Views/Variables.css:
2583         (:root):
2584         (body.window-inactive):
2585         (@media (prefers-color-scheme: dark)):
2586         (body.mac-platform:not(.sierra, .high-sierra)):
2587         Add custom property overrides for system colors where supported.
2588
2589 2019-02-26  Devin Rousso  <drousso@apple.com>
2590
2591         Web Inspector: Search: no results when opening to Search tab
2592         https://bugs.webkit.org/show_bug.cgi?id=195058
2593         <rdar://problem/48407699>
2594
2595         Reviewed by Joseph Pecoraro.
2596
2597         * UserInterface/Views/SearchSidebarPanel.js:
2598         (WI.SearchSidebarPanel.prototype.performSearch):
2599         If targets aren't available, wait until they are and then perform the search.
2600
2601         * UserInterface/Base/Main.js:
2602         (WI.targetsAvailable): Added.
2603         Expose getter for indicating whether targets are available.
2604
2605 2019-02-26  Joseph Pecoraro  <pecoraro@apple.com>
2606
2607         Web Inspector: CPU Usage Timeline - Main Thread Indicator
2608         https://bugs.webkit.org/show_bug.cgi?id=194972
2609
2610         Reviewed by Devin Rousso.
2611
2612         * UserInterface/Main.html:
2613         * UserInterface/Base/Utilities.js:
2614         (value):
2615         The existing enclosingNode doesn't work for SVG because its names
2616         are lowercase. Add a simplified version for the svg case.
2617
2618         * UserInterface/Views/RangeChart.js: Added.
2619         (WI.RangeChart):
2620         (WI.RangeChart.prototype.get size):
2621         (WI.RangeChart.prototype.set size):
2622         (WI.RangeChart.prototype.addRange):
2623         (WI.RangeChart.prototype.clear):
2624         (WI.RangeChart.prototype.layout):
2625         A new chart that draws rects for given ranges.
2626
2627         * UserInterface/Models/Timeline.js:
2628         (WI.Timeline.prototype.recordsOverlappingTimeRange):
2629         Helper to specifically get records touching a range. Useful
2630         for when we have a single pixel spanning (startTime -> endTime)
2631         and we want to find records in that pixel.
2632
2633         * UserInterface/Views/CPUTimelineView.css:
2634         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart rect):
2635         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-script):
2636         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-style):
2637         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-layout):
2638         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-paint):
2639         * UserInterface/Views/CPUTimelineView.js:
2640         (WI.CPUTimelineView.prototype.get indicatorViewHeight):
2641         (WI.CPUTimelineView.prototype.clear):
2642         (WI.CPUTimelineView.prototype.get scrollableElements):
2643         (WI.CPUTimelineView.prototype.initialLayout):
2644         (WI.CPUTimelineView.prototype.layout):
2645         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
2646         (WI.CPUTimelineView.prototype._handleIndicatorClick):
2647         (WI.CPUTimelineView.prototype._attemptSelectIndicatatorTimelineRecord):
2648         (WI.CPUTimelineView.prototype._selectTimelineRecord):
2649         Place the Main Thread Indicator view beneath the big graph.
2650         Clicking inside it selects records in the Timeline Overview.
2651
2652         * UserInterface/Views/CPUUsageIndicatorView.css: Added.
2653         (.cpu-usage-indicator-view):
2654         (.cpu-usage-indicator-view > .details):
2655         (body[dir=ltr] .cpu-usage-indicator-view > .details):
2656         (body[dir=rtl] .cpu-usage-indicator-view > .details):
2657         (body[dir=rtl] .cpu-usage-indicator-view > .graph):
2658         (.cpu-usage-indicator-view > .graph):
2659         (.cpu-usage-indicator-view > .graph,):
2660         * UserInterface/Views/CPUUsageIndicatorView.js: Added.
2661         (WI.CPUUsageIndicatorView):
2662         (WI.CPUUsageIndicatorView.prototype.get chart):
2663         (WI.CPUUsageIndicatorView.prototype.clear):
2664         (WI.CPUUsageIndicatorView.prototype.updateChart):
2665         Converts the CPU samples data into a RangeChart. It works to coalesce
2666         many samples of the same type into a single range to reduce total ranges.
2667
2668         * UserInterface/Views/TimelineRecordingContentView.js:
2669         (WI.TimelineRecordingContentView):
2670         (WI.TimelineRecordingContentView.prototype._recordSelected):
2671         (WI.TimelineRecordingContentView.prototype._recordWasSelected):
2672         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineOverview):
2673         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineView):
2674         * UserInterface/Views/TimelineView.js:
2675         Add a path for a TimelineView to dispatch a record selected event and cause
2676         have the TimelineRecordingContentView react to it by updating the timeline
2677         overview and relevent timeline view.
2678
2679 2019-02-26  Devin Rousso  <drousso@apple.com>
2680
2681         Web Inspector: navigation sidebar says "No Search Results" when a slow search is in progress
2682         https://bugs.webkit.org/show_bug.cgi?id=170631
2683         <rdar://problem/29473874>
2684
2685         Reviewed by Joseph Pecoraro.
2686
2687         Keep a count of all the backend commands (increment when firing, decrement when a result is
2688         sent back to the frontend). Once the count comes back to `0`, attempt to show the "No Results"
2689         placeholder, since we will have finished searching at that point. Since commands can be called
2690         as a result of other commands, using `Promise.all` isn't possible.
2691
2692         * UserInterface/Views/SearchSidebarPanel.js:
2693         (WI.SearchSidebarPanel.prototype.performSearch):
2694         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon): Deleted.
2695         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder): Deleted.
2696         Drive-by: replace `bind` calls with arrow functions, and use for-of loops.
2697
2698         * Localizations/en.lproj/localizedStrings.js:
2699
2700 2019-02-26  Devin Rousso  <drousso@apple.com>
2701
2702         Web Inspector: Canvas: if no auto-capture value is specified, don't force the input to have "0" as the value
2703         https://bugs.webkit.org/show_bug.cgi?id=194950
2704         <rdar://problem/48276798>
2705
2706         Reviewed by Joseph Pecoraro.
2707
2708         Create a getter/setter for the value of the auto-capture frame count <input> so that all
2709         code follows the same path.
2710
2711         If the <input> currently has no content and the frame count is 0, only set the placeholder.
2712
2713         * UserInterface/Views/CanvasOverviewContentView.js:
2714         (WI.CanvasOverviewContentView):
2715         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
2716         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
2717         (WI.CanvasOverviewContentView.prototype.get _recordingAutoCaptureFrameCountInputElementValue): Added.
2718         (WI.CanvasOverviewContentView.prototype.set _recordingAutoCaptureFrameCountInputElementValue): Added.
2719         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
2720         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
2721
2722 2019-02-26  Devin Rousso  <drousso@apple.com>
2723
2724         Web Inspector: Console: dragging a selection outside the selected element clears the selection
2725         https://bugs.webkit.org/show_bug.cgi?id=194660
2726         <rdar://problem/46719239>
2727
2728         Reviewed by Joseph Pecoraro.
2729
2730         * UserInterface/Views/LogContentView.js:
2731         (WI.LogContentView.prototype._mousemove):
2732         Don't clear the selection if the target of the "mousemove" is outside of the view.
2733
2734         (WI.LogContentView.prototype._updateMessagesSelection):
2735         Drive-by: clear the saved selected messages when we're just selecting a single message.
2736
2737 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
2738
2739         Web Inspector: Rename LineChart to AreaChart
2740         https://bugs.webkit.org/show_bug.cgi?id=195038
2741
2742         Rubber-stamped by Matt Baker.
2743
2744         * UserInterface/Main.html:
2745         New file names.
2746
2747         * UserInterface/Views/AreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LineChart.js.
2748         * UserInterface/Views/StackedAreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/StackedLineChart.js.
2749         Renamed.
2750
2751         * UserInterface/Views/CPUTimelineView.css:
2752         * UserInterface/Views/CPUUsageStackedView.css:
2753         * UserInterface/Views/CPUUsageStackedView.js:
2754         * UserInterface/Views/CPUUsageView.css:
2755         * UserInterface/Views/CPUUsageView.js:
2756         * UserInterface/Views/LegacyCPUTimelineView.css:
2757         * UserInterface/Views/MemoryCategoryView.css:
2758         * UserInterface/Views/MemoryCategoryView.js:
2759         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
2760         Update references.
2761
2762 2019-02-25  Devin Rousso  <drousso@apple.com>
2763
2764         Web Inspector: hovering a node inside an object preview should highlight it
2765         https://bugs.webkit.org/show_bug.cgi?id=194862
2766         <rdar://problem/48246433>
2767
2768         Reviewed by Joseph Pecoraro.
2769
2770         * UserInterface/Views/FormattedValue.js:
2771         (WI.FormattedValue.createElementForNodePreview):
2772         When provided a way to access the `WI.RemoteObject` for the given preview, add various mouse
2773         event listeners that highlight the corresponding DOM node.
2774
2775         * UserInterface/Views/ObjectPreviewView.js:
2776         (WI.ObjectPreviewView):
2777         (WI.ObjectPreviewView.prototype._initTitleElement):
2778         (WI.ObjectPreviewView.prototype._appendPropertyPreviews):
2779         (WI.ObjectPreviewView.prototype._appendValuePreview):
2780         Implement various ways of getting the `WI.RemoteObject` for a given preview.
2781          - When the preview is for the actual `WI.RemoteObject`, simply return it
2782          - If the preview is a property of the main object, get the `WI.RemoteObject` for that property
2783
2784         * UserInterface/Views/ObjectTreeView.js:
2785         (WI.ObjectTreeView):
2786         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
2787         (WI.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
2788         Pass the `WI.RemoteObject` to the preview so that it can utilize it.
2789
2790         * UserInterface/Controllers/ConsoleManager.js:
2791         (WI.ConsoleManager):
2792         (WI.ConsoleManager.prototype.releaseRemoteObjectWithConsoleClear): Added.
2793         (WI.ConsoleManager.prototype.messagesCleared): Added.
2794
2795 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
2796
2797         Web Inspector: CPU Usage Timeline - Thread Breakdown
2798         https://bugs.webkit.org/show_bug.cgi?id=194788
2799
2800         Reviewed by Devin Rousso.
2801
2802         * Localizations/en.lproj/localizedStrings.js:
2803         * UserInterface/Main.html:
2804         New strings and files.
2805
2806         * UserInterface/Views/Variables.css:
2807         (:root):
2808         New colors for cpu threads / activity breakdown.
2809
2810         * UserInterface/Models/CPUTimelineRecord.js:
2811         (WI.CPUTimelineRecord.prototype.get workers):
2812         (WI.CPUTimelineRecord):
2813         Distinguish the workers in a CPU timeline record.
2814
2815         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2816         (WI.CPUTimelineOverviewGraph):
2817         (WI.CPUTimelineOverviewGraph.prototype.layout):
2818         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2819         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect):
2820         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
2821         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
2822         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
2823         Stacked column chart for CPU in the overview graph.
2824
2825         * UserInterface/Views/CPUTimelineView.css:
2826         (.timeline-view.cpu > .content > .overview):
2827         (.timeline-view.cpu > .content > .details > .subtitle.threads):
2828         (.timeline-view.cpu > .content > .overview > .chart):
2829         (.timeline-view.cpu > .content > .overview > .chart > .subtitle):
2830         (.timeline-view.cpu > .content > .overview > .chart > .container):
2831         (.timeline-view.cpu > .content > .overview .samples,):
2832         (.timeline-view.cpu .legend):
2833         (.timeline-view.cpu .legend .row):
2834         (.timeline-view.cpu .legend .row + .row):
2835         (.timeline-view.cpu .legend .swatch):
2836         (.timeline-view.cpu .legend > .row > .swatch.sample-type-idle):
2837         (.timeline-view.cpu .legend > .row > .swatch.sample-type-script):
2838         (.timeline-view.cpu .legend > .row > .swatch.sample-type-style):
2839         (.timeline-view.cpu .legend > .row > .swatch.sample-type-layout):
2840         (.timeline-view.cpu .legend > .row > .swatch.sample-type-paint):
2841         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-idle):
2842         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script):
2843         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-style):
2844         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-layout):
2845         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-paint):
2846         (.timeline-view.cpu svg > path):
2847         (.timeline-view.cpu .main-thread svg > path,):
2848         (.timeline-view.cpu .worker-thread svg > path,):
2849         (.timeline-view.cpu .cpu-usage-view.empty):
2850         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers):
2851         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div):
2852         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div > .label):
2853         (.timeline-view.cpu > .content): Deleted.
2854         (.cpu-usage-view .line-chart > svg > path): Deleted.
2855         (.timeline-view.cpu .legend > .row > .swatch.current): Deleted.
2856         * UserInterface/Views/CPUTimelineView.js:
2857         (WI.CPUTimelineView):
2858         (WI.CPUTimelineView.displayNameForSampleType):
2859         (WI.CPUTimelineView.prototype.shown):
2860         (WI.CPUTimelineView.prototype.clear.clearUsageView):
2861         (WI.CPUTimelineView.prototype.clear):
2862         (WI.CPUTimelineView.prototype.initialLayout.createChartContainer):
2863         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
2864         (WI.CPUTimelineView.prototype.initialLayout):
2865         (WI.CPUTimelineView.prototype.layout.removeGreaterThan):
2866         (WI.CPUTimelineView.prototype.layout):
2867         (WI.CPUTimelineView.prototype.layout.layoutView):
2868         (WI.CPUTimelineView.prototype.layout.yScale):
2869         (WI.CPUTimelineView.prototype._computeSamplingData.markRecordEntries):
2870         (WI.CPUTimelineView.prototype._computeSamplingData):
2871         (WI.CPUTimelineView.prototype._removeWorkerThreadViews):
2872         (WI.CPUTimelineView.prototype._clearBreakdownLegend):
2873         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
2874         Line charts and Circle Chart for threads and breakdowns.
2875
2876         * UserInterface/Views/CPUUsageStackedView.css:
2877         (.cpu-usage-stacked-view):
2878         (.cpu-usage-stacked-view > .details):
2879         (body[dir=ltr] .cpu-usage-stacked-view > .details):
2880         (body[dir=rtl] .cpu-usage-stacked-view > .details):
2881         (.cpu-usage-stacked-view > .details > .name):
2882         (body[dir=rtl] .cpu-usage-stacked-view > .graph):
2883         (.cpu-usage-stacked-view > .graph):
2884         (.cpu-usage-stacked-view > .graph,):
2885         * UserInterface/Views/CPUUsageStackedView.js:
2886         (WI.CPUUsageStackedView):
2887         (WI.CPUUsageStackedView.prototype.get chart):
2888         (WI.CPUUsageStackedView.prototype.clear):
2889         (WI.CPUUsageStackedView.prototype.updateChart):
2890         (WI.CPUUsageStackedView.prototype._updateDetails):
2891         Same as CPUUsageView except Stacked for the total.
2892
2893         * UserInterface/Views/CPUUsageView.css:
2894         (.cpu-usage-view):
2895         (.cpu-usage-view > .details):
2896         (.cpu-usage-view > .details > .name):
2897         (.cpu-usage-view > .graph):
2898         * UserInterface/Views/CPUUsageView.js:
2899         (WI.CPUUsageView):
2900         (WI.CPUUsageView.prototype.get chart):
2901         (WI.CPUUsageView.prototype.clear):
2902         (WI.CPUUsageView.prototype.updateChart):
2903         (WI.CPUUsageView.prototype._updateDetails):
2904         Slight modifications for the new UI.
2905
2906         * UserInterface/Views/LegacyCPUTimelineView.css:
2907         (.timeline-view.legacy-cpu .cpu-usage-view .line-chart > svg > path):
2908         * UserInterface/Views/LegacyCPUTimelineView.js:
2909         (WI.LegacyCPUTimelineView.prototype.layout):
2910         Update API calls in the legacy view for minor changes.
2911
2912         * UserInterface/Views/MemoryCategoryView.css:
2913         (.memory-category-view > .details):
2914         (.memory-category-view > .details > .name):
2915         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2916         (WI.MemoryTimelineOverviewGraph.prototype.layout):
2917         * UserInterface/Views/MemoryTimelineView.css:
2918         (body .timeline-view.memory):
2919         (.timeline-view.memory): Deleted.
2920         Improvements ported from the CPU timeline views.
2921
2922         * UserInterface/Views/StackedColumnChart.js: Added.
2923         (WI.StackedColumnChart):
2924         (WI.StackedColumnChart.prototype.get size):
2925         (WI.StackedColumnChart.prototype.set size):
2926         (WI.StackedColumnChart.prototype.initializeSections):
2927         (WI.StackedColumnChart.prototype.addColumnSet):
2928         (WI.StackedColumnChart.prototype.clear):
2929         (WI.StackedColumnChart.prototype.layout):
2930         A stacked column chart implementation.
2931
2932         * UserInterface/Views/View.js:
2933         (WI.View.prototype.removeUnparentedSubview):
2934         Add a way to remove a subview that had its `element` moved
2935         someplace other than a direct child of our element.
2936
2937 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
2938
2939         Web Inspector: Dark Mode: Network Overview Graph segments have distracting white box shadow
2940         https://bugs.webkit.org/show_bug.cgi?id=194966
2941
2942         Reviewed by Devin Rousso.
2943
2944         * UserInterface/Views/Variables.css:
2945         (@media (prefers-color-scheme: dark)):
2946         Make global timeline even/odd colors where odd is the default content background
2947         color and even is slightly different. These were used in multiple places.
2948
2949         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2950         (.timeline-overview-graph.cpu > .legend):
2951         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
2952         (@media (prefers-color-scheme: dark)): Deleted.
2953         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
2954         (.timeline-overview-graph.memory > .legend):
2955         (.timeline-overview-graph.memory:nth-child(even) > .legend):
2956         (@media (prefers-color-scheme: dark)): Deleted.
2957         * UserInterface/Views/NetworkTimelineOverviewGraph.css:
2958         (.timeline-overview-graph.network > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
2959         (.timeline-overview-graph.network:nth-child(even) > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
2960         Use the variable colors now and eliminate dark mode blocks.
2961
2962 2019-02-25  Nikita Vasilyev  <nvasilyev@apple.com>
2963
2964         Web Inspector: Styles: Command-/ should toggle edited property
2965         https://bugs.webkit.org/show_bug.cgi?id=194967
2966         <rdar://problem/48329852>
2967
2968         Reviewed by Devin Rousso.
2969
2970         * UserInterface/Models/CSSProperty.js:
2971         (WI.CSSProperty.prototype.commentOut):
2972         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2973         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect):
2974         * UserInterface/Views/SpreadsheetStyleProperty.js:
2975         (WI.SpreadsheetStyleProperty.prototype.update):
2976         (WI.SpreadsheetStyleProperty.prototype._toggle):
2977         (WI.SpreadsheetStyleProperty.prototype._select):
2978
2979 2019-02-25  Devin Rousso  <drousso@apple.com>
2980
2981         Web Inspector: REGRESSION(r242018): Timelines shows no results
2982         https://bugs.webkit.org/show_bug.cgi?id=195017
2983
2984         Reviewed by Joseph Pecoraro.
2985
2986         `simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
2987
2988         * UserInterface/Base/SearchUtilities.js:
2989         (WI.SearchUtilities.prototype.regExpForString):
2990         Add assertions that the provided search query is a valid non-empty string.
2991
2992         * UserInterface/Views/DataGrid.js:
2993         (WI.DataGrid.prototype._updateFilter):
2994         If the search query is empty, don't attempt to create a `RegExp` for it.
2995
2996 2019-02-25  Matt Baker  <mattbaker@apple.com>
2997
2998         Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
2999         https://bugs.webkit.org/show_bug.cgi?id=194918
3000         <rdar://problem/48289314>
3001
3002         Reviewed by Devin Rousso.
3003
3004         * UserInterface/Views/Table.js:
3005         (WI.Table.prototype.selectionControllerSelectionDidChange):
3006
3007         * UserInterface/Views/TreeOutline.js:
3008         (WI.TreeOutline.prototype._treeKeyDown):
3009
3010 2019-02-25  Devin Rousso  <drousso@apple.com>
3011
3012         Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
3013         https://bugs.webkit.org/show_bug.cgi?id=183420
3014
3015         Reviewed by Joseph Pecoraro.
3016
3017         * UserInterface/Views/SourcesNavigationSidebarPanel.js: Added.
3018         (WI.SourcesNavigationSidebarPanel):
3019         (WI.SourcesNavigationSidebarPanel.shouldPlaceResourcesAtTopLevel):
3020         (WI.SourcesNavigationSidebarPanel.prototype.get minimumWidth):
3021         (WI.SourcesNavigationSidebarPanel.prototype.closed):
3022         (WI.SourcesNavigationSidebarPanel.prototype.showDefaultContentView):
3023         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
3024         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
3025         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
3026         (WI.SourcesNavigationSidebarPanel.prototype.resetFilter):
3027         (WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
3028         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
3029         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
3030         (WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
3031         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
3032         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
3033         (WI.SourcesNavigationSidebarPanel.prototype._addTarget):
3034         (WI.SourcesNavigationSidebarPanel.prototype._findCallStackTargetTreeElement):
3035         (WI.SourcesNavigationSidebarPanel.prototype._updateCallStackTreeOutline):
3036         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
3037         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
3038         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
3039         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
3040         (WI.SourcesNavigationSidebarPanel.prototype._addDebuggerTreeElementForSourceCode):
3041         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
3042         (WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements):
3043         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
3044         (WI.SourcesNavigationSidebarPanel.prototype._removeBreakpoint):
3045         (WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
3046         (WI.SourcesNavigationSidebarPanel.prototype._toggleAllBreakpoints):
3047         (WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
3048         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
3049         (WI.SourcesNavigationSidebarPanel.prototype._removeDebuggerTreeElement):
3050         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
3051         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
3052         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
3053         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
3054         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonGotoArrow):
3055         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
3056         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceTypeScopeBarSelectionChanged):
3057         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
3058         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
3059         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked):
3060         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
3061         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceAdded):
3062         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
3063         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointAdded):
3064         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointRemoved):
3065         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointsEnabledDidChange):
3066         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptAdded):
3067         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
3068         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptsCleared):
3069         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
3070         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
3071         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
3072         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerActiveCallFrameDidChange):
3073         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerWaitingToPause):
3074         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
3075         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateDidChange):
3076         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleIssueAdded):
3077         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleCleared):
3078         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
3079         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
3080         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
3081         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetAdded):
3082         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetRemoved):
3083         (WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
3084         * UserInterface/Views/SourcesNavigationSidebarPanel.css: Added.
3085         (.sidebar > .panel.navigation.sources > .content):
3086         (.sidebar > .panel.navigation.sources > .navigation-bar):
3087         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints):
3088         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated):
3089         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume):
3090         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated):
3091         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
3092         (.sidebar > .panel.navigation.sources > .content > .details-section):
3093         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
3094         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
3095         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)):
3096         (.sidebar > .panel.navigation.sources > .content > .navigation-bar):
3097         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread):
3098         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread):
3099         (@media (prefers-dark-interface) .sidebar > > .content > .panel.navigation.sources .warning-banner):
3100
3101         * UserInterface/Views/SourcesTabContentView.js: Added.
3102         (WI.SourcesTabContentView):
3103         (WI.SourcesTabContentView.tabInfo):
3104         (WI.SourcesTabContentView.isTabAllowed):
3105         (WI.SourcesTabContentView.prototype.get type):
3106         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
3107         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
3108         (WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
3109         (WI.SourcesTabContentView.prototype.showScopeChainDetailsSidebarPanel):
3110         (WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint):
3111
3112         * UserInterface/Views/CanvasSidebarPanel.js:
3113         (WI.CanvasSidebarPanel):
3114         * UserInterface/Views/DebuggerSidebarPanel.js:
3115         (WI.DebuggerSidebarPanel):
3116         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
3117         * UserInterface/Views/NavigationSidebarPanel.js:
3118         (WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
3119         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
3120         (WI.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
3121         Rework `createContentTreeOutline` to allow for additional symbols.
3122         Add another symbol to ensure that the `WI.TreeOutline` is not used for cookie restoration.
3123
3124         * UserInterface/Protocol/InspectorFrontendAPI.js:
3125         (InspectorFrontendAPI.showResources):
3126         * UserInterface/Views/ContextMenuUtilities.js:
3127         (WI.appendContextMenuItemsForURL):
3128         * UserInterface/Views/DefaultDashboardView.js:
3129         (WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
3130         * UserInterface/Views/SourceCodeTextEditor.js:
3131         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
3132
3133         * UserInterface/Views/TabBrowser.js:
3134         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
3135
3136         * UserInterface/Base/Main.js:
3137         (WI.contentLoaded):
3138         (WI.showSourcesTab): Added.
3139         (WI.isShowingSourcesTab): Added.
3140         (WI.tabContentViewClassForRepresentedObject):
3141         (WI._debuggerDidPause):
3142
3143         * UserInterface/Views/DebuggerTabContentView.js:
3144         (WI.DebuggerTabContentView.isTabAllowed):
3145         * UserInterface/Views/ResourcesTabContentView.js:
3146         (WI.ResourcesTabContentView.isTabAllowed):
3147
3148         * UserInterface/Base/Setting.js:
3149         * UserInterface/Views/SettingsTabContentView.js:
3150         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3151
3152         * UserInterface/Main.html:
3153         * UserInterface/Images/Sources.svg: Added.
3154         * Localizations/en.lproj/localizedStrings.js:
3155
3156 2019-02-24  Devin Rousso  <drousso@apple.com>
3157
3158         Web Inspector: Change the InspectorOverlay to use native rather than canvas
3159         https://bugs.webkit.org/show_bug.cgi?id=105023
3160         <rdar://problem/13443692>
3161
3162         Reviewed by Brian Burg.
3163
3164         * UserInterface/Base/Main.js:
3165         (WI.initializeTarget):
3166
3167         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
3168         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
3169         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
3170         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
3171         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
3172         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
3173         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
3174         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
3175         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
3176         * Versions/Inspector-iOS-10.0.json:
3177         * Versions/Inspector-iOS-10.3.json:
3178         * Versions/Inspector-iOS-11.0.json:
3179         * Versions/Inspector-iOS-11.3.json:
3180         * Versions/Inspector-iOS-12.0.json:
3181         * Versions/Inspector-iOS-12.2.json:
3182         * Versions/Inspector-iOS-8.0.json:
3183         * Versions/Inspector-iOS-9.0.json:
3184         * Versions/Inspector-iOS-9.3.json:
3185         Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.
3186
3187 2019-02-24  Devin Rousso  <drousso@apple.com>
3188
3189         Web Inspector: provide a way to make searches case sensitive or use a regular expression
3190         https://bugs.webkit.org/show_bug.cgi?id=192527
3191
3192         Reviewed by Joseph Pecoraro.
3193
3194         * UserInterface/Base/SearchUtilities.js: Added.
3195         (WI.SearchUtilities.get defaultSettings):
3196         (WI.SearchUtilities.createSettings):
3197         (WI.SearchUtilities.regExpForString):
3198         (WI.SearchUtilities.createSettingsButton):
3199         (WI.SearchUtilities.createSettingsButton.toggleActive):
3200         * UserInterface/Views/Main.css:
3201         (.search-settings): Added.
3202         (.search-settings > .glyph): Added.
3203         (.search-settings:active > .glyph): Added.
3204         (.search-settings.active > .glyph): Added.
3205         (.search-settings:active.active > .glyph): Added.
3206         Create static utility class for handling settings related to searching/filtering.
3207
3208         * UserInterface/Base/Setting.js:
3209         * UserInterface/Views/SettingsTabContentView.js:
3210         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
3211         Create default search settings that apply across WebInspector, unless a more specific
3212         setting has been created that overrides it (e.g. the navigation sidebar or Search tab).
3213
3214         * UserInterface/Views/SearchSidebarPanel.js:
3215         (WI.SearchSidebarPanel):
3216         (WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
3217         (WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
3218         (WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
3219         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
3220         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts):
3221         (WI.SearchSidebarPanel.prototype.performSearch.domSearchResults):
3222         (WI.SearchSidebarPanel.prototype.performSearch.domCallback):
3223         (WI.SearchSidebarPanel.prototype.performSearch):
3224         * UserInterface/Views/SearchSidebarPanel.css:
3225         (.sidebar > .panel.navigation.search > .search-bar):
3226         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
3227         Add a (*) settings "gear" after each `<input type="search">` that shows a contextmenu with
3228         checkboxes for each search setting. Any settings changed for each input take precedence over
3229         the default settings, but will match the corresponding default setting if it's changed.
3230
3231         * UserInterface/Views/SearchResultTreeElement.js:
3232         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
3233         Use the length of the found text, rather than the length of the query.
3234
3235         * UserInterface/Views/DOMTreeElement.js:
3236         (WI.DOMTreeElement.prototype._highlightSearchResults):
3237         * UserInterface/Views/DataGrid.js:
3238         (WI.DataGrid.prototype._updateFilter):
3239         * UserInterface/Views/LogContentView.js:
3240         (WI.LogContentView.prototype.performSearch):
3241         * UserInterface/Views/NetworkTableContentView.js:
3242         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
3243         * UserInterface/Views/ResourceHeadersContentView.js:
3244         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
3245         * UserInterface/Views/ResourceSecurityContentView.js:
3246         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
3247         * UserInterface/Views/SourceCodeTextEditor.js:
3248         (WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
3249         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
3250         * UserInterface/Views/TextEditor.js:
3251         (WI.TextEditor.prototype.performSearch):
3252         Use the default search settings when searching/filtering.
3253
3254         * UserInterface/Views/SearchBar.css:
3255         (.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Added.
3256         Drive-by: prevent the (x) from appearing when no text has been entered.
3257
3258         * Localizations/en.lproj/localizedStrings.js:
3259         * UserInterface/Main.html:
3260
3261 2019-02-24  Devin Rousso  <drousso@apple.com>
3262
3263         Web Inspector: make debounce Proxy into its own class
3264         https://bugs.webkit.org/show_bug.cgi?id=194721
3265
3266         Reviewed by Joseph Pecoraro.
3267
3268         The `debounce`/`throttle` functions leveraged a `Proxy` to intercept the function call and
3269         replace it with a "delayed" version. The issue with this is that it set the identifier for
3270         the timer on the function itself, which is shared across all instances of a given class.
3271         When different instances call the same delayed function, they'd clobber eachother's attempts
3272         to delay work.
3273
3274         * UserInterface/Base/Debouncer.js: Added.
3275         (Debouncer):
3276         (Debouncer.prototype.force):
3277         (Debouncer.prototype.delayForTime):
3278         (Debouncer.prototype.delayForFrame):
3279         (Debouncer.prototype.delayForMicrotask):
3280         (Debouncer.prototype.cancel):
3281         (Debouncer.prototype._execute):
3282         * UserInterface/Base/Throttler.js: Added.
3283         (Throttler):
3284         (Throttler.prototype.force):
3285         (Throttler.prototype.fire):
3286         (Throttler.prototype.cancel):
3287         (Throttler.prototype._execute):
3288         * UserInterface/Base/Utilities.js:
3289
3290         * UserInterface/Views/BezierEditor.js:
3291         (WI.BezierEditor):
3292         * UserInterface/Views/ContentBrowser.js:
3293         (WI.ContentBrowser):
3294         (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
3295         (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
3296         (WI.ContentBrowser.prototype._currentContentViewDidChange):
3297         (WI.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Deleted.
3298         * UserInterface/Views/DOMTreeUpdater.js:
3299         (WI.DOMTreeUpdater):
3300         (WI.DOMTreeUpdater.prototype._nodeAttributeModified):
3301         (WI.DOMTreeUpdater.prototype._nodeInserted):
3302         (WI.DOMTreeUpdater.prototype._nodeRemoved):
3303         * UserInterface/Views/NavigationSidebarPanel.js:
3304         (WI.NavigationSidebarPanel):
3305         (WI.NavigationSidebarPanel.prototype.closed):
3306         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
3307         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
3308         (WI.NavigationSidebarPanel.prototype.updateFilter):
3309         (WI.NavigationSidebarPanel.prototype.shown):