Web Inspector: DOM: dragging a node to the console should log the node
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-05-03  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: DOM: dragging a node to the console should log the node
4         https://bugs.webkit.org/show_bug.cgi?id=197330
5
6         Reviewed by Timothy Hatcher.
7
8         * UserInterface/Views/DOMTreeOutline.js:
9         (WI.DOMTreeOutline.prototype._ondragstart):
10         * UserInterface/Views/LogContentView.js:
11         (WI.LogContentView):
12         (WI.LogContentView.prototype._handleDragOver): Added.
13         (WI.LogContentView.prototype._handleDrop): Added.
14         * UserInterface/Views/QuickConsole.js:
15         (WI.QuickConsole):
16         (WI.QuickConsole.prototype._handleDragOver): Added.
17         (WI.QuickConsole.prototype._handleDrop): Added.
18
19         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
20         Drive-by: update the format to be more unique.
21
22         * Localizations/en.lproj/localizedStrings.js:
23
24 2019-05-03  Devin Rousso  <drousso@apple.com>
25
26         Web Inspector: DOM: rename "low power" to "display composited"
27         https://bugs.webkit.org/show_bug.cgi?id=197296
28
29         Reviewed by Joseph Pecoraro.
30
31         Removed specific ChangeLog entries since it is almost entirely mechanical changes.
32
33         * UserInterface/Protocol/DOMObserver.js:
34         * UserInterface/Controllers/DOMManager.js:
35         * UserInterface/Controllers/TimelineManager.js:
36         * UserInterface/Models/DOMNode.js:
37         * UserInterface/Models/MediaInstrument.js:
38         * UserInterface/Models/MediaTimelineRecord.js:
39         * UserInterface/Models/TimelineRecording.js:
40         * UserInterface/Views/DOMEventsBreakdownView.js:
41         * UserInterface/Views/DOMEventsBreakdownView.css:
42         * UserInterface/Views/NetworkTableContentView.js:
43         * UserInterface/Views/NetworkTableContentView.css:
44         * UserInterface/Views/TimelineIcons.css:
45         * UserInterface/Views/TimelineTabContentView.js:
46         * UserInterface/Images/PowerEfficientPlaybackStateChanged.svg: Added.
47         * UserInterface/Images/LowPower.svg: Removed.
48         * Localizations/en.lproj/localizedStrings.js:
49
50 2019-05-03  Devin Rousso  <drousso@apple.com>
51
52         Web Inspector: Record actions performed on WebGL2RenderingContext
53         https://bugs.webkit.org/show_bug.cgi?id=176008
54         <rdar://problem/34213884>
55
56         Reviewed by Joseph Pecoraro.
57
58         * UserInterface/Models/Recording.js:
59         (WI.Recording.fromPayload):
60         (WI.Recording.displayNameForSwizzleType):
61         (WI.Recording.prototype.async swizzle):
62         (WI.Recording.prototype.createContext):
63
64         * UserInterface/Models/RecordingAction.js:
65         (WI.RecordingAction.constantNameForParameter):
66         (WI.RecordingAction._prototypeForType):
67         (WI.RecordingAction.prototype.async swizzle):
68         Treat all actions with a snapshot as being a "visible" action.
69
70         * UserInterface/Views/CanvasTabContentView.css:
71         (.content-view.tab.canvas .navigation-bar > .item .canvas:matches(.webgl, .webgl2, .webgpu, .webmetal) .icon): Added.
72         (.content-view.tab.canvas .navigation-bar > .item .canvas.webgl): Deleted.
73         * UserInterface/Views/CanvasContentView.js:
74         (WI.CanvasContentView.prototype.initialLayout):
75         * UserInterface/Views/CanvasSidebarPanel.js:
76         (WI.CanvasSidebarPanel.prototype.shown):
77         (WI.CanvasSidebarPanel.prototype._canvasChanged):
78         (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
79
80         * UserInterface/Views/RecordingContentView.js:
81         (WI.RecordingContentView):
82         (WI.RecordingContentView.prototype.get navigationItems):
83         (WI.RecordingContentView.prototype.shown):
84         (WI.RecordingContentView.prototype.initialLayout):
85         * UserInterface/Views/RecordingActionTreeElement.js:
86         (WI.RecordingActionTreeElement._generateDOM.createParameterElement):
87
88 2019-05-02  Nikita Vasilyev  <nvasilyev@apple.com>
89
90         Web Inspector: Dark Mode: borders between section should be lighter than background
91         https://bugs.webkit.org/show_bug.cgi?id=197551
92
93         Reviewed by Joseph Pecoraro.
94
95         * UserInterface/Views/DetailsSection.css:
96         (.details-section .details-section):
97
98 2019-04-29  Alex Christensen  <achristensen@webkit.org>
99
100         <rdar://problem/50299396> Fix internal High Sierra build
101         https://bugs.webkit.org/show_bug.cgi?id=197388
102
103         * Configurations/Base.xcconfig:
104
105 2019-04-26  Jessie Berlin  <jberlin@webkit.org>
106
107         Add new mac target numbers
108         https://bugs.webkit.org/show_bug.cgi?id=197313
109
110         Reviewed by Alex Christensen.
111
112         * Configurations/Version.xcconfig:
113
114 2019-04-25  Alex Christensen  <achristensen@webkit.org>
115
116         Start using C++17
117         https://bugs.webkit.org/show_bug.cgi?id=197131
118
119         Reviewed by Darin Adler.
120
121         * Configurations/Base.xcconfig:
122
123 2019-04-24  Nikita Vasilyev  <nvasilyev@apple.com>
124
125         Web Inspector: Styles: don't start property selection when pressing right mouse button
126         https://bugs.webkit.org/show_bug.cgi?id=197242
127         <rdar://problem/50180380>
128
129         Reviewed by Timothy Hatcher.
130
131         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
132         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
133
134 2019-04-24  Devin Rousso  <drousso@apple.com>
135
136         Web Inspector: Network: importing a HAR with an active detail view shows no content
137         https://bugs.webkit.org/show_bug.cgi?id=197223
138
139         Reviewed by Timothy Hatcher.
140
141         When hiding the detail view, we force a `layout` of the Network table, which causes the
142         cached row count to be set to `0`, which prevents the `reloadDataAddedToEndOnly` from
143         rendering anything since the `WI.Table` thinks it has no rows.
144
145         Given that all of the users of `WI.Table` are backed by an array, we don't need to cache the
146         number of rows since `.length` is an extremely cheap operation. In turn, this guarantees
147         that we are always rendering with an accurate value.
148
149         * UserInterface/Views/Table.js:
150         (WI.Table):
151         (WI.Table.prototype.get numberOfRows):
152         (WI.Table.prototype.reloadData):
153         (WI.Table.prototype._removeRows):
154
155 2019-04-23  Devin Rousso  <drousso@apple.com>
156
157         Web Inspector: REGRESSION(r238168): Network: preserve log doesn't show main frame main resource changes
158         https://bugs.webkit.org/show_bug.cgi?id=197220
159         <rdar://problem/49960464>
160
161         Reviewed by Timothy Hatcher.
162
163         * UserInterface/Views/NetworkTableContentView.js:
164         (WI.NetworkTableContentView.prototype.reset):
165         (WI.NetworkTableContentView.prototype._addCollection):
166         (WI.NetworkTableContentView.prototype._resetCollection): Added.
167         (WI.NetworkTableContentView.prototype._changeCollection):
168         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
169         We want to add the frame's main resource in the case that it's the main frame, but we also
170         want to clear the main collection of data (e.g. if viewing an imported HAR).
171         Drive-by: `_groupByDOMNodeNavigationItem` was renamed in a previous patch.
172
173 2019-04-23  Devin Rousso  <drousso@apple.com>
174
175         Web Inspector: Network: support drag/drop for importing
176         https://bugs.webkit.org/show_bug.cgi?id=197221
177
178         Reviewed by Timothy Hatcher.
179
180         * UserInterface/Views/NetworkTabContentView.js:
181         (WI.NetworkTabContentView.prototype.async.handleFileDrop): Added.
182         * UserInterface/Views/NetworkTableContentView.js:
183         (WI.NetworkTableContentView.prototype.processHAR): Added.
184         (WI.NetworkTableContentView.prototype._importHAR):
185
186         * UserInterface/Base/FileUtilities.js:
187         (WI.FileUtilities.async readText):
188         Only `await` if the result is a `Promise`.
189
190 2019-04-23  Devin Rousso  <drousso@apple.com>
191
192         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocument.frameIdentifier')
193         https://bugs.webkit.org/show_bug.cgi?id=196420
194         <rdar://problem/49444205>
195
196         Reviewed by Timothy Hatcher.
197
198         * UserInterface/Models/DOMNode.js:
199         (WI.DOMNode):
200         (WI.DOMNode.prototype.get frame): Added.
201         (WI.DOMNode.prototype.get frameIdentifier): Deleted.
202         Modify the existing `frameId` to represent the owner frame of the node, rather than the
203         frame it holds (in the case of an `<iframe>`).
204
205         * UserInterface/Controllers/DOMDebuggerManager.js:
206         (WI.DOMDebuggerManager.prototype.domBreakpointsForNode):
207         (WI.DOMDebuggerManager.prototype._detachDOMBreakpoint):
208         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
209         (WI.DOMDebuggerManager.prototype._nodeInserted):
210         (WI.DOMDebuggerManager.prototype._nodeRemoved):
211         * UserInterface/Views/DOMTreeElement.js:
212         (WI.DOMTreeElement.prototype._populateTagContextMenu):
213         (WI.DOMTreeElement.prototype._buildAttributeDOM):
214         * UserInterface/Views/QuickConsole.js:
215         (WI.QuickConsole.prototype._selectExecutionContext):
216         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
217         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._highlightNodesWithSelector):
218
219 2019-04-23  Devin Rousso  <drousso@apple.com>
220
221         Web Inspector: Canvas: no obvious way of switching to the overview when viewing an imported recording
222         https://bugs.webkit.org/show_bug.cgi?id=197178
223         <rdar://problem/50106641>
224
225         Reviewed by Timothy Hatcher.
226
227         Expand the idea of "imported" recordings to include "saved" recordings, ones whose
228         underlying <canvas> was destroyed.
229
230         * UserInterface/Views/CanvasTabContentView.js:
231         (WI.CanvasTabContentView):
232         (WI.CanvasTabContentView.prototype.attached):
233         (WI.CanvasTabContentView.prototype._removeCanvas):
234         (WI.CanvasTabContentView.prototype._addRecording):
235         (WI.CanvasTabContentView.prototype._handleRecordingSavedOrStopped): Added.
236         (WI.CanvasTabContentView.prototype.initialLayout): Deleted.
237         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped): Deleted.
238         Make the "Saved Recordings" folder a child of the "Overview" so that the "Overview" path
239         component is always visible/clickable.
240
241         * UserInterface/Views/CanvasOverviewContentView.js:
242         (WI.CanvasOverviewContentView):
243         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
244         (WI.CanvasOverviewContentView.prototype.attached):
245         (WI.CanvasOverviewContentView.prototype.detached):
246         (WI.CanvasOverviewContentView.prototype._addSavedRecording): Added.
247         (WI.CanvasOverviewContentView.prototype._handleRecordingSaved): Added.
248         (WI.CanvasOverviewContentView.prototype._handleSavedRecordingClicked): Added.
249         * UserInterface/Views/CanvasOverviewContentView.css:
250         (.content-view.canvas-overview .content-view.canvas.saved-recordings): Added.
251         (.content-view.canvas-overview .content-view.canvas.saved-recordings .tree-outline): Added.
252         (.content-view.canvas-overview .content-view.canvas.saved-recordings .tree-outline > .item.recording > .icon): Added.
253         Add a card for "Saved Recordings" that mimics the style of regular canvas cards.
254
255         * UserInterface/Controllers/CanvasManager.js:
256         (WI.CanvasManager):
257         (WI.CanvasManager.prototype.get savedRecordings): Added.
258         (WI.CanvasManager.prototype.async processJSON):
259         (WI.CanvasManager.prototype.disable):
260         (WI.CanvasManager.prototype._removeCanvas):
261         (WI.CanvasManager.prototype.get importedRecordings): Deleted.
262
263         * Localizations/en.lproj/localizedStrings.js:
264
265 2019-04-22  Devin Rousso  <drousso@apple.com>
266
267         Web Inspector: REGRESSION: Sources: auto-continue breakpoint triangle is incorrectly positioned
268         https://bugs.webkit.org/show_bug.cgi?id=197179
269
270         Reviewed by Joseph Pecoraro.
271
272         * UserInterface/Views/BreakpointTreeElement.css:
273         (.item.breakpoint .status): Added.
274         (.item.breakpoint .status > .status-image.auto-continue::after):
275
276 2019-04-19  Devin Rousso  <drousso@apple.com>
277
278         Web Inspector: Timelines: CPU: remove extra border under last section
279         https://bugs.webkit.org/show_bug.cgi?id=197120
280
281         Reviewed by Joseph Pecoraro.
282
283         * UserInterface/Views/CPUTimelineView.css:
284         (.timeline-view.cpu > .content > .overview):
285         (.timeline-view.cpu > .content > .overview:not(:last-child)): Added.
286
287 2019-04-19  Devin Rousso  <drousso@apple.com>
288
289         Web Inspector: Timelines: adjust default Media timeline column widths
290         https://bugs.webkit.org/show_bug.cgi?id=197114
291
292         Reviewed by Joseph Pecoraro.
293
294         * UserInterface/Views/MediaTimelineView.js:
295         (WI.MediaTimelineView):
296
297 2019-04-18  Devin Rousso  <drousso@apple.com>
298
299         Web Inspector: REGRESSION (r244155): pressing down expands folders in trees
300         https://bugs.webkit.org/show_bug.cgi?id=197051
301         <rdar://problem/50006414>
302
303         Reviewed by Timothy Hatcher.
304
305         * UserInterface/Views/TreeOutline.js:
306         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
307         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
308         Skip hidden items when traversing the tree.
309
310         * UserInterface/Views/DOMTreeOutline.js:
311         (WI.DOMTreeOutline.prototype.ondelete):
312         Reveal all items about to be deleted so that the above change won't skip any siblings.
313
314 2019-04-18  Devin Rousso  <drousso@apple.com>
315
316         Web Inspector: Canvas: enable WebGL2 for inspector page
317         https://bugs.webkit.org/show_bug.cgi?id=196932
318         <rdar://problem/49916213>
319
320         Reviewed by Timothy Hatcher.
321
322         * UserInterface/Models/RecordingAction.js:
323         (WI.RecordingAction._prototypeForType):
324         (WI.RecordingAction.prototype.process.getContent):
325         Add additional checks for `ImageBitmapRenderingContext` and `WebGLRenderingContext`.
326
327 2019-04-17  Nikita Vasilyev  <nvasilyev@apple.com>
328
329         Web Inspector: Navigating to resource sometimes shows different resource
330         https://bugs.webkit.org/show_bug.cgi?id=195978
331         <rdar://problem/49043191>
332
333         Reviewed by Timothy Hatcher.
334
335         * UserInterface/Views/NavigationSidebarPanel.js:
336         (WI.NavigationSidebarPanel.prototype.cancelRestoringState):
337         Reset _pendingViewStateCookie so _checkElementsForPendingViewStateCookie could exit early.
338
339         * UserInterface/Views/ResourceSidebarPanel.js:
340         (WI.ResourceSidebarPanel.prototype.initialLayout):
341         (WI.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
342         (WI.ResourceSidebarPanel.prototype._createMainFrameTreeElement):
343         Don't try to change content view on initialLayout.
344
345 2019-04-17  Joseph Pecoraro  <pecoraro@apple.com>
346
347         Web Inspector: CPU Usage Timeline - Include # of Network Requests in the Statistics section
348         https://bugs.webkit.org/show_bug.cgi?id=197039
349         <rdar://problem/49996299>
350
351         Reviewed by Timothy Hatcher.
352
353         * Localizations/en.lproj/localizedStrings.js:
354         * UserInterface/Views/CPUTimelineView.js:
355         (WI.CPUTimelineView.prototype.initialLayout):
356         (WI.CPUTimelineView.prototype._computeStatisticsData):
357         (WI.CPUTimelineView.prototype._clearStatistics):
358         Add the number of network requests started in the selected range.
359
360 2019-04-17  Timothy Hatcher  <timothy@apple.com>
361
362         Rename `supported-color-schemes` to `color-scheme`.
363         https://bugs.webkit.org/show_bug.cgi?id=197016
364         rdar://problem/49980259
365
366         Reviewed by Simon Fraser.
367
368         * UserInterface/Views/Main.css:
369         (:root):
370
371 2019-04-17  Devin Rousso  <drousso@apple.com>
372
373         Web Inspector: Canvas: imported recordings aren't processed when the navigation sidebar is collapsed
374         https://bugs.webkit.org/show_bug.cgi?id=196921
375         <rdar://problem/49910815>
376
377         Reviewed by Timothy Hatcher.
378
379         * UserInterface/Views/RecordingContentView.js:
380         (WI.RecordingContentView.prototype.initialLayout):
381
382 2019-04-17  Joseph Pecoraro  <pecoraro@apple.com>
383
384         Web Inspector: Extension scripts with parse errors do not show up in Web Inspector
385         https://bugs.webkit.org/show_bug.cgi?id=196996
386         <rdar://problem/47054804>
387
388         Reviewed by Devin Rousso.
389
390         * UserInterface/Controllers/DebuggerManager.js:
391         (WI.DebuggerManager.prototype.scriptDidFail):
392         Create a LocalScript that can be linked to but ignore it
393         if we already have a Resource for the URL.
394
395         * UserInterface/Protocol/DebuggerObserver.js:
396         (WI.DebuggerObserver.prototype.scriptFailedToParse):
397         Let DebuggerManager potentially create a script for this.
398
399         * UserInterface/Models/Script.js:
400         (WI.Script):
401         Local scripts provide a null id and id is not required below.
402
403 2019-04-16  Joseph Pecoraro  <pecoraro@apple.com>
404
405         Web Inspector: Worker imported scripts not showing up in Open Quickly dialog if inspector open after workers exist
406         https://bugs.webkit.org/show_bug.cgi?id=196986
407
408         Reviewed by Devin Rousso.
409
410         * UserInterface/Views/OpenResourceDialog.js:
411         (WI.OpenResourceDialog.prototype._addScriptsForTarget):
412         We were unnecessary skipping Scripts that do not have a sourceURL but do
413         have a URL, which ends up being Worker populated scripts.
414
415 2019-04-16  Joseph Pecoraro  <pecoraro@apple.com>
416
417         REGRESSION(r238168) Web Inspector: <iframe src=...> request does not show up in Network Tab
418         https://bugs.webkit.org/show_bug.cgi?id=193505
419         <rdar://problem/47325957>
420
421         Reviewed by Devin Rousso.
422
423         * UserInterface/Views/NetworkTableContentView.js:
424         (WI.NetworkTableContentView):
425         (WI.NetworkTableContentView.prototype._handleFrameWasAdded):
426         Handle new frames by adding the frame's main resource.
427
428 2019-04-16  Devin Rousso  <drousso@apple.com>
429
430         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.selectionPathComponents')
431         https://bugs.webkit.org/show_bug.cgi?id=196936
432         <rdar://problem/49917789>
433
434         Reviewed by Joseph Pecoraro.
435
436         * UserInterface/Views/HeapAllocationsTimelineView.js:
437         (WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
438         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
439         (WI.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
440         Drive-by: when selecting a record, force it to be visible before selecting it, as otherwise
441         the selection events won't be fired.
442
443         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
444         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
445         Drive-by: ensure that clicking on a [S] heap snapshot record icon actually selects the record.
446
447 2019-04-16  Devin Rousso  <drousso@apple.com>
448
449         Unprefix -webkit-sticky
450         https://bugs.webkit.org/show_bug.cgi?id=196962
451         <rdar://problem/40903458>
452
453         Reviewed by Simon Fraser.
454
455         Replace all `-webkit-sticky` with `sticky`.
456
457         * UserInterface/Models/CSSKeywordCompletions.js:
458         * UserInterface/Views/AuditTestCaseContentView.css:
459         (.content-view-container > .content-view.audit-test-case > header):
460         * UserInterface/Views/AuditTestGroupContentView.css:
461         (.content-view.audit-test-group.contains-test-case > header):
462         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
463         (.changes-panel .resource-section > .header):
464         * UserInterface/Views/DetailsSection.css:
465         (.details-section > .header):
466         * UserInterface/Views/NetworkDetailView.css:
467         (.network-detail .navigation-bar):
468         * UserInterface/Views/SettingsTabContentView.css:
469         (.content-view.settings .navigation-bar):
470         * UserInterface/Views/Table.css:
471         (.table > .header):
472
473 2019-04-16  Devin Rousso  <drousso@apple.com>
474
475         Web Inspector: remove unused WI.DOMTreeDataGrid
476         https://bugs.webkit.org/show_bug.cgi?id=196958
477         <rdar://problem/49931383>
478
479         Reviewed by Joseph Pecoraro.
480
481         * UserInterface/Views/DOMTreeDataGrid.css: Removed.
482         * UserInterface/Views/DOMTreeDataGrid.js: Removed.
483         * UserInterface/Views/DOMTreeDataGridNode.js: Removed.
484         * UserInterface/Main.html:
485
486 2019-04-16  Devin Rousso  <drousso@apple.com>
487
488         Web Inspector: Storage: values truncated in Local/Session table
489         https://bugs.webkit.org/show_bug.cgi?id=178318
490         <rdar://problem/34998581>
491
492         Reviewed by Joseph Pecoraro.
493
494         * UserInterface/Views/DataGrid.js:
495         (WI.DataGrid):
496         (WI.DataGrid.prototype._copyTextForDataGridNode):
497         * UserInterface/Views/TimelineDataGrid.js:
498         (WI.TimelineDataGrid):
499         Refactor `WI.DataGrid` constructor to allow for more optional arguments.
500         Introduce a new optional argument `copyCallback` that can be used to override the text that
501         would be copied for any `WI.DataGridNode` in any column.
502
503         * UserInterface/Views/DOMStorageContentView.js:
504         (WI.DOMStorageContentView):
505         (WI.DOMStorageContentView.prototype.itemAdded):
506         (WI.DOMStorageContentView.prototype.itemUpdated):
507         (WI.DOMStorageContentView.prototype._populate):
508         (WI.DOMStorageContentView.prototype._dataGridCopy): Added.
509         Save the full non-truncated value as part of the `WI.DataGridNode`'s `data`. When copying,
510         use the full non-truncated value instead of what was shown in the DOM.
511
512 2019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
513
514         Web Inspector: DOM Nodes should not show $0 when selected in Console area
515         https://bugs.webkit.org/show_bug.cgi?id=196953
516
517         Reviewed by Devin Rousso.
518
519         * UserInterface/Views/DOMTreeContentView.js:
520         (WI.DOMTreeContentView):
521         Enable showing the last selected element.
522
523         * UserInterface/Views/DOMTreeOutline.js:
524         Make parameters explicit. Drop "selectable" which was always true.
525         And add a new option for adding a class name.
526
527         * UserInterface/Views/DOMTreeOutline.css:
528         (.tree-outline.dom.show-last-selected li.last-selected > span::after):
529         (.tree-outline.dom.show-last-selected:focus li.last-selected > span::after):
530         Only show the "= $0" for a DOM tree that has enabled showing the last selected element.
531
532         * UserInterface/Views/FormattedValue.css:
533         (.formatted-node > .tree-outline.dom li.selected .selection-area):
534         Don't show the selection-area for a console formatted node.
535
536 2019-04-15  Devin Rousso  <drousso@apple.com>
537
538         Web Inspector: update sheet rect whenever inspector window size changes
539         https://bugs.webkit.org/show_bug.cgi?id=196942
540         <rdar://problem/49920241>
541
542         Reviewed by Joseph Pecoraro.
543
544         * UserInterface/Base/Main.js:
545         (WI.contentLoaded):
546         (WI._windowResized):
547         (WI._updateSheetRect): Added.
548
549 2019-04-15  Nikita Vasilyev  <nvasilyev@apple.com>
550
551         Unreviewed, fix typo in a comment.
552
553         * UserInterface/Views/SearchSidebarPanel.js:
554         (WI.SearchSidebarPanel.prototype.performSearch):
555
556 2019-04-15  Devin Rousso  <drousso@apple.com>
557
558         Web Inspector: Heap: don't use recursion when calculating root paths
559         https://bugs.webkit.org/show_bug.cgi?id=196890
560         <rdar://problem/49870751>
561
562         Reviewed by Joseph Pecoraro.
563
564         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
565         (HeapSnapshot.prototype.shortestGCRootPath):
566         (HeapSnapshot.prototype._determineGCRootPaths):
567         (HeapSnapshot.prototype._gcRootPathes.visitNode): Deleted.
568         (HeapSnapshot.prototype._gcRootPathes): Deleted.
569
570 2019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
571
572         Web Inspector: SameSite parsing should be stricter
573         https://bugs.webkit.org/show_bug.cgi?id=196927
574         <rdar://problem/42291601>
575
576         Reviewed by Devin Rousso.
577
578         * UserInterface/Models/Cookie.js:
579         (WI.Cookie.parseSameSiteAttributeValue):
580
581 2019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
582
583         Web Inspector: CPU Usage Timeline - Energy impact popover flickers
584         https://bugs.webkit.org/show_bug.cgi?id=196931
585         <rdar://problem/49569122>
586
587         Reviewed by Devin Rousso.
588
589         * UserInterface/Views/CPUTimelineView.js:
590         (WI.CPUTimelineView.prototype.initialLayout):
591
592 2019-04-15  Devin Rousso  <drousso@apple.com>
593
594         Web Inspector: REGRESSION(r244268): Canvas: navigation sidebar no longer appears
595         https://bugs.webkit.org/show_bug.cgi?id=196920
596         <rdar://problem/49910618>
597
598         Reviewed by Timothy Hatcher.
599
600         * UserInterface/Views/ContentBrowserTabContentView.js:
601         (WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
602         Now that we no longer call `addSubview` when adding a sidebar panel, we can't check to see
603         if `parentSidebar` has been set, as that is just an alias for `parentView`.
604
605 2019-04-15  Devin Rousso  <drousso@apple.com>
606
607         Web Inspector: DOMDebugger: move breakpoint storage to use `WI.ObjectStore`
608         https://bugs.webkit.org/show_bug.cgi?id=196231
609         <rdar://problem/49236864>
610
611         Reviewed by Joseph Pecoraro.
612
613         * UserInterface/Controllers/DOMDebuggerManager.js:
614         (WI.DOMDebuggerManager):
615         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
616         (WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
617         (WI.DOMDebuggerManager.prototype.removeDOMBreakpointsForNode):
618         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
619         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
620         (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
621         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
622         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
623         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
624         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
625         (WI.DOMDebuggerManager.prototype._saveDOMBreakpoints): Deleted.
626         (WI.DOMDebuggerManager.prototype._saveEventBreakpoints): Deleted.
627         (WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Deleted.
628
629         * UserInterface/Models/DOMBreakpoint.js:
630         (WI.DOMBreakpoint.prototype.saveIdentityToCookie):
631         (WI.DOMBreakpoint.prototype.toJSON): Added.
632         (WI.DOMBreakpoint.prototype.get serializableInfo): Deleted.
633         * UserInterface/Models/EventBreakpoint.js:
634         (WI.EventBreakpoint.prototype.saveIdentityToCookie):
635         (WI.EventBreakpoint.prototype.toJSON): Added.
636         (WI.EventBreakpoint.prototype.get serializableInfo): Deleted.
637         * UserInterface/Models/URLBreakpoint.js:
638         (WI.URLBreakpoint.prototype.saveIdentityToCookie):
639         (WI.URLBreakpoint.prototype.toJSON): Added.
640         (WI.URLBreakpoint.prototype.get serializableInfo): Deleted.
641         Replace `get serializableInfo` with `toJSON` as required by `WI.ObjectStore`.
642
643         * UserInterface/Base/ObjectStore.js:
644         (WI.ObjectStore._open):
645         Increment version.
646
647 2019-04-15  Devin Rousso  <drousso@apple.com>
648
649         Web Inspector: drag/drop over the sidebar should load an imported file in Canvas/Audit tab
650         https://bugs.webkit.org/show_bug.cgi?id=196873
651         <rdar://problem/49858190>
652
653         Reviewed by Timothy Hatcher.
654
655         * UserInterface/Base/Main.js:
656         (WI.contentLoaded):
657         (WI._handleDragOver): Added.
658         (WI._handleDrop): Added.
659         (WI._dragOver): Deleted.
660         * UserInterface/Views/AuditTabContentView.js:
661         (WI.AuditTabContentView):
662         (WI.AuditTabContentView.prototype.async handleFileDrop): Added.
663         (WI.AuditTabContentView.prototype._handleDragOver): Deleted.
664         (WI.AuditTabContentView.prototype._handleDrop): Deleted.
665         * UserInterface/Views/CanvasTabContentView.js:
666         (WI.CanvasTabContentView):
667         (WI.CanvasTabContentView.prototype.async handleFileDrop): Added.
668         (WI.CanvasTabContentView.prototype._handleDragOver): Deleted.
669         (WI.CanvasTabContentView.prototype._handleDrop): Deleted.
670         * UserInterface/Views/TimelineTabContentView.js:
671         (WI.TimelineTabContentView.prototype.async handleFileDrop): Added.
672         Check whether the current tab is able to handle a file drop, and if so, don't prevent the
673         drag from occuring. This now allows the user to drop anywhere on the Web Inspector area to
674         import files, so long as the relevant tab is currently selected.
675
676         * UserInterface/Controllers/CanvasManager.js:
677         (WI.CanvasManager.prototype.async processJSON): Added.
678         (WI.CanvasManager.prototype.processJSON): Deleted.
679         * UserInterface/Controllers/TimelineManager.js:
680         (WI.TimelineManager.prototype.async processJSON): Added.
681         (WI.TimelineManager.prototype.processJSON): Deleted.
682         Make `async` to match other `processJSON` functions.
683
684 2019-04-15  Devin Rousso  <drousso@apple.com>
685
686         Web Inspector: Heap: logging an object from a snapshot shouldn't use the "special" style if the object is reachable
687         https://bugs.webkit.org/show_bug.cgi?id=196889
688         <rdar://problem/49870693>
689
690         Reviewed by Joseph Pecoraro.
691
692         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
693         (WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
694
695 2019-04-15  Devin Rousso  <drousso@apple.com>
696
697         Web Inspector: Debugger: deleting a special breakpoint should disable it
698         https://bugs.webkit.org/show_bug.cgi?id=196737
699         <rdar://problem/49740680>
700
701         Reviewed by Timothy Hatcher.
702
703         * UserInterface/Views/BreakpointTreeElement.js:
704         (WI.BreakpointTreeElement.prototype.ondelete):
705
706 2019-04-15  Devin Rousso  <drousso@apple.com>
707
708         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.selectedTreeElement.reveal')
709         https://bugs.webkit.org/show_bug.cgi?id=196804
710         <rdar://problem/49800708>
711
712         Reviewed by Timothy Hatcher.
713
714         * UserInterface/Views/DOMTreeOutline.js:
715         (WI.DOMTreeOutline.prototype.update):
716
717 2019-04-15  Devin Rousso  <drousso@apple.com>
718
719         Web Inspector: Uncaught Exception: Can't find variable: WebGL2RenderingContext
720         https://bugs.webkit.org/show_bug.cgi?id=196874
721         <rdar://problem/49858912>
722
723         Reviewed by Timothy Hatcher.
724
725         * UserInterface/Models/Recording.js:
726         (WI.Recording.prototype.createContext):
727
728         * UserInterface/Models/RecordingAction.js:
729         (WI.RecordingAction.prototype.process.getContent):
730
731 2019-04-15  Devin Rousso  <drousso@apple.com>
732
733         Web Inspector: sidebar panels shouldn't be added as subviews unless visible
734         https://bugs.webkit.org/show_bug.cgi?id=196888
735         <rdar://problem/49870659>
736
737         Reviewed by Timothy Hatcher.
738
739         * UserInterface/Views/Sidebar.js:
740         (WI.Sidebar.prototype.insertSidebarPanel):
741         (WI.Sidebar.prototype.removeSidebarPanel):
742         (WI.Sidebar.prototype.set selectedSidebarPanel):
743
744 2019-04-15  Devin Rousso  <drousso@apple.com>
745
746         Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
747         https://bugs.webkit.org/show_bug.cgi?id=196887
748         <rdar://problem/49870627>
749
750         Reviewed by Timothy Hatcher.
751
752         * UserInterface/Models/DOMNode.js:
753         (WI.DOMNode.prototype.getEventListeners):
754
755 2019-04-15  Devin Rousso  <drousso@apple.com>
756
757         Web Inspector: replace all uses of `this` with `WI` in Main.js/Test.js
758         https://bugs.webkit.org/show_bug.cgi?id=196795
759         <rdar://problem/49796618>
760
761         Reviewed by Timothy Hatcher.
762
763         * UserInterface/Base/Main.js:
764         * UserInterface/Test/Test.js:
765
766 2019-04-15  Devin Rousso  <drousso@apple.com>
767
768         Web Inspector: REGRESSION: Heap: snapshots taken manually don't appear in the list
769         https://bugs.webkit.org/show_bug.cgi?id=196900
770         <rdar://problem/49880278>
771
772         Reviewed by Timothy Hatcher.
773
774         * UserInterface/Views/HeapAllocationsTimelineView.js:
775         (WI.HeapAllocationsTimelineView):
776         (WI.HeapAllocationsTimelineView.prototype.layout):
777         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
778         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
779         Drive-by: only show heap snapshots for the selected range.
780
781         * UserInterface/Views/TimelineView.js:
782         * UserInterface/Views/TimelineRecordingContentView.js:
783         (WI.TimelineRecordingContentView):
784         (WI.TimelineRecordingContentView.prototype._handleTimelineViewNeedsEntireSelectedRange): Added.
785         Drive-by: taking (or importing) a heap snapshot should select the entire range so that the
786         new record will appear in the list of heap snapshots.
787
788 2019-04-15  Devin Rousso  <drousso@apple.com>
789
790         Web Inspector: REGRESSION (r244157): Timelines: ruler size appears wrong on first layout
791         https://bugs.webkit.org/show_bug.cgi?id=196901
792         <rdar://problem/49880539>
793
794         Reviewed by Timothy Hatcher.
795
796         * UserInterface/Views/View.js:
797         (WI.View.prototype._layoutSubtree):
798         Ensure that the forced override of the layout reason during the initial layout doesn't
799         affect subviews.
800
801         * UserInterface/Views/ConsoleDrawer.js:
802         (WI.ConsoleDrawer.prototype.sizeDidChange): Added.
803         (WI.ConsoleDrawer.prototype.layout): Deleted.
804         * UserInterface/Views/ConsolePrompt.js:
805         (WI.ConsolePrompt.prototype.sizeDidChange): Added.
806         (WI.ConsolePrompt.prototype.layout): Deleted.
807         * UserInterface/Views/DOMTreeContentView.js:
808         (WI.DOMTreeContentView.prototype.sizeDidChange): Added.
809         (WI.DOMTreeContentView.prototype.layout):
810         * UserInterface/Views/NavigationBar.js:
811         (WI.NavigationBar.prototype.sizeDidChange): Added.
812         (WI.NavigationBar.prototype.layout):
813         (WI.NavigationBar.prototype._updateContent): Added.
814         (WI.NavigationBar.prototype._updateContent.forceItemHidden): Added.
815         (WI.NavigationBar.prototype._updateContent.isDivider): Added.
816         (WI.NavigationBar.prototype._updateContent.calculateVisibleItemWidth): Added.
817         (WI.NavigationBar.prototype.layout.forceItemHidden): Deleted.
818         (WI.NavigationBar.prototype.layout.isDivider): Deleted.
819         (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): Deleted.
820         * UserInterface/Views/TabBrowser.js:
821         (WI.TabBrowser.prototype.sizeDidChange): Added.
822         (WI.TabBrowser.prototype.layout): Deleted.
823         Move logic in `layout` to `sizeDidChange` where applicable.
824
825 2019-04-11  Devin Rousso  <drousso@apple.com>
826
827         Web Inspector: REGRESSION(r244195): Timelines: unable to take heap snapshot
828         https://bugs.webkit.org/show_bug.cgi?id=196832
829         <rdar://problem/49828862>
830
831         Reviewed by Simon Fraser.
832
833         * UserInterface/Controllers/TimelineManager.js:
834         (WI.TimelineManager.prototype.heapSnapshotAdded):
835         (WI.TimelineManager.prototype._addRecord):
836         Heap snapshots can be taken outside of a timeline recording, so remove the early return (and
837         assertion) that checks for an active recording before adding the heap snapshot record.
838
839 2019-04-11  Devin Rousso  <drousso@apple.com>
840
841         Web Inspector: Timelines: can't reliably stop/start a recording
842         https://bugs.webkit.org/show_bug.cgi?id=196778
843         <rdar://problem/47606798>
844
845         Reviewed by Timothy Hatcher.
846
847         Rather than have a binary state of capturing/not-capturing, we should use a four state:
848          1. inactive (when the backend has stopped capturing)
849          2. starting (when the frontend requests capturing to start)
850          3. active (when the backend has started capturing)
851          4. stopping (when the frontend requests capturing to stop)
852
853         Capturing is considered "on" when not in an "inactive" state. Prevent the frontend from
854         starting/stopping capturing unless we're in a "stable" ("inactive" or "active") state, not a
855         "transition" ("starting" or "stopping") state.
856
857         One "side effect" of this change is that since the capturing is considered active until the
858         backend has stopped capturing, we will continue to process records in the frontend even if
859         the frontend has requested to stop capturing. <https://webkit.org/b/152904>
860
861         * UserInterface/Controllers/TimelineManager.js:
862         (WI.TimelineManager):
863         (WI.TimelineManager.prototype.get capturingState): Added.
864         (WI.TimelineManager.prototype.reset):
865         (WI.TimelineManager.prototype.get activeRecording):
866         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
867         (WI.TimelineManager.prototype.isCapturing):
868         (WI.TimelineManager.prototype.startCapturing):
869         (WI.TimelineManager.prototype.stopCapturing):
870         (WI.TimelineManager.prototype.processJSON):
871         (WI.TimelineManager.prototype.capturingStarted):
872         (WI.TimelineManager.prototype.capturingStopped):
873         (WI.TimelineManager.prototype.autoCaptureStarted):
874         (WI.TimelineManager.prototype.eventRecorded):
875         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
876         (WI.TimelineManager.prototype.pageLoadEventFired):
877         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
878         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
879         (WI.TimelineManager.prototype.memoryTrackingUpdated):
880         (WI.TimelineManager.prototype.memoryTrackingCompleted):
881         (WI.TimelineManager.prototype.heapTrackingStarted):
882         (WI.TimelineManager.prototype.heapTrackingCompleted):
883         (WI.TimelineManager.prototype.heapSnapshotAdded):
884         (WI.TimelineManager.prototype._updateCapturingState): Added.
885         (WI.TimelineManager.prototype._processRecord):
886         (WI.TimelineManager.prototype._processEvent):
887         (WI.TimelineManager.prototype._loadNewRecording):
888         (WI.TimelineManager.prototype._addRecord):
889         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
890         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
891         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
892         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
893         (WI.TimelineManager.prototype._resourceWasAdded):
894         (WI.TimelineManager.prototype._garbageCollected):
895         (WI.TimelineManager.prototype._memoryPressure):
896         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
897         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
898         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
899         (WI.TimelineManager.prototype._handleDOMNodeLowPowerChanged):
900         (WI.TimelineManager.prototype.unloadRecording): Deleted.
901         (WI.TimelineManager.prototype.programmaticCaptureStarted): Deleted.
902         (WI.TimelineManager.prototype.programmaticCaptureStopped): Deleted.
903         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): Deleted.
904         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): Deleted.
905
906         * UserInterface/Protocol/ScriptProfilerObserver.js:
907         (WI.ScriptProfilerObserver.prototype.trackingComplete):
908         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
909         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
910         * UserInterface/Protocol/TimelineObserver.js:
911         (WI.TimelineObserver.prototype.programmaticCaptureStarted):
912         (WI.TimelineObserver.prototype.programmaticCaptureStopped):
913         It is possible to determine when programmatic capturing starts/stops in the frontend based
914         on the state when the backend causes the state to change, such as if the state is "inactive"
915         when the frontend is told that the backend has started capturing.
916
917         * UserInterface/Protocol/CPUProfilerObserver.js:
918         (WI.CPUProfilerObserver.prototype.trackingComplete):
919         * UserInterface/Protocol/MemoryObserver.js:
920         (WI.MemoryObserver.prototype.trackingComplete):
921         Send an end timestamp to match other instruments.
922
923         * UserInterface/Controllers/DebuggerManager.js:
924         (WI.DebuggerManager):
925         (WI.DebuggerManager.prototype._handleTimelineCapturingStateChanged): Added.
926         (WI.DebuggerManager.prototype._timelineCapturingWillStart): Deleted.
927         (WI.DebuggerManager.prototype._timelineCapturingStopped): Deleted.
928         * UserInterface/Models/DefaultDashboard.js:
929         (WI.DefaultDashboard):
930         (WI.DefaultDashboard.prototype._handleTimelineCapturingStateChanged): Added.
931         (WI.DefaultDashboard.prototype._capturingStopped): Deleted.
932         * UserInterface/Views/DebuggerSidebarPanel.js:
933         (WI.DebuggerSidebarPanel):
934         (WI.DebuggerSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
935         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Deleted.
936         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Deleted.
937         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
938         (WI.SourcesNavigationSidebarPanel):
939         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
940         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart): Deleted.
941         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped): Deleted.
942         * UserInterface/Views/TimelineOverview.js:
943         (WI.TimelineOverview):
944         (WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged): Added.
945         (WI.TimelineOverview.prototype._capturingStarted): Deleted.
946         (WI.TimelineOverview.prototype._capturingStopped): Deleted.
947         * UserInterface/Views/TimelineRecordingContentView.js:
948         (WI.TimelineRecordingContentView):
949         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged): Added.
950         (WI.TimelineRecordingContentView.prototype._recordingUnloaded):
951         (WI.TimelineRecordingContentView.prototype._capturingStarted): Deleted.
952         (WI.TimelineRecordingContentView.prototype._capturingStopped): Deleted.
953         * UserInterface/Views/TimelineTabContentView.js:
954         (WI.TimelineTabContentView):
955         (WI.TimelineTabContentView.prototype._handleTimelineCapturingStateChanged): Added.
956         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped): Deleted.
957         Use the new single event for all Timelines capture state changes.
958         Prevent the record button from being clicked when capturing is in a transition state.
959
960 2019-04-11  Truitt Savell  <tsavell@apple.com>
961
962         Unreviewed, rolling out r244158.
963
964         Casued 8 inspector/timeline/ test failures.
965
966         Reverted changeset:
967
968         "Web Inspector: Timelines: can't reliably stop/start a
969         recording"
970         https://bugs.webkit.org/show_bug.cgi?id=196778
971         https://trac.webkit.org/changeset/244158
972
973 2019-04-10  Devin Rousso  <drousso@apple.com>
974
975         Web Inspector: save sheet should be anchored underneath the tab bar when detached
976         https://bugs.webkit.org/show_bug.cgi?id=196722
977         <rdar://problem/49613280>
978
979         Reviewed by Timothy Hatcher.
980
981         * UserInterface/Base/Main.js:
982         (WI.contentLoaded):
983
984 2019-04-10  Devin Rousso  <drousso@apple.com>
985
986         Web Inspector: Timelines: can't reliably stop/start a recording
987         https://bugs.webkit.org/show_bug.cgi?id=196778
988         <rdar://problem/47606798>
989
990         Reviewed by Timothy Hatcher.
991
992         Rather than have a binary state of capturing/not-capturing, we should use a four state:
993          1. inactive (when the backend has stopped capturing)
994          2. starting (when the frontend requests capturing to start)
995          3. active (when the backend has started capturing)
996          4. stopping (when the frontend requests capturing to stop)
997
998         Capturing is considered "on" when not in an "inactive" state. Prevent the frontend from
999         starting/stopping capturing unless we're in a "stable" ("inactive" or "active") state, not a
1000         "transition" ("starting" or "stopping") state.
1001
1002         One "side effect" of this change is that since the capturing is considered active until the
1003         backend has stopped capturing, we will continue to process records in the frontend even if
1004         the frontend has requested to stop capturing. <https://webkit.org/b/152904>
1005
1006         * UserInterface/Controllers/TimelineManager.js:
1007         (WI.TimelineManager):
1008         (WI.TimelineManager.prototype.get capturingState): Added.
1009         (WI.TimelineManager.prototype.reset):
1010         (WI.TimelineManager.prototype.get activeRecording):
1011         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
1012         (WI.TimelineManager.prototype.isCapturing):
1013         (WI.TimelineManager.prototype.startCapturing):
1014         (WI.TimelineManager.prototype.stopCapturing):
1015         (WI.TimelineManager.prototype.processJSON):
1016         (WI.TimelineManager.prototype.capturingStarted):
1017         (WI.TimelineManager.prototype.capturingStopped):
1018         (WI.TimelineManager.prototype.autoCaptureStarted):
1019         (WI.TimelineManager.prototype.eventRecorded):
1020         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
1021         (WI.TimelineManager.prototype.pageLoadEventFired):
1022         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
1023         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
1024         (WI.TimelineManager.prototype.memoryTrackingUpdated):
1025         (WI.TimelineManager.prototype.memoryTrackingCompleted):
1026         (WI.TimelineManager.prototype.heapTrackingStarted):
1027         (WI.TimelineManager.prototype.heapTrackingCompleted):
1028         (WI.TimelineManager.prototype.heapSnapshotAdded):
1029         (WI.TimelineManager.prototype._updateCapturingState): Added.
1030         (WI.TimelineManager.prototype._processRecord):
1031         (WI.TimelineManager.prototype._processEvent):
1032         (WI.TimelineManager.prototype._loadNewRecording):
1033         (WI.TimelineManager.prototype._addRecord):
1034         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
1035         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
1036         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
1037         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1038         (WI.TimelineManager.prototype._mainResourceDidChange):
1039         (WI.TimelineManager.prototype._resourceWasAdded):
1040         (WI.TimelineManager.prototype._garbageCollected):
1041         (WI.TimelineManager.prototype._memoryPressure):
1042         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
1043         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
1044         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
1045         (WI.TimelineManager.prototype._handleDOMNodeLowPowerChanged):
1046         (WI.TimelineManager.prototype.unloadRecording): Deleted.
1047         (WI.TimelineManager.prototype.programmaticCaptureStarted): Deleted.
1048         (WI.TimelineManager.prototype.programmaticCaptureStopped): Deleted.
1049         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): Deleted.
1050         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): Deleted.
1051
1052         * UserInterface/Protocol/ScriptProfilerObserver.js:
1053         (WI.ScriptProfilerObserver.prototype.trackingComplete):
1054         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
1055         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
1056         * UserInterface/Protocol/TimelineObserver.js:
1057         (WI.TimelineObserver.prototype.programmaticCaptureStarted):
1058         (WI.TimelineObserver.prototype.programmaticCaptureStopped):
1059         It is possible to determine when programmatic capturing starts/stops in the frontend based
1060         on the state when the backend causes the state to change, such as if the state is "inactive"
1061         when the frontend is told that the backend has started capturing.
1062
1063         * UserInterface/Protocol/CPUProfilerObserver.js:
1064         (WI.CPUProfilerObserver.prototype.trackingComplete):
1065         * UserInterface/Protocol/MemoryObserver.js:
1066         (WI.MemoryObserver.prototype.trackingComplete):
1067         Send an end timestamp to match other instruments.
1068
1069         * UserInterface/Controllers/DebuggerManager.js:
1070         (WI.DebuggerManager):
1071         (WI.DebuggerManager.prototype._handleTimelineCapturingStateChanged): Added.
1072         (WI.DebuggerManager.prototype._timelineCapturingWillStart): Deleted.
1073         (WI.DebuggerManager.prototype._timelineCapturingStopped): Deleted.
1074         * UserInterface/Models/DefaultDashboard.js:
1075         (WI.DefaultDashboard):
1076         (WI.DefaultDashboard.prototype._handleTimelineCapturingStateChanged): Added.
1077         (WI.DefaultDashboard.prototype._capturingStopped): Deleted.
1078         * UserInterface/Views/DebuggerSidebarPanel.js:
1079         (WI.DebuggerSidebarPanel):
1080         (WI.DebuggerSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
1081         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Deleted.
1082         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Deleted.
1083         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1084         (WI.SourcesNavigationSidebarPanel):
1085         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
1086         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart): Deleted.
1087         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped): Deleted.
1088         * UserInterface/Views/TimelineOverview.js:
1089         (WI.TimelineOverview):
1090         (WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged): Added.
1091         (WI.TimelineOverview.prototype._capturingStarted): Deleted.
1092         (WI.TimelineOverview.prototype._capturingStopped): Deleted.
1093         * UserInterface/Views/TimelineRecordingContentView.js:
1094         (WI.TimelineRecordingContentView):
1095         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged): Added.
1096         (WI.TimelineRecordingContentView.prototype._recordingUnloaded):
1097         (WI.TimelineRecordingContentView.prototype._capturingStarted): Deleted.
1098         (WI.TimelineRecordingContentView.prototype._capturingStopped): Deleted.
1099         * UserInterface/Views/TimelineTabContentView.js:
1100         (WI.TimelineTabContentView):
1101         (WI.TimelineTabContentView.prototype._handleTimelineCapturingStateChanged): Added.
1102         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped): Deleted.
1103         Use the new single event for all Timelines capture state changes.
1104         Prevent the record button from being clicked when capturing is in a transition state.
1105
1106 2019-04-10  Devin Rousso  <drousso@apple.com>
1107
1108         Web Inspector: REGRESSION: Audit: result UI shown on first open if an audit was previously selected
1109         https://bugs.webkit.org/show_bug.cgi?id=196723
1110         <rdar://problem/49722252>
1111
1112         Reviewed by Timothy Hatcher.
1113
1114         When opening Web Inspector for the first time, we will trigger resize `layout`s on the main
1115         content area as Web Inspector is resized to it's old window size.
1116
1117         Rather than treating this layout as a `View.LayoutReason.Resize`, we should treat the
1118         first `layout` (e.g. `initialLayout`) as a `View.LayoutReason.Dirty` instead, as there was
1119         previously no content.
1120
1121         * UserInterface/Views/View.js:
1122         (WI.View.prototype._layoutSubtree):
1123         (WI.View.prototype._setLayoutReason):
1124
1125         * UserInterface/Views/AuditTestContentView.js:
1126         (WI.AuditTestContentView):
1127         Drive-by: ensure that this class is not instantiated directly.
1128
1129 2019-04-10  Devin Rousso  <drousso@apple.com>
1130
1131         Web Inspector: Debugger: current call frame indicator is indented when there is more than one thread
1132         https://bugs.webkit.org/show_bug.cgi?id=196580
1133         <rdar://problem/49582138>
1134
1135         Reviewed by Timothy Hatcher.
1136
1137         * UserInterface/Views/CallFrameTreeElement.css:
1138         (.tree-outline .item.call-frame .status):
1139         (.tree-outline.single-thread .item.call-frame .status): Added.
1140
1141 2019-04-10  Devin Rousso  <drousso@apple.com>
1142
1143         Web Inspector: REGRESSION (r238602): Elements: deleting the last child of a collapsed parent selects the parent's next sibling
1144         https://bugs.webkit.org/show_bug.cgi?id=192711
1145         <rdar://problem/46738990>
1146
1147         Reviewed by Timothy Hatcher.
1148
1149         Original patch by Matt Baker <mattbaker@apple.com>.
1150
1151         * UserInterface/Controllers/SelectionController.js:
1152         (WI.SelectionController.prototype.removeSelectedItems):
1153         When looking for a new item to select, start with the item preceding the
1154         selection, instead of the item following the selection. This matches
1155         pre-multiple selection behavior, as well as Mail and Xcode.
1156
1157         * UserInterface/Views/DOMTreeElement.js:
1158         (WI.DOMTreeElement.prototype.onexpand):
1159         Drive-by fix: when a hidden node is selected, its selection area is drawn
1160         with a height of 0px. Update the selection area once the hidden node's
1161         parent is expanded. AFAIK, this has always been broken.
1162
1163         * UserInterface/Views/DOMTreeOutline.js:
1164         (WI.DOMTreeOutline.prototype.ondelete):
1165         After a delete the `SelectionController` may have chosen a child of a
1166         collapsed parent as the new selected item. If the item isn't the closing tag (e.g. after
1167         deleting the last child), reveal it.
1168
1169         (WI.DOMTreeOutline.prototype.selectionControllerPreviousSelectableItem):
1170
1171         * UserInterface/Views/TreeElement.js:
1172         (WI.TreeElement.prototype.get previousSelectableSibling): Added.
1173         (WI.TreeElement.prototype.get nextSelectableSibling): Added.
1174
1175         * UserInterface/Views/TreeOutline.js:
1176         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
1177         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
1178         Set `skipUnrevealed` to false, so that children of collapsed parent nodes
1179         are considered when looking for an item to selected after a delete. Hidden `TreeElement`s
1180         are still ignored as they aren't `selectable`.
1181
1182 2019-04-10  Devin Rousso  <drousso@apple.com>
1183
1184         Web Inspector: Elements tab: multiple selection lost after navigating to another tab
1185         https://bugs.webkit.org/show_bug.cgi?id=192681
1186         <rdar://problem/46709392>
1187
1188         Reviewed by Timothy Hatcher.
1189
1190         Orginal patch by Matt Baker <mattbaker@apple.com>.
1191
1192         * UserInterface/Controllers/SelectionController.js:
1193         (WI.SelectionController.prototype.selectItem):
1194         Simplify internal logic by removing an early return.
1195
1196         (WI.SelectionController.prototype.selectItems): Added.
1197         (WI.SelectionController.prototype.selectAll):
1198         Provide a means to select multiple items in a single operation.
1199         If `_lastSelectedItem` is not in the items to select, the last
1200         item being selected will become the last selected item.
1201
1202         (WI.SelectionController.prototype._deselectAllAndSelect):
1203         Drive-by fix: correct a logic error. If no items are selected, the item
1204         passed as an argument should still become selected.
1205
1206         * UserInterface/Views/TreeOutline.js:
1207         (WI.TreeOutline.prototype.selectTreeElements): Added.
1208
1209         * UserInterface/Views/DOMTreeElement.js:
1210         (WI.DOMTreeElement):
1211         (WI.DOMTreeElement.prototype.get closeTagTreeElement): Added.
1212         (WI.DOMTreeElement.prototype._updateChildren):
1213         Make the close tag `TreeElement` available from the open tag `TreeElement`.
1214
1215         * UserInterface/Views/DOMTreeOutline.js:
1216         (WI.DOMTreeOutline.prototype.update):
1217         Restore selected `TreeElement`s after updating.
1218
1219         * UserInterface/Base/Utilities.js:
1220         * UserInterface/Test.html:
1221
1222 2019-04-08  Matt Baker  <mattbaker@apple.com>
1223
1224         Web Inspector: Elements tab: Classes toggle should use accent color on hover
1225         https://bugs.webkit.org/show_bug.cgi?id=196266
1226
1227         Reviewed by Devin Rousso.
1228
1229         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
1230         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
1231         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle::before):
1232         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)):
1233         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)::before):
1234         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover::before):
1235         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected:active::before):
1236         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected): Deleted.
1237         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover): Deleted.
1238
1239 2019-04-08  Devin Rousso  <drousso@apple.com>
1240
1241         Web Inspector: REGRESSION: Audit: default audits aren't added when an existing audit is present
1242         https://bugs.webkit.org/show_bug.cgi?id=196663
1243         <rdar://problem/49660757>
1244
1245         Reviewed by Timothy Hatcher.
1246
1247         Rather than have a button that allows the user to re-add the default audits, prevent them
1248         from being deletable in the first place. "Deleting" a default audit will instead mark it as
1249         disabled (and beep if it is already disabled).
1250
1251         * UserInterface/Controllers/AuditManager.js:
1252         (WI.AuditManager.prototype.loadStoredTests):
1253         (WI.AuditManager.prototype.removeTest):
1254         (WI.AuditManager.prototype._addDefaultTests): Added.
1255         (WI.AuditManager.prototype.addDefaultTestsIfNeeded): Deleted.
1256
1257         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1258         (WI.AuditNavigationSidebarPanel.prototype._addTest):
1259         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
1260         (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
1261         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
1262         * UserInterface/Views/AuditNavigationSidebarPanel.css:
1263         (.sidebar > .panel.navigation.audit.has-results > .content > .message-text-view.no-enabled-audits): Added.
1264         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view): Deleted.
1265         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > .message): Deleted.
1266         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > button): Deleted.
1267
1268         * Localizations/en.lproj/localizedStrings.js:
1269
1270 2019-04-06  Nikita Vasilyev  <nvasilyev@apple.com>
1271
1272         REGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't visible
1273         https://bugs.webkit.org/show_bug.cgi?id=196667
1274         <rdar://problem/49664912>
1275
1276         Reviewed by Timothy Hatcher.
1277
1278         Explicitly define `hidden` and `shown` methods instead of relying on SidebarPanel's `visible` getter.
1279
1280         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
1281         (WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange): Deleted.
1282         (WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Added.
1283         (WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Added.
1284
1285 2019-04-05  Devin Rousso  <drousso@apple.com>
1286
1287         Web Inspector: TestSuite test cases should have their own timeout to ensure tests fail with output instead of timeout by test runner
1288         https://bugs.webkit.org/show_bug.cgi?id=162814
1289         <rdar://problem/28574102>
1290
1291         Reviewed by Brian Burg.
1292
1293         A 10s timer is started for every test case added to an async suite. The timer is cleared
1294         when the test finishes, but if the timer fires, the test is forcibly ended with an error.
1295
1296         This timer can be configured by setting a `timeout` value when adding the test case. Values
1297         are expected to be in milliseconds. The value `-1` will prevent a timer from being set.
1298
1299         This change also relaxes the expectation that any individual test case failure will stop the
1300         rest of the suite from running. Since timers are set per test case, it is possible to
1301         recover from a "bad" test case to still run the remaining test cases.
1302
1303         NOTE: there may be unexpected behaviour if a test times out, as the timer doesn't actually
1304         stop the execution of the test, so it may still run and log information, which may appear
1305         "out of nowhere" in the middle of other tests.
1306
1307         * UserInterface/Test/TestSuite.js:
1308         (TestSuite.prototype.get passCount):
1309         (AsyncTestSuite.prototype.runTestCases):
1310         (SyncTestSuite.prototype.runTestCases):
1311
1312 2019-04-03  Devin Rousso  <drousso@apple.com>
1313
1314         Web Inspector: Single click on links in non-read-only TextEditors should not follow links
1315         https://bugs.webkit.org/show_bug.cgi?id=123364
1316         <rdar://problem/15323913>
1317
1318         Reviewed by Timothy Hatcher.
1319
1320         * UserInterface/Base/Main.js:
1321         (WI._updateModifierKeys):
1322         Add classes to the body whenever alt, shift, or ctrl are pressed.
1323
1324         * UserInterface/Views/CodeMirrorEditor.js:
1325         (WI.CodeMirrorEditor.create):
1326         Add a `read-only` class if the `CodeMirror` is readonly.
1327
1328         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
1329         (.cm-s-default .cm-link,):
1330         (.read-only.cm-s-default .cm-link:hover,):
1331         (.cm-s-default .cm-link:hover,): Deleted.
1332
1333         * UserInterface/Views/TextEditor.js:
1334         (WI.TextEditor.prototype.set readOnly):
1335         (WI.TextEditor.prototype._openClickedLinks):
1336
1337 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
1338
1339         Remove support for -apple-trailing-word
1340         https://bugs.webkit.org/show_bug.cgi?id=196525
1341
1342         Reviewed by Zalan Bujtas.
1343
1344         This CSS property is nonstandard and not used.
1345
1346         * UserInterface/Models/CSSKeywordCompletions.js:
1347
1348 2019-04-03  Nikita Vasilyev  <nvasilyev@apple.com>
1349
1350         Web Inspector: Uncaught Exception: TypeError: this._computedStyleSection.focus is not a function. (In 'this._computedStyleSection.focus()', 'this._computedStyleSection.focus' is undefined)
1351         https://bugs.webkit.org/show_bug.cgi?id=192108
1352         <rdar://problem/46685392>
1353
1354         Reviewed by Devin Rousso.
1355
1356         This patch fixes the uncaught exception. Tabbing to and from "Properties" section continues
1357         working the same way as before the patch.
1358
1359         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1360         (WI.ComputedStyleDetailsPanel.prototype.focusFirstSection): Deleted.
1361         (WI.ComputedStyleDetailsPanel.prototype.focusLastSection): Deleted.
1362
1363 2019-04-02  Devin Rousso  <drousso@apple.com>
1364
1365         Web Inspector: Elements: DOM breakpoint icon should stroke when hovering selection area
1366         https://bugs.webkit.org/show_bug.cgi?id=196516
1367         <rdar://problem/49540494>
1368
1369         Reviewed by Timothy Hatcher.
1370
1371         * UserInterface/Views/DOMTreeContentView.css:
1372         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint,): Added.
1373         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Added.
1374         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, :hover) .status-image.breakpoint): Deleted.
1375         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, :hover) .status-image.breakpoint.subtree): Deleted.
1376
1377 2019-04-01  Devin Rousso  <drousso@apple.com>
1378
1379         Web Inspector: Debugger: modernize serialization of breakpoints and the maps that hold them
1380         https://bugs.webkit.org/show_bug.cgi?id=196230
1381         <rdar://problem/49236485>
1382
1383         Reviewed by Joseph Pecoraro.
1384
1385         * UserInterface/Controllers/DebuggerManager.js:
1386         (WI.DebuggerManager):
1387         (WI.DebuggerManager.prototype.breakpointsForSourceCode):
1388         (WI.DebuggerManager.prototype.addBreakpoint):
1389         (WI.DebuggerManager.prototype.removeBreakpoint):
1390         (WI.DebuggerManager.prototype._setBreakpoint):
1391         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
1392
1393         * UserInterface/Models/Breakpoint.js:
1394         (WI.Breakpoint):
1395         (WI.Breakpoint.fromJSON): Added.
1396         (WI.Breakpoint.prototype.toJSON):
1397         (WI.Breakpoint.prototype.set resolved):
1398         (WI.Breakpoint.prototype.recreateAction):
1399         (WI.Breakpoint.prototype.saveIdentityToCookie):
1400         (WI.Breakpoint.prototype._isSpecial): Added.
1401         (WI.Breakpoint.set resolved.isSpecialBreakpoint): Deleted.
1402         (WI.Breakpoint.serializeOptions): Deleted.
1403
1404         * UserInterface/Models/BreakpointAction.js:
1405         (WI.BreakpointAction):
1406         (WI.BreakpointAction.fromJSON): Added.
1407         (WI.BreakpointAction.prototype.toProtocol): Added.
1408
1409         * UserInterface/Views/DebuggerSidebarPanel.js:
1410         (WI.DebuggerSidebarPanel.prototype._addBreakpointsForSourceCode):
1411
1412         * UserInterface/Views/SourceCodeTextEditor.js:
1413         (WI.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
1414         (WI.SourceCodeTextEditor.prototype._breakpointsEnabledDidChange):
1415
1416 2019-04-01  Devin Rousso  <drousso@apple.com>
1417
1418         Web Inspector: DOMDebugger: disabling a breakpoint for a specific event listener removes it from the UI
1419         https://bugs.webkit.org/show_bug.cgi?id=196453
1420         <rdar://problem/49489318>
1421
1422         Reviewed by Joseph Pecoraro.
1423
1424         Allow breakpoints for specific event listeners to be disabled, rather than immeditately
1425         removing/deleting them when they are about to become disabled. This preserves the existing
1426         functionality, but now allows for the tree element to stay in the UI in a disabled state.
1427
1428         * UserInterface/Controllers/DOMManager.js:
1429         (WI.DOMManager):
1430         (WI.DOMManager.prototype.setBreakpointForEventListener):
1431         (WI.DOMManager.prototype.removeBreakpointForEventListener):
1432         (WI.DOMManager.prototype.removeEventListenerBreakpointsForNode): Added.
1433         (WI.DOMManager.prototype._updateEventBreakpoint): Added.
1434         (WI.DOMManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
1435
1436         * UserInterface/Controllers/DOMDebuggerManager.js:
1437         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
1438
1439         * UserInterface/Views/EventBreakpointTreeElement.js:
1440         (WI.EventBreakpointTreeElement.prototype.populateContextMenu):
1441         (WI.EventBreakpointTreeElement.prototype._toggleBreakpoint):
1442
1443         * UserInterface/Views/ContextMenuUtilities.js:
1444         (WI.appendContextMenuItemsForDOMNodeBreakpoints):
1445
1446         * UserInterface/Views/DOMNodeTreeElement.js:
1447         (WI.DOMNodeTreeElement.prototype.ondelete):
1448
1449 2019-04-01  Devin Rousso  <drousso@apple.com>
1450
1451         Web Inspector: Canvas: auto-record after page load sometimes shows the wrong UI
1452         https://bugs.webkit.org/show_bug.cgi?id=196320
1453         <rdar://problem/49356686>
1454
1455         Reviewed by Joseph Pecoraro.
1456
1457         It was previously possible that the timing of a recording being started and the preview
1458         image being loaded would not always be in the same order.
1459
1460         Utilize the existing `View.prototype.layout` mechanics to ensure that updates are coalesced
1461         and that the changes are always applied in a particular order.
1462
1463         * UserInterface/Views/CanvasContentView.js:
1464         (WI.CanvasContentView):
1465         (WI.CanvasContentView.prototype.refreshPreview): Added.
1466         (WI.CanvasContentView.prototype.initialLayout):
1467         (WI.CanvasContentView.prototype.layout):
1468         (WI.CanvasContentView.prototype.shown):
1469         (WI.CanvasContentView.prototype.attached):
1470         (WI.CanvasContentView.prototype._refreshPixelSize):
1471         (WI.CanvasContentView.prototype.refresh): Deleted.
1472         (WI.CanvasContentView.prototype._recordingStarted): Deleted.
1473         (WI.CanvasContentView.prototype._recordingProgress): Deleted.
1474         (WI.CanvasContentView.prototype._recordingStopped): Deleted.
1475         (WI.CanvasContentView.prototype._shaderProgramAdded): Deleted.
1476         (WI.CanvasContentView.prototype._shaderProgramRemoved): Deleted.
1477
1478         * UserInterface/Views/CanvasOverviewContentView.js:
1479         (WI.CanvasOverviewContentView.prototype._refreshPreviews):
1480
1481 2019-04-01  Devin Rousso  <drousso@apple.com>
1482
1483         Web Inspector: Canvas: add compatibility support for WebMetal
1484         https://bugs.webkit.org/show_bug.cgi?id=196412
1485         <rdar://problem/49439417>
1486
1487         Reviewed by Joseph Pecoraro.
1488
1489         * UserInterface/Models/Canvas.js:
1490         (WI.Canvas.fromPayload):
1491         (WI.Canvas.displayNameForContextType):
1492         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
1493         * Versions/Inspector-iOS-12.2.json:
1494
1495 2019-04-01  Devin Rousso  <drousso@apple.com>
1496
1497         Web Inspector: "Copy as HTML" appears twice when showing a context menu for a logged node
1498         https://bugs.webkit.org/show_bug.cgi?id=196271
1499         <rdar://problem/49290676>
1500
1501         Reviewed by Joseph Pecoraro.
1502
1503         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1504         (WI.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
1505
1506         * Localizations/en.lproj/localizedStrings.js:
1507
1508 2019-04-01  Devin Rousso  <drousso@apple.com>
1509
1510         Web Inspector: Debugger: breakpoints don't populate in inspector2 on first load
1511         https://bugs.webkit.org/show_bug.cgi?id=196063
1512         <rdar://problem/49097787>
1513
1514         Reviewed by Joseph Pecoraro.
1515
1516         In the case that a breakpoint becomes resolved after the resource has finished loaded, there
1517         won't be an already existing `TreeElement` for the breakpoint to replace.
1518
1519         This can realistically only happen if the IndexedDB lookup is super slow, or the resource is
1520         extremely fast (e.g. a `data` url).
1521
1522         * UserInterface/Views/DebuggerSidebarPanel.js:
1523         (WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
1524         (WI.DebuggerSidebarPanel.prototype._addDebuggerObject): Deleted.
1525
1526         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1527         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
1528         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
1529         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
1530
1531 2019-04-01  Joseph Pecoraro  <pecoraro@apple.com>
1532
1533         Web Inspector: CPU Usage Timeline - Adjust Energy Impact Threshholds
1534         https://bugs.webkit.org/show_bug.cgi?id=196421
1535         <rdar://problem/49125703>
1536
1537         Reviewed by Devin Rousso.
1538
1539         - Low - Keep Below 3% to continue to encourage idle pages stay below 3%
1540           Might want to reduce to 2.5 or 2 after fixing bug 196419.
1541
1542         - High - Make Above 30% instead of 50% to encourage long running interactivity to stay below 30%
1543           Depends on interaction, but sustained (1-2min) at 30%+ will certainly impact battery.
1544
1545         - Very High - Make above 100% instead of 150%
1546           CPU Usage spikes around page load and is quite often still under 100% despite many threads.
1547           Drop this a bit as we dropped High down.
1548
1549         Reduce the size of the Medium section, and increase the High section
1550         Having 70% of the chart be "Medium" is just too much Medium, and
1551         we've now made it more possible to be in the High range.
1552
1553         * UserInterface/Views/CPUTimelineView.js:
1554         (WI.CPUTimelineView.prototype.get mediumEnergyThreshold):
1555         (WI.CPUTimelineView.prototype.get highEnergyThreshold):
1556         (WI.CPUTimelineView.prototype.get lowEnergyGraphBoundary):
1557         (WI.CPUTimelineView.prototype.get mediumEnergyGraphBoundary):
1558         (WI.CPUTimelineView.prototype.get highEnergyGraphBoundary):
1559         (WI.CPUTimelineView.prototype.initialLayout):
1560         (WI.CPUTimelineView.prototype.layout.bestThreadLayoutMax):
1561         (WI.CPUTimelineView.prototype._layoutEnergyChart):
1562
1563 2019-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
1564
1565         Delete WebMetal implementation in favor of WebGPU
1566         https://bugs.webkit.org/show_bug.cgi?id=195418
1567
1568         Reviewed by Dean Jackson.
1569
1570         * UserInterface/Models/Canvas.js:
1571         (WI.Canvas.fromPayload):
1572         (WI.Canvas.displayNameForContextType):
1573         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
1574         * Versions/Inspector-iOS-12.2.json:
1575
1576 2019-03-29  Devin Rousso  <drousso@apple.com>
1577
1578         Web Inspector: Storage: some cookie column headers are not localized
1579         https://bugs.webkit.org/show_bug.cgi?id=196406
1580         <rdar://problem/48467422>
1581
1582         Reviewed by Joseph Pecoraro.
1583
1584         * UserInterface/Views/CookieStorageContentView.js:
1585         (WI.CookieStorageContentView.prototype.initialLayout):
1586
1587         * Localizations/en.lproj/localizedStrings.js:
1588
1589 2019-03-28  Joseph Pecoraro  <pecoraro@apple.com>
1590
1591         Web Inspector: Show Resource Initiator in Network Tab detail views
1592         https://bugs.webkit.org/show_bug.cgi?id=196316
1593         <rdar://problem/49352679>
1594
1595         Reviewed by Devin Rousso.
1596
1597         * UserInterface/Controllers/NetworkManager.js:
1598         (WI.NetworkManager.prototype.resourceRequestWillBeSent):
1599         (WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache):
1600         (WI.NetworkManager.prototype._initiatorCallFramesFromPayload):
1601         Initialize call frames from the initiator payload.
1602
1603         * UserInterface/Models/Resource.js:
1604         (WI.Resource.prototype.get initiatorCallFrames):
1605         Initialization and accessor.
1606
1607         * UserInterface/Views/CallFrameTreeElement.js:
1608         (WI.CallFrameTreeElement):
1609         Selecting a native element won't do anything so just don't allow selection.
1610
1611         * UserInterface/Views/ResourceHeadersContentView.css:
1612         (.resource-headers .go-to-link):
1613         (.resource-headers .call-stack):
1614         (.resource-headers .call-stack:hover):
1615         (@media (prefers-color-scheme: dark)):
1616         * UserInterface/Views/ResourceHeadersContentView.js:
1617         (WI.ResourceHeadersContentView):
1618         (WI.ResourceHeadersContentView.prototype.hidden):
1619         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
1620         Add an "Initiator" line in the summary with a way to view the whole
1621         initiator backtrace if one exists.
1622
1623 2019-03-26  Devin Rousso  <drousso@apple.com>
1624
1625         Web Inspector: Sources: fix typo in CSS selector to always show add breakpoint button
1626         https://bugs.webkit.org/show_bug.cgi?id=196241
1627
1628         Reviewed by Matt Baker.
1629
1630         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1631         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoints).collapsed > .header > .options,):
1632         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): Deleted.
1633
1634 2019-03-25  Joseph Pecoraro  <pecoraro@apple.com>
1635
1636         Web Inspector: Page Weight indicator clears on pages with zero length resources (macrumors.com)
1637         https://bugs.webkit.org/show_bug.cgi?id=196170
1638
1639         Reviewed by Timothy Hatcher.
1640
1641         * UserInterface/Models/DefaultDashboard.js:
1642         (WI.DefaultDashboard.prototype._resourceSizeDidChange):
1643         Catch NaN earlier.
1644
1645         * UserInterface/Models/Resource.js:
1646         (WI.Resource.prototype.updateWithMetrics):
1647         When we receive exact metrics transition the estimated size to zero,
1648         since we won't receive any more updates for the resource.
1649
1650 2019-03-24  Devin Rousso  <drousso@apple.com>
1651
1652         Web Inspector: Canvas: WebGL action icon shouldn't invert when selected
1653         https://bugs.webkit.org/show_bug.cgi?id=196135
1654
1655         Reviewed by Timothy Hatcher.
1656
1657         * UserInterface/Views/RecordingActionTreeElement.js:
1658         (WI.RecordingActionTreeElement._classNameForAction):
1659         (WI.RecordingActionTreeElement._classNameForAction.classNameForActionName): Deleted.
1660         Remove unnecessary logging and memoization.
1661
1662         * UserInterface/Views/RecordingActionTreeElement.css:
1663         (.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
1664         (@media (prefers-color-scheme: dark)):
1665         (.item.recording-action:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
1666         (.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer) > .icon): Deleted.
1667         (.item.recording-action.has-context-replacer > .icon): Deleted.
1668         (.item.recording-action:not(.invalid, .initial-state, .has-context-replacer) > .icon): Deleted.
1669         Simplify styles between light and dark mode.
1670
1671 2019-03-24  Simon Welsh  <simon@welsh-au.com>
1672
1673         Web Inspector: testCellRoleForRequiredChidren accessibility audit checks for rows in cells
1674         https://bugs.webkit.org/show_bug.cgi?id=195988
1675
1676         Reviewed by Timothy Hatcher.
1677
1678         The audit now checks that rows contain cells, allowing any of the four
1679         cell-based roles.
1680
1681         * UserInterface/Controllers/AuditManager.js:
1682         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
1683         (WI.AuditManager):
1684         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.const.testCellRoleForRequiredChidren): Deleted.
1685
1686 2019-03-24  Devin Rousso  <drousso@apple.com>
1687
1688         Web Inspector: Canvas: missing icons for WebGL2 contexts
1689         https://bugs.webkit.org/show_bug.cgi?id=196136
1690
1691         Reviewed by Timothy Hatcher.
1692
1693         * UserInterface/Views/CanvasSidebarPanel.css:
1694         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled > .glyph): Added.
1695         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas:matches(.canvas-2d, .bitmaprenderer) .icon): Added.
1696         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas:matches(.webgl, .webgl2, .webgpu, .webmetal) .icon): Added.
1697         (@media (prefers-color-scheme: dark)):
1698         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled): Deleted.
1699         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon): Deleted.
1700         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.casnvas.webgl .icon): Deleted.
1701         Use the 2D icon for BitmapRenderer and the 3D icon for WebGL2, WebMetals, and WebGPU.
1702         Drive-by: the start/stop button text was too dark when disabled in dark mode.
1703
1704         * UserInterface/Models/Canvas.js:
1705         Drive-by: "gpu" => "webgpu", to match the protocol string.
1706
1707 2019-03-22  Devin Rousso  <drousso@apple.com>
1708
1709         Web Inspector: Sources: "Reveal in Resources Tab" still shown when Sources tab is enabled
1710         https://bugs.webkit.org/show_bug.cgi?id=196134
1711
1712         Reviewed by Joseph Pecoraro.
1713
1714         * UserInterface/Views/RecordingActionTreeElement.js:
1715         (WI.RecordingActionTreeElement.prototype.populateContextMenu):
1716         Drive-by: find the first call frame that has a source code location, rather than naively
1717         always using the top call frame.
1718
1719         * UserInterface/Views/SearchResultTreeElement.js:
1720         (WI.SearchResultTreeElement.prototype.populateContextMenu):
1721
1722 2019-03-22  Keith Rollin  <krollin@apple.com>
1723
1724         Enable ThinLTO support in Production builds
1725         https://bugs.webkit.org/show_bug.cgi?id=190758
1726         <rdar://problem/45413233>
1727
1728         Reviewed by Daniel Bates.
1729
1730         Enable building with Thin LTO in Production when using Xcode 10.2 or
1731         later. This change results in a 1.45% progression in PLT5. Full
1732         Production build times increase about 2-3%. Incremental build times
1733         are more severely affected, and so LTO is not enabled for local
1734         engineering builds.
1735
1736         LTO is enabled only on macOS for now, until rdar://problem/49013399,
1737         which affects ARM builds, is fixed.
1738
1739         To change the LTO setting when building locally:
1740
1741         - If building with `make`, specify WK_LTO_MODE={none,thin,full} on the
1742           command line.
1743         - If building with `build-webkit`, specify --lto-mode={none,thin,full}
1744           on the command line.
1745         - If building with `build-root`, specify --lto={none,thin,full} on the
1746           command line.
1747         - If building with Xcode, create a LocalOverrides.xcconfig file at the
1748           top level of your repository directory (if needed) and define
1749           WK_LTO_MODE to full, thin, or none.
1750
1751         * Configurations/Base.xcconfig:
1752
1753 2019-03-21  Joseph Pecoraro  <pecoraro@apple.com>
1754
1755         Web Inspector: Timelines - Cannot export on about:blank - suggested filename containing a colon silently fails
1756         https://bugs.webkit.org/show_bug.cgi?id=196109
1757
1758         Reviewed by Timothy Hatcher.
1759
1760         * UserInterface/Base/FileUtilities.js:
1761         (WI.FileUtilities.sanitizeFilename):
1762         (WI.FileUtilities.inspectorURLForFilename):
1763         New utility functions.
1764
1765         * UserInterface/Test.html:
1766         Include FileUtilities.
1767
1768         * UserInterface/Base/Main.js:
1769         * UserInterface/Controllers/AuditManager.js:
1770         (WI.AuditManager.prototype.export):
1771         * UserInterface/Debug/ProtocolTrace.js:
1772         (WI.ProtocolTrace.prototype.get saveData):
1773         (WI.ProtocolTrace):
1774         * UserInterface/Views/ConsoleMessageView.js:
1775         (WI.ConsoleMessageView.prototype._handleContextMenu):
1776         (WI.ConsoleMessageView):
1777         * UserInterface/Views/ContextMenuUtilities.js:
1778         * UserInterface/Views/HeapSnapshotContentView.js:
1779         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
1780         * UserInterface/Views/LogContentView.js:
1781         (WI.LogContentView.prototype.get saveData):
1782         (WI.LogContentView.prototype._handleContextMenuEvent):
1783         * UserInterface/Views/NetworkTableContentView.js:
1784         (WI.NetworkTableContentView.prototype._exportHAR):
1785         * UserInterface/Views/RecordingContentView.js:
1786         (WI.RecordingContentView.prototype._exportRecording):
1787         (WI.RecordingContentView.prototype._exportReduction):
1788         * UserInterface/Views/ScriptContentView.js:
1789         (WI.ScriptContentView.prototype.get saveData):
1790         * UserInterface/Views/ShaderProgramContentView.js:
1791         (WI.ShaderProgramContentView.prototype.get saveData):
1792         * UserInterface/Views/TextContentView.js:
1793         (WI.TextContentView.prototype.get saveData):
1794         * UserInterface/Views/TextResourceContentView.js:
1795         (WI.TextResourceContentView.prototype.get saveData):
1796         * UserInterface/Views/TimelineRecordingContentView.js:
1797         (WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
1798         Update "web-inspector:///" URL building code to use the utility.
1799
1800 2019-03-21  Nikita Vasilyev  <nvasilyev@apple.com>
1801
1802         Web Inspector: Use CSS variables for text color in Computed panel
1803         https://bugs.webkit.org/show_bug.cgi?id=196117
1804
1805         Reviewed by Timothy Hatcher.
1806
1807         * UserInterface/Views/ComputedStyleSection.css:
1808         (.computed-style-section):
1809         (.computed-style-section .computed-property-item .property-trace-item .selector):
1810         (.computed-style-section .computed-property-item .go-to-link):
1811
1812 2019-03-21  Devin Rousso  <drousso@apple.com>
1813
1814         Web Inspector: Timelines: flatten the overview to show all records, one per line
1815         https://bugs.webkit.org/show_bug.cgi?id=191901
1816         <rdar://problem/46423618>
1817
1818         Reviewed by Timothy Hatcher.
1819
1820         * UserInterface/Views/OverviewTimelineView.js:
1821         (WI.OverviewTimelineView):
1822         (WI.OverviewTimelineView.prototype.closed):
1823         (WI.OverviewTimelineView.prototype.get navigationItems): Added.
1824         (WI.OverviewTimelineView.prototype.reset):
1825         (WI.OverviewTimelineView.prototype.layout):
1826         (WI.OverviewTimelineView.prototype.get _relevantTimelines): Added.
1827         (WI.OverviewTimelineView.prototype.get _shouldGroupBySourceCode): Added.
1828         (WI.OverviewTimelineView.prototype._loadExistingRecords): Added.
1829         (WI.OverviewTimelineView.prototype._insertDataGridNode):
1830         (WI.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
1831         (WI.OverviewTimelineView.prototype._addSourceCodeTimeline):
1832         (WI.OverviewTimelineView.prototype._processPendingRepresentedObjects):
1833         (WI.OverviewTimelineView.prototype._handleGroupBySourceCodeSettingChanged): Added.
1834         (WI.OverviewTimelineView.prototype._handleGroupBySourceCodeNavigationItemCheckedDidChange): Added.
1835         (WI.OverviewTimelineView.prototype._handleTimelineRecordAdded): Added.
1836         (WI.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
1837         (WI.OverviewTimelineView.prototype._networkTimelineRecordAdded): Deleted.
1838         Listen for new records on all timelines. Add each record as a new line. Since each timeline
1839         has different data to display, only show the "name" and "graph" for all records.
1840
1841         * UserInterface/Views/TimelineRecordingContentView.js:
1842         (WI.TimelineRecordingContentView):
1843         (WI.TimelineRecordingContentView.prototype._currentContentViewDidChange):
1844         (WI.TimelineRecordingContentView.prototype._updateImportedView): Deleted.
1845         When viewing the overview of an imported recording, show the non-grouped overview.
1846
1847         * UserInterface/Models/TimelineRecording.js:
1848         (WI.TimelineRecording.prototype.addRecord):
1849         (WI.TimelineRecording.prototype._keyForRecord):
1850         Drive-by: show Media timeline events under the owner frame's resource when grouped.
1851
1852         * UserInterface/Views/TimelineRecordBar.css:
1853         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment, .timeline-record-bar.timeline-record-type-heap-allocations > .segment): Added.
1854         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment): Deleted.
1855
1856         * UserInterface/Base/Setting.js:
1857         Add setting for controlling the Timeline overview grouping.
1858
1859         * UserInterface/Main.html:
1860         * UserInterface/Views/SourceCodeTimelineTreeElement.js: Removed.
1861         * UserInterface/Views/TimelineRecordingImportedView.js: Removed.
1862         * UserInterface/Views/TimelineRecordingImportedView.css: Removed.
1863         Remove unused files.
1864
1865         * Localizations/en.lproj/localizedStrings.js:
1866
1867 2019-03-21  Devin Rousso  <drousso@apple.com>
1868
1869         Web Inspector: Sources: the name of the file should not be used as a folder
1870         https://bugs.webkit.org/show_bug.cgi?id=196064
1871         <rdar://problem/49097710>
1872
1873         Reviewed by Timothy Hatcher.
1874
1875         * UserInterface/Views/GeneralTreeElement.js:
1876         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
1877
1878         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1879         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
1880         Drive-by: sort resources in each folder by name when grouping by path.
1881
1882 2019-03-20  Devin Rousso  <drousso@apple.com>
1883
1884         Web Inspector: Canvas: rework how Canvas.enable/Canvas.disable is used so that events are not sent when the Canvas tab isn't enabled
1885         https://bugs.webkit.org/show_bug.cgi?id=195828
1886         <rdar://problem/48941756>
1887
1888         Reviewed by Timothy Hatcher.
1889
1890         * UserInterface/Controllers/CanvasManager.js:
1891         (WI.CanvasManager):
1892         (WI.CanvasManager.prototype.initializeTarget):
1893         (WI.CanvasManager.prototype.enable): Added.
1894         (WI.CanvasManager.prototype.disable): Added.
1895
1896         * UserInterface/Views/CanvasTabContentView.js:
1897         (WI.CanvasTabContentView):
1898         (WI.CanvasTabContentView.prototype.closed): Added.
1899
1900         * UserInterface/Base/Test.js:
1901         (WI.contentLoaded):
1902
1903 2019-03-20  Devin Rousso  <drousso@apple.com>
1904
1905         Web Inspector: Sources: collapsing a section doesn't shrink the space used by that section
1906         https://bugs.webkit.org/show_bug.cgi?id=196045
1907
1908         Reviewed by Timothy Hatcher.
1909
1910         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1911         (WI.SourcesNavigationSidebarPanel):
1912         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
1913         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
1914         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1915         (.sidebar > .panel.navigation.sources > .content > .details-section):
1916         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,):
1917         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
1918         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint):
1919         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content,):
1920         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content):
1921         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content):
1922         (.sidebar > .panel.navigation.sources > .content > .details-section.call-stack):
1923         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints):
1924         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint):
1925         (.sidebar > .panel.navigation.sources > .content > .pause-reason):
1926         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content,):
1927         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon):
1928         (.sidebar > .panel.navigation.sources > .content .details-section): Deleted.
1929         (.sidebar > .panel.navigation.sources > .content .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): Deleted.
1930         (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content): Deleted.
1931         (.sidebar > .panel.navigation.sources > .content .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
1932         (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
1933         (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Deleted.
1934         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Deleted.
1935         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Deleted.
1936         (.sidebar > .panel.navigation.sources > .content > .resources-container): Deleted.
1937         (.sidebar > .panel.navigation.sources > .content > .pause-reason-container): Deleted.
1938         (.sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Deleted.
1939         (.sidebar > .panel.navigation.sources > .content > .breakpoints .tree-outline .item.event-target-window .icon): Deleted.
1940          - Apply the overflow scrolling to the content element of each `WI.DetailsSection`.
1941          - Ensure that there is a maximum height for each section.
1942          - When `.collapsed`, don't try to grow/shrink the section based on its contents.
1943
1944         * UserInterface/Views/CallFrameTreeElement.css:
1945         (.tree-outline .item.call-frame):
1946         (.tree-outline .item.call-frame .status):
1947         Make the container of the active call frame status indicator relatively positioned so that
1948         the active call frame status indicator will follow the container when scrolling.
1949
1950 2019-03-20  Devin Rousso  <drousso@apple.com>
1951
1952         Web Inspector: Timeline should show when events preventDefault() was called on an event or not
1953         https://bugs.webkit.org/show_bug.cgi?id=176824
1954         <rdar://problem/34290931>
1955
1956         Reviewed by Timothy Hatcher.
1957
1958         Original patch by Joseph Pecoraro <pecoraro@apple.com>.
1959
1960         * Localizations/en.lproj/localizedStrings.js:
1961         New string.
1962
1963         * UserInterface/Controllers/TimelineManager.js:
1964         (WI.TimelineManager.prototype._processRecord):
1965         Include the whole data object as extra details.
1966
1967         * UserInterface/Models/ScriptTimelineRecord.js:
1968         (WI.ScriptTimelineRecord):
1969         (WI.ScriptTimelineRecord.prototype.get eventType):
1970         Wholesale copy of the extra data instead of just a single property.
1971
1972         * UserInterface/Views/ScriptDetailsTimelineView.js:
1973         (WI.ScriptDetailsTimelineView):
1974         Give the name column more initial space, there is still extra space
1975         after this adjustment but name is comfortably larger (and the most
1976         likely to be expanded).
1977
1978         * UserInterface/Views/ScriptTimelineDataGridNode.js:
1979         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
1980         Include "default prevented" as the event's subtitle if it was prevented.
1981
1982 2019-03-20  Devin Rousso  <drousso@apple.com>
1983
1984         Web Inspector: Styles Redesign: Editing selector should not hide the rule
1985         https://bugs.webkit.org/show_bug.cgi?id=178489
1986         <rdar://problem/35062434>
1987
1988         Reviewed by Timothy Hatcher.
1989
1990         Extracts the selector payload parsing logic inside `WI.DOMNodeStyles` into static functions
1991         so that when the user changes the selector of a `WI.CSSRule`, it's able to process and
1992         update itself with the new selector. This is mainly useful in the case where the `WI.CSSRule`
1993         no longer applies to the selected node (meaning it won't be part of that node's
1994         `WI.DOMNodeStyles`) in that it allows the `WI.SpreadsheetCSSStyleDeclarationSection` to
1995         display the new selector text and the owner `WI.SpreadsheetRulesStyleDetailsPanel` to keep
1996         that section visible even though it isn't applicable to the current node anymore.
1997
1998         * UserInterface/Models/DOMNodeStyles.js:
1999         (WI.DOMNodeStyles):
2000         (WI.DOMNodeStyles.parseSelectorListPayload): Added.
2001         (WI.DOMNodeStyles.createSourceCodeLocation): Added.
2002         (WI.DOMNodeStyles.prototype.refresh):
2003         (WI.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
2004         (WI.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
2005         (WI.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
2006         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
2007         (WI.DOMNodeStyles.prototype._parseRulePayload):
2008         (WI.DOMNodeStyles.prototype._styleSheetContentDidChange):
2009         (WI.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload): Deleted.
2010         (WI.DOMNodeStyles.prototype._createSourceCodeLocation): Deleted.
2011         (WI.DOMNodeStyles.prototype._parseSelectorListPayload): Deleted.
2012         Keep track of all `WI.CSSRule` and `WI.CSSStyleDeclaration` that have ever been associated
2013         with this object, so that if a rule's selector is changed to no longer match, and then is
2014         changed back to match again, we are able to update that rule instead of creating a new one.
2015
2016         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2017         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2018         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
2019         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionSelectorWillChange): Added.
2020         Attempt to preserve the position of any sections that are changed and no longer apply to the
2021         current node.
2022
2023         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2024         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
2025         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
2026         Drive-by: remove unused CSS classes.
2027
2028         * UserInterface/Models/CSSRule.js:
2029         (WI.CSSRule.prototype.update):
2030         (WI.CSSRule.prototype._selectorResolved):
2031         Drive-by: remove unused event.
2032
2033         * UserInterface/Base/Multimap.js:
2034         (Multimap.prototype.has): Added.
2035         (Multimap.prototype.sets): Added.
2036         (Multimap.prototype.copy): Added.
2037
2038 2019-03-20  Devin Rousso  <drousso@apple.com>
2039
2040         Web Inspector: no way to filter out all console messages or all evaluations/results
2041         https://bugs.webkit.org/show_bug.cgi?id=167035
2042         <rdar://problem/30023523>
2043
2044         Reviewed by Timothy Hatcher.
2045
2046         * UserInterface/Views/LogContentView.js:
2047         (WI.LogContentView):
2048         (WI.LogContentView.prototype.didAppendConsoleMessageView):
2049         (WI.LogContentView.prototype._markScopeBarItemUnread):
2050         (WI.LogContentView.prototype._markScopeBarItemForMessageLevelUnread): Added.
2051         (WI.LogContentView.prototype._previousMessageRepeatCountUpdated):
2052         (WI.LogContentView.prototype._messageSourceBarSelectionDidChange):
2053         (WI.LogContentView.prototype._scopeBarSelectionDidChange):
2054         (WI.LogContentView.prototype._filterMessageElements):
2055         (WI.LogContentView.prototype.performSearch):
2056         * UserInterface/Views/LogContentView.css:
2057         (.log-scope-bar > li.unread.evaluations::before): Added.
2058
2059         * UserInterface/Views/ConsoleCommandView.js:
2060         (WI.ConsoleCommandView):
2061         Drive-by: remove unnecessary super-class extends.
2062
2063         * Localizations/en.lproj/localizedStrings.js:
2064
2065 2019-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
2066
2067         Web Inspector: Styles: enabledProperties don't get invalidated after removing property
2068         https://bugs.webkit.org/show_bug.cgi?id=196038
2069
2070         Reviewed by Timothy Hatcher.
2071
2072         * UserInterface/Models/CSSStyleDeclaration.js:
2073         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
2074
2075 2019-03-20  Devin Rousso  <drousso@apple.com>
2076
2077         Web Inspector: DOM: include window as part of any event listener chain
2078         https://bugs.webkit.org/show_bug.cgi?id=195730
2079         <rdar://problem/48916872>
2080
2081         Reviewed by Timothy Hatcher.
2082
2083         Allow non-nodes (e.g. `window`) to be listed as the target of an event listener.
2084         Add support for the same concept when showing breakpoint details after pausing on a specific
2085         event listener in the Debugger/Sources navigation sidebar.
2086
2087         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2088         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
2089         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByEvent):
2090         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByTarget): Added.
2091         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
2092         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
2093         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode): Deleted.
2094
2095         * UserInterface/Views/EventListenerSectionGroup.js:
2096         (WI.EventListenerSectionGroup.prototype._targetTextOrLink): Added.
2097         (WI.EventListenerSectionGroup.prototype._nodeTextOrLink): Deleted.
2098
2099         * UserInterface/Views/DebuggerSidebarPanel.js:
2100         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
2101         (WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
2102         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
2103         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
2104         * UserInterface/Views/DebuggerSidebarPanel.css:
2105         (.sidebar > .panel.navigation.debugger > .content > .breakpoints .tree-outline .item.event-target-window .icon): Added.
2106
2107         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2108         (WI.SourcesNavigationSidebarPanel):
2109         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
2110         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
2111         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
2112         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2113         (.sidebar > .panel.navigation.sources > .content > .breakpoints .tree-outline .item.event-target-window .icon): Added.
2114
2115         * Localizations/en.lproj/localizedStrings.js:
2116
2117 2019-03-20  Devin Rousso  <drousso@apple.com>
2118
2119         Web Inspector: Debugger: virtualize the list of variables in the Scope sidebar
2120         https://bugs.webkit.org/show_bug.cgi?id=192648
2121         <rdar://problem/46800949>
2122
2123         Reviewed by Joseph Pecoraro.
2124
2125         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2126         (WI.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
2127
2128         * UserInterface/Views/TreeElement.js:
2129         (WI.TreeElement.prototype.set hidden):
2130         (WI.TreeElement.prototype._attach):
2131         (WI.TreeElement.prototype._detach):
2132         (WI.TreeElement.prototype.collapse):
2133         (WI.TreeElement.prototype.expand):
2134         Move `updateVirtualizedElements` calls to the owner `WI.TreeOutline` to ensure that they get
2135         called. Make the remaining calls use rAF debouncing to better coalesce updates.
2136
2137         * UserInterface/Views/TreeOutline.js:
2138         (WI.TreeOutline.prototype._rememberTreeElement):
2139         (WI.TreeOutline.prototype._forgetTreeElement):
2140         (WI.TreeOutline.prototype.registerScrollVirtualizer):
2141         (WI.TreeOutline.prototype._updateVirtualizedElements.calculateOffsetFromContainer): Added.
2142         (WI.TreeOutline.prototype._updateVirtualizedElements):
2143         (WI.TreeOutline.prototype._calculateVirtualizedValues): Deleted.
2144         Calculate the `WI.TreeOutline`'s top offset within the scroll container so that it will only
2145         update when it's within the visual area.
2146
2147         * UserInterface/Views/Utilities.js:
2148         (Array.prototype.remove):
2149         Return whether the item was actually removed from the array.
2150
2151 2019-03-20  Joseph Pecoraro  <pecoraro@apple.com>
2152
2153         Web Inspector: Timelines - Export fails for MediaTimelineRecords with originator DOM Node - Cannot serialize cyclic structure
2154         https://bugs.webkit.org/show_bug.cgi?id=196027
2155
2156         Reviewed by Timothy Hatcher.
2157
2158         * UserInterface/Models/MediaTimelineRecord.js:
2159         (WI.MediaTimelineRecord.prototype.toJSON):
2160         Remove the originator since that is a WI.DOMNode and cannot
2161         be JSON serialized.
2162
2163 2019-03-20  Devin Rousso  <drousso@apple.com>
2164
2165         Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
2166         https://bugs.webkit.org/show_bug.cgi?id=192719
2167         <rdar://problem/46746857>
2168
2169         Reviewed by Timothy Hatcher.
2170
2171         * UserInterface/Controllers/DebuggerManager.js:
2172         (WI.DebuggerManager):
2173         (WI.DebuggerManager.prototype.addBreakpoint):
2174         (WI.DebuggerManager.prototype.removeBreakpoint):
2175         (WI.DebuggerManager.prototype._debuggerBreakpointOptions):
2176         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
2177         (WI.DebuggerManager.prototype._setBreakpoint):
2178         (WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):
2179         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
2180         (WI.DebuggerManager.prototype._saveBreakpoints): Deleted.
2181
2182         * UserInterface/Models/Breakpoint.js:
2183         (WI.Breakpoint.prototype.saveIdentityToCookie):
2184         (WI.Breakpoint.prototype.serializeOptions): Added.
2185         (WI.Breakpoint.prototype.toJSON): Added.
2186         (WI.Breakpoint.prototype.get options): Deleted.
2187         (WI.Breakpoint.prototype.get info): Deleted.
2188         (WI.Breakpoint.prototype._serializableActions): Deleted.
2189         * UserInterface/Models/BreakpointAction.js:
2190         (WI.BreakpointAction.prototype.toJSON): Added.
2191         (WI.BreakpointAction.prototype.get info): Deleted.
2192
2193         * UserInterface/Base/ObjectStore.js:
2194         (WI.ObjectStore.async reset): Added.
2195         (WI.ObjectStore._open):
2196         (WI.ObjectStore.prototype.get keyPath): Added.
2197         (WI.ObjectStore.prototype.async.getAll):
2198         (WI.ObjectStore.prototype.async.put): Added.
2199         (WI.ObjectStore.prototype.async.putObject): Added.
2200         (WI.ObjectStore.prototype.async.add): Deleted.
2201         (WI.ObjectStore.prototype.async.addObject): Deleted.
2202         Replace `add` with `put` so that if a key already exists, it is overridden.
2203
2204         * UserInterface/Controllers/AuditManager.js:
2205         (WI.AuditManager.prototype.set editing):
2206         (WI.AuditManager.prototype.async processJSON):
2207
2208         * UserInterface/Controllers/BreakpointPopoverController.js:
2209         (WI.BreakpointPopoverController.prototype._popoverActionsAddActionButtonClicked):
2210         Inline some `WI.Breakpoint` static values.
2211
2212 2019-03-20  Devin Rousso  <drousso@apple.com>
2213
2214         Web Inspector: Sources: disabled breakpoints banner should be sticky
2215         https://bugs.webkit.org/show_bug.cgi?id=195104
2216         <rdar://problem/48442259>
2217
2218         Reviewed by Timothy Hatcher.
2219
2220         Allow each of the individual sections to be scrolled separately from the entire sidebar.
2221
2222         Leverage CSS variables set via JavaScript to be able to calculate the maximum height of each
2223         `WI.TreeOutline` section based on the number of items.
2224
2225         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2226         (WI.SourcesNavigationSidebarPanel):
2227         (WI.SourcesNavigationSidebarPanel.prototype._handleCallStackElementAddedOrRemoved): Added.
2228         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
2229         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
2230         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
2231         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2232         (.sidebar > .panel.navigation.sources > .content):
2233         (.sidebar > .panel.navigation.sources > .content .details-section): Added.
2234         (.sidebar > .panel.navigation.sources > .content .details-section.paused-reason.collapsed > .header > .options,): Added.
2235         (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content): Added.
2236         (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Added.
2237         (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Added.
2238         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Added.
2239         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Added.
2240         (.sidebar > .panel.navigation.sources > .content > .resources-container): Added.
2241         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
2242         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
2243         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content): Added.
2244         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content > .pause-reason-container): Added.
2245         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Added.
2246         (.sidebar > .panel.navigation.sources > .content > .details-section): Deleted.
2247         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,): Deleted.
2248         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content): Deleted.
2249         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
2250         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
2251         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
2252         (.sidebar > .panel.navigation.sources > .content > .resources): Deleted.
2253
2254 2019-03-20  Devin Rousso  <drousso@apple.com>
2255
2256         "Reveal in Layers Tab" context menu option should not be available if the Layers Tab has not been enabled
2257         https://bugs.webkit.org/show_bug.cgi?id=196009
2258
2259         Reviewed by Joseph Pecoraro.
2260
2261         * UserInterface/Views/ContextMenuUtilities.js:
2262         (WI.appendContextMenuItemsForDOMNode):
2263
2264 2019-03-20  Devin Rousso  <drousso@apple.com>
2265
2266         Web Inspector: Console: add a setting for controlling auto-expansion of Trace messages
2267         https://bugs.webkit.org/show_bug.cgi?id=195690
2268
2269         Reviewed by Timothy Hatcher.
2270
2271         * UserInterface/Views/ConsoleMessageView.js:
2272         (WI.ConsoleMessageView.prototype._appendStackTrace):
2273
2274         * UserInterface/Base/Setting.js:
2275         * UserInterface/Views/SettingsTabContentView.js:
2276         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2277
2278         * Localizations/en.lproj/localizedStrings.js:
2279
2280 2019-03-20  Devin Rousso  <drousso@apple.com>
2281
2282         Web Inspector: DOM: selecting a node in a different frame should automatically switch the console prompt's execution context
2283         https://bugs.webkit.org/show_bug.cgi?id=195805
2284         <rdar://problem/48930866>
2285
2286         Reviewed by Timothy Hatcher.
2287
2288         Add an "Auto" execution context item that is selected by default and will update the
2289         selected execution context whenever the inspected node changes. It will also display the
2290         preferred name for whatever execution context is currently active.
2291
2292         * UserInterface/Views/QuickConsole.js:
2293         (WI.QuickConsole):
2294         (WI.QuickConsole.prototype.initializeMainExecutionContextPathComponent):
2295         (WI.QuickConsole.prototype._preferredNameForFrame): Added.
2296         (WI.QuickConsole.prototype._selectExecutionContext): Added.
2297         (WI.QuickConsole.prototype._executionContextPathComponentsToDisplay):
2298         (WI.QuickConsole.prototype._rebuildExecutionContextPathComponents):
2299         (WI.QuickConsole.prototype._framePageExecutionContextsChanged):
2300         (WI.QuickConsole.prototype._frameExecutionContextsCleared):
2301         (WI.QuickConsole.prototype._activeExecutionContextChanged):
2302         (WI.QuickConsole.prototype._createExecutionContextPathComponent):
2303         (WI.QuickConsole.prototype._insertOtherExecutionContextPathComponent):
2304         (WI.QuickConsole.prototype._removeOtherExecutionContextPathComponent):
2305         (WI.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
2306         (WI.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
2307         (WI.QuickConsole.prototype._targetRemoved):
2308         (WI.QuickConsole.prototype._pathComponentSelected):
2309         (WI.QuickConsole.prototype._handleInspectedNodeChanged): Added.
2310         (WI.QuickConsole.prototype.get selectedExecutionContext): Deleted.
2311         (WI.QuickConsole.prototype.set selectedExecutionContext): Deleted.
2312         (WI.QuickConsole.prototype._createExecutionContextPathComponentFromFrame): Deleted.
2313         * UserInterface/Views/QuickConsole.css:
2314         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context)): Added.
2315         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context): Added.
2316         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context .selector-arrows): Added.
2317         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context): Deleted.
2318         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows): Deleted.
2319
2320         * UserInterface/Controllers/DOMManager.js:
2321         (WI.DOMManager.prototype.get inspectedNode): Added.
2322         (WI.DOMManager.prototype.setInspectedNode):
2323         Broadcast when the inspected node changes.
2324
2325         * UserInterface/Views/NavigationBar.js:
2326         (WI.NavigationBar.prototype.layout):
2327         When `sizesToFit` is enabled, don't force any items to be hidden.
2328
2329         * Localizations/en.lproj/localizedStrings.js:
2330
2331 2019-03-20  Devin Rousso  <drousso@apple.com>
2332
2333         Web Inspector: refactor WI.TimelineDataGridNode and its subclasses to unify the API surface
2334         https://bugs.webkit.org/show_bug.cgi?id=195959
2335         <rdar://problem/49028896>
2336
2337         Reviewed by Timothy Hatcher.
2338
2339         * UserInterface/Views/TimelineDataGridNode.js:
2340         (WI.TimelineDataGridNode.prototype.get records):
2341         (WI.TimelineDataGridNode.prototype.get data):
2342         (WI.TimelineDataGridNode.prototype.refresh):
2343
2344         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
2345         (WI.HeapAllocationsTimelineDataGridNode):
2346         (WI.HeapAllocationsTimelineDataGridNode.prototype.get heapSnapshot): Added.
2347         (WI.HeapAllocationsTimelineDataGridNode.prototype.get data):
2348         (WI.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
2349         (WI.HeapAllocationsTimelineDataGridNode.prototype.createCells):
2350         (WI.HeapAllocationsTimelineDataGridNode.prototype._handleHeapSnapshotCollectedNodes):
2351         (WI.HeapAllocationsTimelineDataGridNode.prototype._handleHeapSnapshotInvalidated):
2352         (WI.HeapAllocationsTimelineDataGridNode.prototype.get record): Deleted.
2353         (WI.HeapAllocationsTimelineDataGridNode.prototype.updateTimestamp): Deleted.
2354         (WI.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes): Deleted.
2355         (WI.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated): Deleted.
2356
2357         * UserInterface/Views/LayoutTimelineDataGridNode.js:
2358         (WI.LayoutTimelineDataGridNode):
2359         (WI.LayoutTimelineDataGridNode.prototype.get data):
2360         (WI.LayoutTimelineDataGridNode.prototype.createCellContent):
2361         (WI.LayoutTimelineDataGridNode.prototype.get records): Deleted.
2362
2363         * UserInterface/Views/MediaTimelineDataGridNode.js:
2364         (WI.MediaTimelineDataGridNode):
2365         (WI.MediaTimelineDataGridNode.prototype.get records): Deleted.
2366
2367         * UserInterface/Views/ProfileNodeDataGridNode.js:
2368         (WI.ProfileNodeDataGridNode):
2369         (WI.ProfileNodeDataGridNode.prototype.get profileNode):
2370         (WI.ProfileNodeDataGridNode.prototype.get data):
2371         (WI.ProfileNodeDataGridNode.prototype.createCellContent):
2372         (WI.ProfileNodeDataGridNode.prototype._populate):
2373         (WI.ProfileNodeDataGridNode.prototype.get records): Deleted.
2374         (WI.ProfileNodeDataGridNode.prototype.get baseStartTime): Deleted.
2375         (WI.ProfileNodeDataGridNode.prototype.get rangeStartTime): Deleted.
2376         (WI.ProfileNodeDataGridNode.prototype.get rangeEndTime): Deleted.
2377         (WI.ProfileNodeDataGridNode.prototype.updateRangeTimes): Deleted.
2378         (WI.ProfileNodeDataGridNode.prototype.refresh): Deleted.
2379
2380         * UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
2381         (WI.RenderingFrameTimelineDataGridNode):
2382         (WI.RenderingFrameTimelineDataGridNode.prototype.get data):
2383         (WI.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
2384         (WI.RenderingFrameTimelineDataGridNode.prototype.get records): Deleted.
2385
2386         * UserInterface/Views/ResourceTimelineDataGridNode.js:
2387         (WI.ResourceTimelineDataGridNode):
2388         (WI.ResourceTimelineDataGridNode.prototype.get resource):
2389         (WI.ResourceTimelineDataGridNode.prototype.get data):
2390         (WI.ResourceTimelineDataGridNode.prototype.createCellContent):
2391         (WI.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
2392         (WI.ResourceTimelineDataGridNode.prototype.filterableDataForColumn):
2393         (WI.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
2394         (WI.ResourceTimelineDataGridNode.prototype._cachedCellContent):
2395         (WI.ResourceTimelineDataGridNode.prototype._timelineRecordUpdated):
2396         (WI.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
2397         (WI.ResourceTimelineDataGridNode.prototype._updateStatus):
2398         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get startTime):
2399         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get currentTime):
2400         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get endTime):
2401         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get _extraTimePadding):
2402         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
2403         (WI.ResourceTimelineDataGridNode.prototype.get records): Deleted.
2404
2405         * UserInterface/Views/ResourceTimingPopoverDataGridNode.js:
2406         (WI.ResourceTimingPopoverDataGridNode):
2407         (WI.ResourceTimingPopoverDataGridNode.prototype.get records): Deleted.
2408
2409         * UserInterface/Views/ScriptTimelineDataGridNode.js:
2410         (WI.ScriptTimelineDataGridNode.prototype.get data):
2411         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
2412         (WI.ScriptTimelineDataGridNode.prototype.createCellContent):
2413         (WI.ScriptTimelineDataGridNode.prototype.get records): Deleted.
2414         (WI.ScriptTimelineDataGridNode.prototype.get baseStartTime): Deleted.
2415         (WI.ScriptTimelineDataGridNode.prototype.get rangeStartTime): Deleted.
2416         (WI.ScriptTimelineDataGridNode.prototype.get rangeEndTime): Deleted.
2417         (WI.ScriptTimelineDataGridNode.prototype.updateRangeTimes): Deleted.
2418
2419         * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
2420         (WI.SourceCodeTimelineTimelineDataGridNode.prototype.get data):
2421
2422         * UserInterface/Views/HeapAllocationsTimelineView.js:
2423         (WI.HeapAllocationsTimelineView):
2424         (WI.HeapAllocationsTimelineView.prototype.layout):
2425         (WI.HeapAllocationsTimelineView.prototype.reset):
2426         * UserInterface/Views/LayoutTimelineView.js:
2427         (WI.LayoutTimelineView.prototype._processPendingRecords):
2428         * UserInterface/Views/MediaTimelineView.js:
2429         (WI.MediaTimelineView.prototype._processPendingRecords):
2430         * UserInterface/Views/NetworkTimelineView.js:
2431         (WI.NetworkTimelineView.prototype._processPendingRecords):
2432         * UserInterface/Views/OverviewTimelineView.js:
2433         (WI.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
2434         (WI.OverviewTimelineView.prototype._addSourceCodeTimeline):
2435         * UserInterface/Views/RenderingFrameTimelineView.js:
2436         (WI.RenderingFrameTimelineView.prototype._processPendingRecords):
2437         * UserInterface/Views/ScriptDetailsTimelineView.js:
2438         (WI.ScriptDetailsTimelineView.prototype.layout):
2439         (WI.ScriptDetailsTimelineView.prototype._processPendingRecords):
2440         Update Timeline `WI.DataGrid` views to use the new constructor format.
2441
2442         * UserInterface/Views/ResourceTimelineDataGridNode.css:
2443         (.resource-timing-popover-content .data-grid td.graph-column):
2444         Drive-by: add extra padding before/after resource timing bars shown when hovering.
2445
2446 2019-03-20  Devin Rousso  <drousso@apple.com>
2447
2448         Web Inspector: changes to CSS resources only take affect once editing stops
2449         https://bugs.webkit.org/show_bug.cgi?id=195774
2450         <rdar://problem/48905413>
2451
2452         Reviewed by Timothy Hatcher.
2453
2454         * UserInterface/Controllers/CSSManager.js:
2455         (WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
2456         (WI.CSSManager.prototype._resourceContentDidChange):
2457         (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
2458         (WI.CSSManager.prototype._updateResourceContent):
2459         Use a `Throttler` instead of a 500ms debounce.
2460
2461 2019-03-20  Devin Rousso  <drousso@apple.com>
2462
2463         Web Inspector: Search: allow DOM searches to be case sensitive
2464         https://bugs.webkit.org/show_bug.cgi?id=194673
2465         <rdar://problem/48087577>
2466
2467         Reviewed by Timothy Hatcher.
2468
2469         * UserInterface/Views/SearchSidebarPanel.js:
2470         (WI.SearchSidebarPanel.prototype.performSearch):
2471
2472         * UserInterface/Views/DOMTreeContentView.js:
2473         (WI.DOMTreeContentView.prototype.performSearch.contextNodesReady):
2474
2475         * UserInterface/Controllers/DOMManager.js:
2476         (WI.DOMManager.prototype.performSearch.callback): Deleted.
2477         (WI.DOMManager.prototype.performSearch): Deleted.
2478         (WI.DOMManager.prototype.searchResult.mycallback): Deleted.
2479         (WI.DOMManager.prototype.searchResult): Deleted.
2480         (WI.DOMManager.prototype.cancelSearch): Deleted.
2481         Drive-by: remove unused code.
2482
2483 2019-03-19  Devin Rousso  <drousso@apple.com>
2484
2485         Web Inspector: Sources: provide option to group by path
2486         https://bugs.webkit.org/show_bug.cgi?id=195203
2487         <rdar://problem/27340680>
2488
2489         Reviewed by Timothy Hatcher.
2490
2491         Create top-level folders for each origin and nest all resources (in a folder chain) underneath.
2492
2493         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2494         (WI.SourcesNavigationSidebarPanel):
2495         (WI.SourcesNavigationSidebarPanel.prototype.closed):
2496         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.searchTreeOutline): Added.
2497         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
2498         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
2499         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
2500         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
2501         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
2502         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
2503         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown.addOption): Added.
2504         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Added.
2505         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
2506         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
2507         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
2508         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
2509         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2510         (.sidebar > .panel.navigation.sources > .content):
2511         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
2512         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Added.
2513         (.sidebar > .panel.navigation.sources > .content > .resources): Added.
2514         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
2515         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
2516         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)): Deleted.
2517         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
2518         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
2519         Drive-by: fix "No Filter Results" message view to not overlap eachother.
2520         Drive-by: try to be more smart about what tree we focus when selecting a represented object.
2521
2522         * UserInterface/Views/ResourceTreeElement.js:
2523         (WI.ResourceTreeElement):
2524         (WI.ResourceTreeElement.prototype.get mainTitleText):
2525         (WI.ResourceTreeElement.prototype._updateTitles):
2526         * UserInterface/Base/URLUtilities.js:
2527         (WI.displayNameForURL):
2528         Provide a way for the display name to use a directory "/" instead of the last path component.
2529         This is needed in cases where the loaded resource is an implicit "index.*".
2530
2531         * UserInterface/Views/GeneralTreeElement.js:
2532         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath): Added.
2533         * UserInterface/Views/SourceCodeTreeElement.js:
2534         (WI.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath): Deleted.
2535
2536         * Localizations/en.lproj/localizedStrings.js:
2537         * UserInterface/Models/Resource.js:
2538
2539         * UserInterface/Views/DetailsSection.css:
2540         (.details-section > .header .go-to-arrow):
2541         Drive-by: vertically center go-to-arrow.
2542
2543         * UserInterface/Protocol/InspectorFrontendAPI.js:
2544         (InspectorFrontendAPI.contextMenuItemSelected):
2545
2546         * UserInterface/Base/Setting.js:
2547         * UserInterface/Views/NetworkTableContentView.js:
2548         (WI.NetworkTableContentView):
2549         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
2550         (WI.NetworkTableContentView.prototype._populateNameCell):
2551         (WI.NetworkTableContentView.prototype._generateSortComparator):
2552         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
2553         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
2554         (WI.NetworkTableContentView.prototype._handleGroupMediaRequestsByDOMNodeCheckedDidChange): Added.
2555         (WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange): Deleted.
2556         Rename the `groupByNode` setting to be more specific.
2557
2558 2019-03-19  Devin Rousso  <drousso@apple.com>
2559
2560         Web Inspector: CPU Usage Timeline - the right edge of each column should align with a CPU measurement
2561         https://bugs.webkit.org/show_bug.cgi?id=195789
2562         <rdar://problem/48915271>
2563
2564         Reviewed by Joseph Pecoraro.
2565
2566         Right now, each column is rendered such that the middle of the column is aligned with the
2567         time of the CPU measurement. This could potentially be misleading, as the width/position of
2568         the bar implies that there was a period of time after the actual time of the CPU measurement
2569         that should be "attributed" to that same CPU measurement.
2570
2571            1      2      3
2572                _______
2573                [  *  ]
2574                [  *  ]_______
2575                [  *  ][  *  ]
2576         _______[  *  ][  *  ]
2577         [  *  ][  *  ][  *  ]
2578         [__*__][__*__][__*__]
2579          A   B  C   D  E   F
2580
2581         In this example, one might "attribute" any work done at time B to record 1, when in reality,
2582         it should be "attributed" to record 2, since the CPU measurement had already been taken by
2583         the time B was captured, meaning that the work for B hadn't yet been done and could
2584         therefore not have affected the CPU measurement for record 1.
2585
2586         We should be rendering the columns such that the CPU measurement aligns with the trailing
2587         edge of the column, so that all of the work that could be "attributed" to a given CPU
2588         measurement comes before it.
2589
2590           1      2      3
2591             _______       ___
2592             [    *]       [
2593             [    *]_______[
2594             [    *][    *][
2595         ____[    *][    *][
2596           *][    *][    *][
2597         __*][____*][____*][__
2598          A   B  C   D  E   F
2599
2600                 NOTE: this "rendering" isn't exactly accurate, as the `*` should overlap the `]`.
2601
2602         Legend:
2603          - `[     ]` represents a column for a CPU measurement
2604          - `*` represents the time when the measurement actually takes place
2605
2606         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2607         (WI.CPUTimelineOverviewGraph.prototype.layout):
2608         (WI.CPUTimelineOverviewGraph.prototype._handleChartClick):
2609         * UserInterface/Views/TimelineOverview.js:
2610         (WI.TimelineOverview.prototype._recordSelected):
2611
2612 2019-03-19  Devin Rousso  <drousso@apple.com>
2613
2614         Web Inspector: Provide $event in the console when paused on an event listener
2615         https://bugs.webkit.org/show_bug.cgi?id=188672
2616
2617         Reviewed by Timothy Hatcher.
2618
2619         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2620         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
2621
2622 2019-03-19  Devin Rousso  <drousso@apple.com>
2623
2624         Web Inspector: DOM: "Capture Screenshot" should only be shown if the node is attached
2625         https://bugs.webkit.org/show_bug.cgi?id=195793
2626         <rdar://problem/48916594>
2627
2628         Reviewed by Joseph Pecoraro.
2629
2630         * UserInterface/Models/DOMNode.js:
2631         (WI.DOMNode.prototype.get attached): Added.
2632
2633         * UserInterface/Views/ContextMenuUtilities.js:
2634         (WI.appendContextMenuItemsForDOMNode):
2635         * UserInterface/Views/DOMTreeElement.js:
2636         (WI.DOMTreeElement.prototype._populateTagContextMenu):
2637
2638 2019-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2639
2640         Web Inspector: HAR Extension for `serverIPAddress` port number
2641         https://bugs.webkit.org/show_bug.cgi?id=195695
2642
2643         Reviewed by Matt Baker.
2644
2645         * UserInterface/Controllers/HARBuilder.js:
2646         (WI.HARBuilder.entry):
2647         (WI.HARBuilder.port):
2648         * UserInterface/Models/LocalResource.js:
2649         (WI.LocalResource.fromHAREntry):
2650
2651 2019-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
2652
2653         Web Inspector: Changes: style attribute changes aren't being tracked
2654         https://bugs.webkit.org/show_bug.cgi?id=193859
2655         <rdar://problem/47568977>
2656
2657         Reviewed by Devin Rousso.
2658
2659         * UserInterface/Controllers/CSSManager.js:
2660         (WI.CSSManager):
2661         (WI.CSSManager.prototype.get modifiedStyles):
2662         (WI.CSSManager.prototype.addModifiedStyle):
2663         (WI.CSSManager.prototype._mainResourceDidChange):
2664         (WI.CSSManager.prototype.get modifiedCSSRules): Deleted.
2665         (WI.CSSManager.prototype.addModifiedCSSRule): Deleted.
2666         (WI.CSSManager.prototype.removeModifiedCSSRule): Deleted.
2667         * UserInterface/Models/CSSRule.js:
2668         (WI.CSSRule.prototype.get stringId): Deleted.
2669         (WI.CSSRule.prototype.markModified): Deleted.
2670         * UserInterface/Models/CSSStyleDeclaration.js:
2671         (WI.CSSStyleDeclaration.prototype.get stringId):
2672         (WI.CSSStyleDeclaration.prototype.markModified):
2673         Inline styles weren't tracked because they didn't have owner rules.
2674         Track style declarations instead of CSS rules.
2675
2676         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
2677         (.sidebar > .panel.changes-panel .css-rule):
2678         (.sidebar > .panel.changes-panel .css-rule + .css-rule):
2679         (.changes-panel .selector.style-attribute):
2680         (.changes-panel .selector:not(.style-attribute)):
2681         (.changes-panel .css-property-line > .property):
2682         (.changes-panel .css-property-line.unchanged): Deleted.
2683         Drive-by: use text-color-secondary for unchanged properties instead of altering opacity.
2684
2685         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
2686         (WI.ChangesDetailsSidebarPanel.prototype.layout):
2687         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
2688         For an inline style declaration, instead of showing a CSS source file location show an appropriate selector for its DOM node.
2689
2690 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
2691
2692         Web Inspector: HAR Extension for Resource Priority
2693         https://bugs.webkit.org/show_bug.cgi?id=195693
2694
2695         Reviewed by Devin Rousso.
2696
2697         * UserInterface/Controllers/HARBuilder.js:
2698         (WI.HARBuilder.entry):
2699         (WI.HARBuilder.priority):
2700         (WI.HARBuilder.networkPriorityFromHARPriority):
2701         Include priority custom extension.
2702
2703         * UserInterface/Models/LocalResource.js:
2704         (WI.LocalResource.fromHAREntry):
2705         Import priority.
2706
2707 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
2708
2709         Web Inspector: CPU Usage Timeline - Give long thread names a tooltip if they could be ellipsized
2710         https://bugs.webkit.org/show_bug.cgi?id=195314
2711
2712         Reviewed by Devin Rousso.
2713
2714         * UserInterface/Views/CPUUsageView.js:
2715         (WI.CPUUsageView):
2716
2717 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
2718
2719         Web Inspector: CPU Usage Timeline - Reduce the intensity of the orange overlay color in dark mode
2720         https://bugs.webkit.org/show_bug.cgi?id=195772
2721
2722         Reviewed by Devin Rousso.
2723
2724         * UserInterface/Views/Variables.css:
2725         (@media (prefers-color-scheme: dark)):
2726         (:root):
2727
2728 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
2729
2730         Web Inspector: Timelines - Import / Export Timeline Recordings
2731         https://bugs.webkit.org/show_bug.cgi?id=195709
2732         <rdar://problem/23188921>
2733
2734         Reviewed by Devin Rousso.
2735
2736         Timeline exporting saves TimelineRecording and TimelineOverview state.
2737         The TimelineRecording includes all kinds of model objects, such as
2738         records, markers, memory pressure events, etc. It also includes raw
2739         protocol data, such as script profiler samples. TimelineOverview
2740         includes some of the view state to restore, such as the selected
2741         time range, zoom level, and selected timeline.
2742
2743         Timeline importing constructs a new TimelineRecording by replaying
2744         the records, markers, and other events, as well as re-initializing
2745         more state. To finally display the imported recording, the content
2746         view will immediately initialize start/current/end times and the
2747         overview will restore the view state.
2748
2749         * Localizations/en.lproj/localizedStrings.js:
2750         New strings.
2751
2752         * UserInterface/Controllers/TimelineManager.js:
2753         (WI.TimelineManager.synthesizeImportError):
2754         (WI.TimelineManager.prototype.importRecording):
2755         Import API.
2756
2757         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
2758         Initialize the samples on the recording via a different path
2759         so that the data can be saved for exporting.
2760
2761         * UserInterface/Models/TimelineRecording.js:
2762         (WI.TimelineRecording):
2763         (WI.TimelineRecording.import):
2764         (WI.TimelineRecording.prototype.exportData):
2765         (WI.TimelineRecording.prototype.get capturing):
2766         (WI.TimelineRecording.prototype.get imported):
2767         (WI.TimelineRecording.prototype.unloaded):
2768         (WI.TimelineRecording.prototype.reset):
2769         (WI.TimelineRecording.prototype.addEventMarker):
2770         (WI.TimelineRecording.prototype.addRecord):
2771         (WI.TimelineRecording.prototype.addMemoryPressureEvent):
2772         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
2773         (WI.TimelineRecording.prototype.canExport):
2774         Save data at the TimelineRecording level that can be used for export.
2775         We only allow exporting a TimelineRecording that has started/stopped
2776         at least once and is not currently capturing.
2777
2778         * UserInterface/Views/TimelineRecordingContentView.js:
2779         (WI.TimelineRecordingContentView):
2780         (WI.TimelineRecordingContentView.prototype.get navigationItems):
2781         (WI.TimelineRecordingContentView.prototype.get supportsSave):
2782         (WI.TimelineRecordingContentView.prototype.get saveData):
2783         (WI.TimelineRecordingContentView.prototype.shown):
2784         (WI.TimelineRecordingContentView.prototype._capturingStarted):
2785         (WI.TimelineRecordingContentView.prototype._capturingStopped):
2786         (WI.TimelineRecordingContentView.prototype._initializeImportedRecording):
2787         (WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
2788         (WI.TimelineRecordingContentView.prototype._importButtonNavigationItemClicked):
2789         (WI.TimelineRecordingContentView.prototype._recordingReset):
2790         Add Import and Export buttons in the Timeline navigation bar.
2791
2792         * UserInterface/Views/TimelineOverview.js:
2793         (WI.TimelineOverview):
2794         (WI.TimelineOverview.prototype.exportData):
2795         (WI.TimelineOverview.prototype._instrumentAdded):
2796         (WI.TimelineOverview.prototype._recordingImported):
2797         When importing a recording update the TimelineOverview state
2798         soon afterwards.
2799
2800         * UserInterface/Models/CPUTimelineRecord.js:
2801         (WI.CPUTimelineRecord.fromJSON):
2802         (WI.CPUTimelineRecord.prototype.toJSON):
2803         * UserInterface/Models/GarbageCollection.js:
2804         (WI.GarbageCollection.fromJSON):
2805         (WI.GarbageCollection.prototype.toJSON):
2806         * UserInterface/Models/Geometry.js:
2807         (WI.Quad.fromJSON):
2808         (WI.Quad.prototype.toJSON):
2809         * UserInterface/Models/HeapAllocationsTimelineRecord.js:
2810         (WI.HeapAllocationsTimelineRecord.fromJSON):
2811         (WI.HeapAllocationsTimelineRecord.prototype.toJSON):
2812         * UserInterface/Models/LayoutTimelineRecord.js:
2813         (WI.LayoutTimelineRecord.fromJSON):
2814         (WI.LayoutTimelineRecord.prototype.toJSON):
2815         * UserInterface/Models/MediaTimelineRecord.js:
2816         (WI.MediaTimelineRecord.fromJSON):
2817         (WI.MediaTimelineRecord.prototype.toJSON):
2818         * UserInterface/Models/MemoryPressureEvent.js:
2819         (WI.MemoryPressureEvent.fromJSON):
2820         (WI.MemoryPressureEvent.prototype.toJSON):
2821         * UserInterface/Models/MemoryTimelineRecord.js:
2822         (WI.MemoryTimelineRecord):
2823         (WI.MemoryTimelineRecord.fromJSON):
2824         (WI.MemoryTimelineRecord.prototype.toJSON):
2825         * UserInterface/Models/RenderingFrameTimelineRecord.js:
2826         (WI.RenderingFrameTimelineRecord.fromJSON):
2827         (WI.RenderingFrameTimelineRecord.prototype.toJSON):
2828         * UserInterface/Models/ResourceTimelineRecord.js:
2829         (WI.ResourceTimelineRecord.fromJSON):
2830         (WI.ResourceTimelineRecord.prototype.toJSON):
2831         * UserInterface/Models/ScriptTimelineRecord.js:
2832         (WI.ScriptTimelineRecord.fromJSON):
2833         (WI.ScriptTimelineRecord.prototype.toJSON):
2834         * UserInterface/Models/TimelineMarker.js:
2835         (WI.TimelineMarker.fromJSON):
2836         (WI.TimelineMarker.prototype.toJSON):
2837         (WI.TimelineMarker.prototype.get type):
2838         (WI.TimelineMarker.prototype.get details):
2839         (WI.TimelineMarker.prototype.set time):
2840         (WI.TimelineMarker):
2841         * UserInterface/Models/TimelineRecord.js:
2842         (WI.TimelineRecord.fromJSON):
2843         (WI.TimelineRecord.prototype.toJSON):
2844         Import / Export toJSON / fromJSON implementations.
2845         
2846         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2847         (WI.CPUTimelineOverviewGraph):
2848         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
2849         (WI.CPUTimelineOverviewGraph.prototype._processRecord):
2850         * UserInterface/Views/LayoutTimelineOverviewGraph.js:
2851         (WI.LayoutTimelineOverviewGraph):
2852         (WI.LayoutTimelineOverviewGraph.prototype._layoutTimelineRecordAdded):
2853         (WI.LayoutTimelineOverviewGraph.prototype._processRecord):
2854         * UserInterface/Views/LayoutTimelineView.js:
2855         (WI.LayoutTimelineView):
2856         (WI.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
2857         (WI.LayoutTimelineView.prototype._processRecord):
2858         * UserInterface/Views/MediaTimelineView.js:
2859         (WI.MediaTimelineView):
2860         (WI.MediaTimelineView.prototype._handleRecordAdded):
2861         (WI.MediaTimelineView.prototype._processRecord):
2862         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2863         (WI.MemoryTimelineOverviewGraph):
2864         (WI.MemoryTimelineOverviewGraph.prototype._memoryTimelineRecordAdded):
2865         (WI.MemoryTimelineOverviewGraph.prototype._processRecord):
2866         * UserInterface/Views/MemoryTimelineView.js:
2867         (WI.MemoryTimelineView):
2868         (WI.MemoryTimelineView.prototype._memoryTimelineRecordAdded):
2869         (WI.MemoryTimelineView.prototype._processRecord):
2870         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
2871         (WI.NetworkTimelineOverviewGraph):
2872         (WI.NetworkTimelineOverviewGraph.prototype.reset):
2873         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
2874         (WI.NetworkTimelineOverviewGraph.prototype._processRecord):
2875         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded.compareByStartTime): Deleted.
2876         * UserInterface/Views/NetworkTimelineView.js:
2877         (WI.NetworkTimelineView):
2878         (WI.NetworkTimelineView.prototype._networkTimelineRecordAdded):
2879         (WI.NetworkTimelineView.prototype._processRecord):
2880         * UserInterface/Views/RenderingFrameTimelineView.js:
2881         (WI.RenderingFrameTimelineView):
2882         (WI.RenderingFrameTimelineView.prototype._renderingFrameTimelineRecordAdded):
2883         (WI.RenderingFrameTimelineView.prototype._processRecord):
2884         * UserInterface/Views/ScriptDetailsTimelineView.js:
2885         (WI.ScriptDetailsTimelineView):
2886         (WI.ScriptDetailsTimelineView.prototype._scriptTimelineRecordAdded):
2887         (WI.ScriptDetailsTimelineView.prototype._processRecord):
2888         Add common _processRecord path to each timeline OverviewGraph and TimelineView.
2889         By calling this in construction we populate graphs with TimelineRecords that
2890         may have already existed. This is necessary for imports, but this also fixes
2891         the case where you enable a timeline that had data and it didn't show data.
2892
2893         * UserInterface/Views/LayoutTimelineOverviewGraph.css:
2894         (.timeline-overview-graph.layout-overview > .graph-row):
2895         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar):
2896         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar > .segment):
2897         (.timeline-overview-graph.layout > .graph-row): Deleted.
2898         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar): Deleted.
2899         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar > .segment): Deleted.
2900         * UserInterface/Views/TimelineRecordBar.css:
2901         (.timeline-record-bar.timeline-record-type-layout.paint > .segment,):
2902         (.timeline-record-bar.timeline-record-type-layout.layout-timeline-record-paint > .segment,): Deleted.
2903         We simplified some of the sub-record type enum strings. To do this we needed to change
2904         "layout" to "layout-overview" to avoid a conflict.
2905
2906 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
2907
2908         Web Inspector: Network - Toggle Between Live Activity and Imported HAR resource collections
2909         https://bugs.webkit.org/show_bug.cgi?id=195734
2910
2911         Reviewed by Devin Rousso.
2912
2913         * Localizations/en.lproj/localizedStrings.js:
2914         * UserInterface/Images/NetworkHAR.svg: Added.
2915         * UserInterface/Images/NetworkOverview.svg: Added.
2916         * UserInterface/Views/NetworkTableContentView.css:
2917         (.content-view.tab.network > .content-browser > .navigation-bar .hierarchical-path .icon):
2918         (.network-overview-icon > .icon):
2919         (.network-har-icon > .icon):
2920         (@media (prefers-color-scheme: dark)):
2921
2922         * UserInterface/Views/NetworkTableContentView.js:
2923         (WI.NetworkTableContentView):
2924         (WI.NetworkTableContentView.prototype.get navigationItems):
2925         (WI.NetworkTableContentView.prototype.reset):
2926         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
2927         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
2928         (WI.NetworkTableContentView.prototype.tableNumberOfRows):
2929         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
2930         (WI.NetworkTableContentView.prototype.tableSelectionDidChange):
2931         (WI.NetworkTableContentView.prototype.tablePopulateCell):
2932         (WI.NetworkTableContentView.prototype._addCollection):
2933         (WI.NetworkTableContentView.prototype._setActiveCollection):
2934         (WI.NetworkTableContentView.prototype._addCollectionPathComponent):
2935         (WI.NetworkTableContentView.prototype._collectionsHierarchicalPathComponentWasSelected):
2936         (WI.NetworkTableContentView.prototype._changeCollection):
2937         (WI.NetworkTableContentView.prototype.handleClearShortcut):
2938         (WI.NetworkTableContentView.prototype._updateWaterfallTimeRange):
2939         (WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
2940         (WI.NetworkTableContentView.prototype._canExportHAR):
2941         (WI.NetworkTableContentView.prototype._processPendingEntries):
2942         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
2943         (WI.NetworkTableContentView.prototype._rowIndexForRepresentedObject):
2944         (WI.NetworkTableContentView.prototype._updateEntryForResource):
2945         (WI.NetworkTableContentView.prototype._updateEmptyFilterResultsMessage):
2946         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
2947         (WI.NetworkTableContentView.prototype._mainFrameDidChange):
2948         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
2949         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
2950         (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
2951         (WI.NetworkTableContentView.prototype._handleResourceAdded):
2952         (WI.NetworkTableContentView.prototype._runForMainCollection):
2953         (WI.NetworkTableContentView.prototype._isShowingMainCollection):
2954         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
2955         (WI.NetworkTableContentView.prototype._handleNodeDidFireEvent):
2956         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged):
2957         (WI.NetworkTableContentView.prototype._updateSort):
2958         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
2959         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
2960         (WI.NetworkTableContentView.prototype._HARResources):
2961         (WI.NetworkTableContentView.prototype._importHAR):
2962         Introduce the concept of collections that can be swapped in/out
2963         to re-render the Network Table with different contents.
2964
2965 2019-03-15  Devin Rousso  <drousso@apple.com>
2966
2967         Web Inspector: provide a way to capture a screenshot of a node from within the page
2968         https://bugs.webkit.org/show_bug.cgi?id=194279
2969         <rdar://problem/10731573>
2970
2971         Reviewed by Joseph Pecoraro.
2972
2973         Add `console.screenshot` functionality, which displays a screenshot of a given object (if
2974         able) within Web Inspector's Console tab. From there, it can be viewed and saved.
2975
2976         Currently, `console.screenshot` will
2977          - capture an image of a `Node` (if provided)
2978          - capture an image of the viewport if nothing is provided
2979
2980         * UserInterface/Models/ConsoleMessage.js:
2981         (WI.ConsoleMessage):
2982         * UserInterface/Views/ConsoleCommandView.js:
2983         (WI.ConsoleCommandView.prototype.render):
2984         * UserInterface/Views/ConsoleMessageView.js:
2985         (WI.ConsoleMessageView.prototype.render):
2986         (WI.ConsoleMessageView.prototype.toClipboardString):
2987         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
2988         (WI.ConsoleMessageView.prototype._appendSavedResultIndex):
2989         (WI.ConsoleMessageView.prototype._appendStackTrace):
2990         (WI.ConsoleMessageView.prototype._makeExpandable):
2991         (WI.ConsoleMessageView.prototype._handleContextMenu): Added.
2992         * UserInterface/Views/ConsoleMessageView.css:
2993         (.console-user-command.special-user-log > .console-message-body): Added.
2994         (.console-message-body): Added.
2995         (.console-message-body > span): Added.
2996         (.console-message-body > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Added.
2997         (.console-message-body > .console-image): Added.
2998         (.console-message-body > .show-grid): Added.
2999         (.console-error-level .console-message-body): Added.
3000         (.console-warning-level .console-message-body): Added.
3001         (.console-log-level.console-image-container::before): Added.
3002         (.console-user-command > .console-message-body): Added.
3003         (.console-warning-level .console-message-body): Added.
3004         (.console-error-level .console-message-body): Added.
3005         (.console-user-command > .console-message-body): Added.
3006         (.console-user-command.special-user-log > .console-message-text): Deleted.
3007         (.console-message-text): Deleted.
3008         (.console-message-text > span): Deleted.
3009         (.console-message-text > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Deleted.
3010         (.console-error-level .console-message-text): Deleted.
3011         (.console-warning-level .console-message-text): Deleted.
3012         (.console-user-command > .console-message-text): Deleted.
3013         (.console-warning-level .console-message-text): Deleted.
3014         (.console-error-level .console-message-text): Deleted.
3015         (.console-user-command > .console-message-text): Deleted.
3016         * UserInterface/Views/LogContentView.css:
3017         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-text .highlighted): Added.
3018         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-body .highlighted): Deleted.
3019         Renamed variables/classes to be more semantically correct when the content is an image.
3020          - `_messageTextElement` to `_messageBodyElement` (JS)
3021          - `.console-message-text` to `.console-message-body` (CSS)
3022
3023         * UserInterface/Controllers/JavaScriptLogViewController.js:
3024         (WI.JavaScriptLogViewController.prototype.renderPendingMessages):
3025
3026         * UserInterface/Views/Main.css:
3027         (:matches(img, canvas).show-grid):
3028         (@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):
3029
3030         * UserInterface/Base/FileUtilities.js:
3031         (WI.FileUtilities.screenshotString): Added.
3032
3033         * UserInterface/Models/NativeFunctionParameters.js:
3034         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3035
3036         * UserInterface/Images/ConsoleImage.svg: Copied from UserInterface/Images/Canvas.svg.
3037         * Localizations/en.lproj/localizedStrings.js:
3038
3039 2019-03-14  Nikita Vasilyev  <nvasilyev@apple.com>
3040
3041         Web Inspector: Styles: Jump to effective property button doesn't hide after overridden property become effective
3042         https://bugs.webkit.org/show_bug.cgi?id=195770
3043         <rdar://problem/48903634>
3044
3045         Reviewed by Matt Baker.
3046
3047         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3048         (.spreadsheet-style-declaration-editor .property .select-effective-property): Added.
3049         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property): Deleted.
3050         Hide `.select-effective-property` element for properties that aren't overridden.
3051
3052 2019-03-14  Devin Rousso  <drousso@apple.com>
3053
3054         Web Inspector: REGRESSION: Canvas: the first processed action should be selected as soon as it's available if no previous selected action exists
3055         https://bugs.webkit.org/show_bug.cgi?id=195732
3056         <rdar://problem/48875214>
3057
3058         Reviewed by Matt Baker.
3059
3060         * UserInterface/Views/CanvasSidebarPanel.js:
3061         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
3062         Rather than wait until the entire recording is ready, set the selected action as soon as the
3063         first action is ready (assuming there isn't already a selected action).
3064
3065 2019-03-14  Joseph Pecoraro  <pecoraro@apple.com>
3066
3067         Web Inspector: Network - HAR Import
3068         https://bugs.webkit.org/show_bug.cgi?id=195642
3069         <rdar://problem/34820974>
3070
3071         Reviewed by Devin Rousso.
3072
3073         * Localizations/en.lproj/localizedStrings.js
3074         * UserInterface/Test.html:
3075         * UserInterface/Test.html:
3076         New strings and resources.
3077
3078         * UserInterface/Controllers/HARBuilder.js:
3079         (WI.HARBuilder.dateFromHARDate):
3080         (WI.HARBuilder.protocolFromHARProtocol):
3081         (WI.HARBuilder.responseSourceFromHARFetchType):
3082         Reverse parsers from HAR to WI.Resource types.
3083
3084         * UserInterface/Models/LocalResource.js: Added.
3085         (WI.LocalResource):
3086         (WI.LocalResource.headersArrayToHeadersObject):
3087         (WI.LocalResource.fromHAREntry):
3088         (WI.LocalResource.prototype.hasContent):
3089         (WI.LocalResource.prototype.setContent):
3090         (WI.LocalResource.prototype.requestContentFromBackend):
3091         A Resource subclass with data fully supplied in the frontend.
3092
3093         * UserInterface/Controllers/NetworkManager.js:
3094         (WI.NetworkManager):
3095         (WI.NetworkManager.synthesizeImportError):
3096         (WI.NetworkManager.prototype.localResourceForURL):
3097         (WI.NetworkManager.prototype.processHAR):
3098         Process a HAR and extract local resources.
3099
3100         * UserInterface/Views/NetworkTableContentView.js:
3101         (WI.NetworkTableContentView):
3102         (WI.NetworkTableContentView.prototype.reset):
3103         (WI.NetworkTableContentView.prototype._handleResourceAdded):
3104         (WI.NetworkTableContentView.prototype._importHAR):
3105         Add an import button. When an import succeeds reset the
3106         table and only show imported resources (ignoring page
3107         loaded resources).
3108
3109 2019-03-14  Devin Rousso  <drousso@apple.com>
3110
3111         Web Inspector: Console: getEventListeners should work for any EventTarget
3112         https://bugs.webkit.org/show_bug.cgi?id=195713
3113
3114         Reviewed by Joseph Pecoraro.
3115
3116         * UserInterface/Models/NativeFunctionParameters.js:
3117
3118 2019-03-14  Devin Rousso  <drousso@apple.com>
3119
3120         Web Inspector: Styles: `::-webkit-scrollbar*` rules aren't shown
3121         https://bugs.webkit.org/show_bug.cgi?id=195123
3122         <rdar://problem/48450148>
3123
3124         Reviewed by Joseph Pecoraro.
3125
3126         * UserInterface/Controllers/CSSManager.js:
3127         (WI.CSSManager.displayNameForPseudoId): Added.
3128
3129         * UserInterface/Models/DOMNodeStyles.js:
3130         (WI.DOMNodeStyles.static uniqueOrderedStyles): Added.
3131         (WI.DOMNodeStyles.prototype.get uniqueOrderedStyles):
3132
3133         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3134         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
3135         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
3136         Rather than iterate over the `WI.DOMNode`'s list of pseudo-elements (which is only ::before
3137         and ::after), we iterate over the `WI.DOMNodeStyle`'s list of pseudo-element rules. This is
3138         an object where the key is a `CSS.PseudoId` and the value is an object containing all the
3139         matched rules and ordered styles for that pseudo-type. We can preserve the current
3140         functionality by using the ::before/::after `WI.DOMNode` when we encounter one of those
3141         pseudo-ids.
3142
3143         An additional benefit of this change is that `::before`/`::after` styles will still appear
3144         in the Rules panel even if they don't have a `content` property set (e.g. when the
3145         `::before`/`::after` pseudo-element doesn't exist). This is because the styles are no longer
3146         fetched from those pseudo-element nodes directly, but rather as a matched style for the
3147         parent node. As such, editing a `content` property to become invalid/disablde in a
3148         `::before`/`::after` rule won't make the entire rule disappeaer.
3149
3150 2019-03-14  Devin Rousso  <drousso@apple.com>
3151
3152         Web Inspector: we should show artificial context menus on mousedown instead of click
3153         https://bugs.webkit.org/show_bug.cgi?id=195494
3154
3155         Reviewed by Joseph Pecoraro.
3156
3157         * UserInterface/Views/ContextMenu.js:
3158         (WI.ContextMenu):
3159         (WI.ContextMenu.prototype.show):
3160         (WI.ContextMenu.prototype.addBeforeShowCallback): Added.
3161         (WI.ContextMenu.prototype.handleEvent):
3162         Provide a way to register a callback that will be called right as the "contextmenu" event is
3163         handled, but before the context menu is actually shown. Since "mousedown" events are also
3164         fired when/before a "contextmenu" event is fired, each of the below callers has to maintain
3165         some state indicating "we are about to show a context menu, so ignore all "mousedown" events
3166         until that time". Without this, the below callers wouldn't be able to tell when the context
3167         menu is finally shown.
3168
3169         * UserInterface/Base/SearchUtilities.js:
3170         (WI.SearchUtilities.createSettingsButton):
3171         * UserInterface/Views/CanvasContentView.js:
3172         (WI.CanvasContentView):
3173         (WI.CanvasContentView.prototype.initialLayout):
3174         (WI.CanvasContentView.prototype._handleCanvasElementButtonMouseDown): Added.
3175         (WI.CanvasContentView.prototype._handleViewShaderButtonMouseDown): Added.
3176         (WI.CanvasContentView.prototype._handleViewRecordingButtonMouseDown): Added.
3177         (WI.CanvasContentView.prototype._canvasElementButtonClicked): Deleted.
3178         (WI.CanvasContentView.prototype._handleViewShaderButtonClicked): Deleted.
3179         (WI.CanvasContentView.prototype._handleViewRecordingButtonClicked): Deleted.
3180         * UserInterface/Views/DebuggerSidebarPanel.js:
3181         (WI.DebuggerSidebarPanel):
3182         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): Added.
3183         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked): Deleted.
3184         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
3185         (WI.SourcesNavigationSidebarPanel):
3186         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): Added.
3187         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked): Deleted.
3188         * UserInterface/Views/TabBar.js:
3189         (WI.TabBar.prototype._handleMouseDown):
3190         * UserInterface/Views/LegacyTabBar.js:
3191         (WI.LegacyTabBar.prototype._handleMouseDown):
3192
3193 2019-03-13  Devin Rousso  <drousso@apple.com>
3194
3195         Web Inspector: Debugger: pausing in an inline script on a page with a URL query creates an Extra Script
3196         https://bugs.webkit.org/show_bug.cgi?id=195705
3197         <rdar://problem/48853820>
3198
3199         Reviewed by Antoine Quint.
3200
3201         * UserInterface/Models/Script.js:
3202         (WI.Script.prototype._resolveResource):
3203         If the page's URL has a query parameter, the payload we receive for any inline <script>s
3204         doesn't include the query parameter as part of its URL. As such, if there isn't an existing
3205         resource with a URL that exactly matches the URL of the script and if the URL of the main
3206         resource for the script's target starts with the URL of the script, we assume that the
3207         script "belongs" to the target's main resource and associate the script with it as such.
3208
3209 2019-03-13  Keith Rollin  <krollin@apple.com>
3210
3211         Add support for new StagedFrameworks layout
3212         https://bugs.webkit.org/show_bug.cgi?id=195543
3213
3214         Reviewed by Alexey Proskuryakov.
3215
3216         When creating the WebKit layout for out-of-band Safari/WebKit updates,
3217         use an optional path prefix when called for.
3218
3219         Opportunistic cleanup: remove unused
3220         OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH variable, which otherwise would
3221         have needlessly been updated to also incorporate the new prefix.
3222
3223         * Configurations/Base.xcconfig:
3224         * Configurations/WebKitTargetConditionals.xcconfig: Added.
3225
3226 2019-03-13  Nikita Vasilyev  <nvasilyev@apple.com>
3227
3228         REGRESSION(r240946): Web Inspector: Styles: removing selected property doesn't update overridden status
3229         https://bugs.webkit.org/show_bug.cgi?id=195389
3230         <rdar://problem/48658929>
3231
3232         Reviewed by Matt Baker.
3233
3234         * UserInterface/Models/DOMNodeStyles.js:
3235         (WI.DOMNodeStyles.prototype.changeStyleText):
3236         Call DOMNodeStyles.prototype.refresh after the callback. No updates
3237         to CSSStyleDeclaration happen until the callback is called.
3238
3239 2019-03-13  Devin Rousso  <drousso@apple.com>
3240
3241         Web Inspector: Protocol Logging: log messages with backtrace if inspector^2 is open
3242         https://bugs.webkit.org/show_bug.cgi?id=195687
3243
3244         Reviewed by Joseph Pecoraro.
3245
3246         * UserInterface/Protocol/LoggingProtocolTracer.js:
3247         (WI.LoggingProtocolTracer.prototype._processEntry):
3248
3249 2019-03-13  Devin Rousso  <drousso@apple.com>
3250
3251         Web Inspector: REGRESSION(r242737): unnecessary semicolon added when populating WI.TreeOutline stylesheet
3252         https://bugs.webkit.org/show_bug.cgi?id=195689
3253
3254         Reviewed by Joseph Pecoraro.
3255
3256         * UserInterface/Views/TreeOutline.js:
3257         (WI.TreeOutline._generateStyleRulesIfNeeded):
3258
3259 2019-03-13  Joseph Pecoraro  <pecoraro@apple.com>
3260
3261         Web Inspector: Network - HAR Export duplicates blocked/send time if there was no dns/connect block
3262         https://bugs.webkit.org/show_bug.cgi?id=195655
3263         <rdar://problem/48831152>
3264
3265         Reviewed by Devin Rousso.
3266
3267         * UserInterface/Controllers/HARBuilder.js:
3268         (WI.HARBuilder.timings):
3269
3270 2019-03-12  Devin Rousso  <drousso@apple.com>
3271
3272         Web Inspector: Sources: allow image collections to be filtered by type
3273         https://bugs.webkit.org/show_bug.cgi?id=195630
3274
3275         Reviewed by Matt Baker.
3276
3277         * UserInterface/Views/ResourceCollectionContentView.js:
3278         (WI.ResourceCollectionContentView):
3279         (WI.ResourceCollectionContentView.prototype.get navigationItems): Added.
3280         (WI.ResourceCollectionContentView.prototype.contentViewAdded):
3281         (WI.ResourceCollectionContentView.prototype.contentViewRemoved): Added.
3282         (WI.ResourceCollectionContentView.prototype._updateImageTypeScopeBar): Added.
3283         (WI.ResourceCollectionContentView.prototype._handleImageTypeSelectionChanged): Added.
3284         * UserInterface/Views/ResourceCollectionContentView.css: Asdded.
3285         (.resource-collection-image-type-scope-bar.default-item-selected):
3286
3287         * UserInterface/Views/CollectionContentView.css:
3288         (.content-view.collection > .content-view[hidden]): Added.
3289
3290         * UserInterface/Views/ScopeBarItem.js:
3291         (WI.ScopeBarItem.prototype.set hidden):
3292         * UserInterface/Views/MultipleScopeBarItem.js:
3293         (WI.MultipleScopeBarItem.prototype.set scopeBarItems):
3294         (WI.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
3295         (WI.MultipleScopeBarItem.prototype.get _visibleScopeBarItems): Added.
3296         (WI.MultipleScopeBarItem.prototype._selectElementSelectionChanged):
3297         (WI.MultipleScopeBarItem.prototype._handleItemHiddenChanged): Added.
3298         Dispatch an event when an item is hidden so that any owner `WI.MultipleScopeBarItem` can
3299         rerender it's <select> without that item.
3300
3301         * Localizations/en.lproj/localizedStrings.js:
3302         * UserInterface/Main.html:
3303
3304 2019-03-12  Nikita Vasilyev  <nvasilyev@apple.com>
3305
3306         Web Inspector: Keyboard shortcut for settings tab too greedy on non-US keyboards
3307         https://bugs.webkit.org/show_bug.cgi?id=192947
3308         <rdar://problem/46886779>
3309
3310         Reviewed by Devin Rousso.
3311
3312         * UserInterface/Base/Main.js:
3313         (WI._showSettingsTab):
3314
3315 2019-03-12  Devin Rousso  <drousso@apple.com>
3316
3317         Web Inspector: Elements: provide node context menu items for event listeners sorted by node
3318         https://bugs.webkit.org/show_bug.cgi?id=195633
3319
3320         Reviewed by Matt Baker.
3321
3322         * UserInterface/Base/DOMUtilities.js:
3323         (WI.linkifyNodeReferenceElement):
3324         (WI.bindInteractionsForNodeToElement): Added.
3325         Split logic for adding event listeners into a separate function so it can be used on
3326         existing DOM without modifying it.
3327
3328         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3329         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
3330
3331 2019-03-12  Devin Rousso  <drousso@apple.com>
3332
3333         Web Inspector: DOM Debugger: remove left padding when the last DOM breakpoint is removed
3334         https://bugs.webkit.org/show_bug.cgi?id=195522
3335
3336         Reviewed by Matt Baker.
3337
3338         * UserInterface/Views/DOMTreeContentView.js:
3339         (WI.DOMTreeContentView.prototype._updateBreakpointStatus):
3340         * UserInterface/Views/DOMTreeElement.js:
3341         (WI.DOMTreeElement.prototype.get hasBreakpoint): Added.
3342
3343 2019-03-12  Devin Rousso  <drousso@apple.com>
3344
3345         Web Inspector: Canvas: export recording as HTML
3346         https://bugs.webkit.org/show_bug.cgi?id=195311
3347         <rdar://problem/48588673>
3348
3349         Reviewed by Joseph Pecoraro.
3350
3351         * UserInterface/Models/Recording.js:
3352         (WI.Recording.prototype.async swizzle):
3353         (WI.Recording.prototype.toHTML): Added.
3354         (WI.Recording.prototype.toHTML.escapeHTML): Added.
3355         (WI.Recording.prototype.toHTML.processObject): Added.
3356         (WI.Recording.prototype.toHTML.processValue): Added.
3357
3358         * UserInterface/Views/RecordingContentView.js:
3359         (WI.RecordingContentView):
3360         (WI.RecordingContentView.prototype._exportRecording):
3361         (WI.RecordingContentView.prototype._exportReduction): Added.
3362         (WI.RecordingContentView.prototype._updateExportButton): Added.
3363         (WI.RecordingContentView.prototype._handleExportNavigationItemClicked): Added.
3364         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
3365
3366         * UserInterface/Views/CanvasOverviewContentView.js:
3367         (WI.CanvasOverviewContentView):
3368         * UserInterface/Views/HeapAllocationsTimelineView.js:
3369         (WI.HeapAllocationsTimelineView):
3370         * UserInterface/Views/HeapSnapshotContentView.js:
3371         (WI.HeapSnapshotContentView):
3372         Drive-by: s/`toolTip`/`tooltip`.
3373
3374         * Localizations/en.lproj/localizedStrings.js:
3375
3376 2019-03-12  Devin Rousso  <drousso@apple.com>
3377
3378         Web Inspector: Audit: there should be a centralized place for reusable code
3379         https://bugs.webkit.org/show_bug.cgi?id=195265
3380         <rdar://problem/47040673>
3381
3382         Reviewed by Joseph Pecoraro.
3383
3384         * UserInterface/Controllers/AuditManager.js:
3385         (WI.AuditManager.prototype.async start):
3386         (WI.AuditManager.prototype._topLevelTestForTest): Added.
3387         (WI.AuditManager.prototype._topLevelTestForTest.walk): Added.
3388
3389         * UserInterface/Models/AuditTestBase.js:
3390         (WI.AuditTestBase):
3391         (WI.AuditTestBase.prototype.async setup): Added.
3392         (WI.AuditTestBase.toJSON):
3393
3394         * UserInterface/Models/AuditTestCase.js:
3395         (WI.AuditTestCase.async.fromPayload):
3396         (WI.AuditTestCase.prototype.async run.async parseResponse):
3397         Allow additional data to be passed back to the result's `data` for testing.
3398
3399         * UserInterface/Models/AuditTestGroup.js:
3400         (WI.AuditTestGroup.async.fromPayload):
3401
3402 2019-03-12  Joseph Pecoraro  <pecoraro@apple.com>
3403
3404         Web Inspector: Timelines - Improve handling of past recordings (readonly)
3405         https://bugs.webkit.org/show_bug.cgi?id=195594
3406
3407         Reviewed by Devin Rousso.
3408
3409         * UserInterface/Views/TimelineRecordingContentView.js:
3410         (WI.TimelineRecordingContentView.prototype._clearTimeline):
3411         Don't allow clearing of a readonly recording.
3412
3413         * UserInterface/Views/TimelineTabContentView.js:
3414         (WI.TimelineTabContentView.prototype._toggleRecordingOnSpacebar):
3415         Don't do anything when viewing a readonly recording.
3416
3417         (WI.TimelineTabContentView.prototype._recordButtonClicked):
3418         Start a new recording if viewing a readonly recording.
3419
3420 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
3421
3422         Web Inspector: REGRESSION: Network Cookies Table does not load
3423         https://bugs.webkit.org/show_bug.cgi?id=195599
3424
3425         Reviewed by Devin Rousso.
3426
3427         * UserInterface/Views/ResourceCookiesContentView.js:
3428         (WI.ResourceCookiesContentView.prototype.tableIndexForRepresentedObject):
3429         (WI.ResourceCookiesContentView.prototype.tableRepresentedObjectForIndex):
3430         Include needed delegate methods.
3431
3432 2019-03-11  Devin Rousso  <drousso@apple.com>
3433
3434         Web Inspector: use -webkit-{margin,padding}-{start,end} instead of [dir={ltr/rtl}] rules
3435         https://bugs.webkit.org/show_bug.cgi?id=195569
3436         <rdar://problem/48778727>
3437
3438         Reviewed by Matt Baker.
3439
3440         * UserInterface/Debug/UncaughtExceptionReporter.css:
3441         * UserInterface/Views/BoxModelDetailsSectionRow.css:
3442         * UserInterface/Views/BreakpointActionView.css:
3443         * UserInterface/Views/BreakpointPopoverController.css:
3444         * UserInterface/Views/CPUTimelineView.css:
3445         * UserInterface/Views/CallFrameTreeElement.css:
3446         * UserInterface/Views/CallFrameView.css:
3447         * UserInterface/Views/DOMTreeContentView.css:
3448         * UserInterface/Views/DOMTreeOutline.css:
3449         * UserInterface/Views/DashboardContainerView.css:
3450         * UserInterface/Views/DataGrid.css:
3451         * UserInterface/Views/DebuggerDashboardView.css:
3452         * UserInterface/Views/DebuggerSidebarPanel.css:
3453         * UserInterface/Views/DefaultDashboardView.css:
3454         * UserInterface/Views/DetailsSection.css:
3455         * UserInterface/Views/FilterBar.css:
3456         * UserInterface/Views/FindBanner.css:
3457         * UserInterface/Views/FontResourceContentView.css:
3458         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
3459         * UserInterface/Views/HierarchicalPathComponent.css:
3460         * UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
3461         * UserInterface/Views/Main.css:
3462         * UserInterface/Views/NetworkTableContentView.css:
3463         * UserInterface/Views/OpenResourceDialog.css:
3464         * UserInterface/Views/RecordingActionTreeElement.css:
3465         * UserInterface/Views/ScopeRadioButtonNavigationItem.css:
3466         * UserInterface/Views/SettingsTabContentView.css:
3467         * UserInterface/Views/ThreadTreeElement.css:
3468         * UserInterface/Views/Toolbar.css:
3469         * UserInterface/Views/TreeOutline.css:
3470         * UserInterface/Views/TypeTreeElement.css:
3471         * UserInterface/Views/TypeTreeView.css:
3472         * UserInterface/Views/URLBreakpointPopover.css:
3473         * UserInterface/Views/WebSocketContentView.css:
3474
3475         * UserInterface/Views/RecordingActionTreeElement.js:
3476         (WI.RecordingActionTreeElement.static _getClassNames):
3477         Replace class `.action` with `.recording-action` for better uniqueness/clarity.
3478
3479 2019-03-11  Devin Rousso  <drousso@apple.com>
3480
3481         Web Inspector: DOMDebugger: protocol error on first open
3482         https://bugs.webkit.org/show_bug.cgi?id=195248
3483         <rdar://problem/48538465>
3484
3485         Unreviewed followup of r242743 to fix test inspector/dom-debugger/dom-breakpoints.html.
3486
3487         * UserInterface/Controllers/DOMDebuggerManager.js:
3488         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
3489         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
3490         Still attempt to resolve the DOM breakpoint if it already has a `domNodeIdentifier` so that
3491         it will get added to the node's frame's DOM breakpoint map. Without this, some breakpoints
3492         might get "missed" when calling `WI.domDebuggerManager.removeDOMBreakpointsForNode`.
3493
3494 2019-03-11  Justin Fan  <justin_fan@apple.com>
3495
3496         [Web GPU] Update GPUSwapChainDescriptor, GPUSwapChain and implement GPUCanvasContext
3497         https://bugs.webkit.org/show_bug.cgi?id=194406
3498         <rdar://problem/47892466>
3499
3500         Reviewed by Myles C. Maxfield.
3501
3502         Name updates for Web GPU renaming in inspector.
3503
3504         * UserInterface/Models/Canvas.js:
3505         (WI.Canvas.displayNameForContextType):
3506
3507 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
3508
3509         Web Inspector: Editing Timelines shows two CPU Timelines
3510         https://bugs.webkit.org/show_bug.cgi?id=195578
3511
3512         Reviewed by Devin Rousso.
3513
3514         * UserInterface/Controllers/TimelineManager.js:
3515         (WI.TimelineManager.availableTimelineTypes):
3516         The CPU Instrument is already in the default list.
3517
3518 2019-03-11  Devin Rousso  <drousso@apple.com>
3519
3520         Web Inspector: DOMDebugger: protocol error on first open
3521         https://bugs.webkit.org/show_bug.cgi?id=195248
3522         <rdar://problem/48538465>
3523
3524         Reviewed by Joseph Pecoraro.
3525
3526         Don't try to call `DOMDebugger` commands until a target has been initialized.
3527         Still attempt to resolve DOM breakpoints whenever the main resource/frame changes.
3528
3529         * UserInterface/Controllers/DOMDebuggerManager.js:
3530         (WI.DOMDebuggerManager):
3531         (WI.DOMDebuggerManager.prototype.initializeTarget): Added.
3532         (WI.DOMDebuggerManager.supportsEventBreakpoints):
3533         (WI.DOMDebuggerManager.prototype.get supported):
3534         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
3535         (WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
3536         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
3537         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
3538         (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
3539         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
3540         (WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL): Added.
3541         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
3542         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
3543         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
3544         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
3545         (WI.DOMDebuggerManager.prototype._saveDOMBreakpoints):
3546         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
3547         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
3548         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
3549         (WI.DOMDebuggerManager.prototype._mainFrameDidChange):
3550         (WI.DOMDebuggerManager.prototype._mainResourceDidChange):
3551         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint.breakpointRemoved): Deleted.
3552         (WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints): Deleted.
3553         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint.breakpointUpdated): Deleted.
3554         (WI.DOMDebuggerManager.prototype._resolveEventBreakpoint): Deleted.
3555         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Deleted.
3556
3557         * UserInterface/Base/Multimap.js: Added.
3558         (Multimap):
3559         (Multimap.prototype.get):
3560         (Multimap.prototype.add):
3561         (Multimap.prototype.delete):
3562         (Multimap.prototype.clear):
3563         (Multimap.prototype.keys):
3564         (Multimap.prototype.*values):
3565         (Multimap.prototype.*[Symbol.iterator]):
3566         (Multimap.prototype.toJSON):
3567         * .eslintrc:
3568         * UserInterface/Main.html:
3569         * UserInterface/Test.html:
3570         Helper data structure for managing Maps of Sets (e.g. all DOM breakpoints for a URL).
3571
3572 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
3573
3574         Web Inspector: CPU Usage Timeline - Enable by default
3575         https://bugs.webkit.org/show_bug.cgi?id=195471
3576
3577         Reviewed by Devin Rousso.
3578
3579         Remove experimental setting and include the CPU timeline in the
3580         default set of timelines.
3581
3582         * UserInterface/Base/Setting.js:
3583         * UserInterface/Controllers/TimelineManager.js:
3584         (WI.TimelineManager.defaultTimelineTypes):
3585         * UserInterface/Main.html:
3586         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3587         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.selected):
3588         (.timeline-overview-graph.cpu > .column-chart > svg > rect): Deleted.
3589         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart): Deleted.
3590         * UserInterface/Views/CPUTimelineOverviewGraph.js:
3591         (WI.CPUTimelineOverviewGraph):
3592         (WI.CPUTimelineOverviewGraph.prototype.layout):
3593         * UserInterface/Views/ContentView.js:
3594         (WI.ContentView.createFromRepresentedObject):
3595         * UserInterface/Views/LegacyCPUTimelineView.css: Removed.
3596         * UserInterface/Views/LegacyCPUTimelineView.js: Removed.
3597         * UserInterface/Views/SettingsTabContentView.js:
3598         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3599         * UserInterface/Views/Variables.css:
3600         (:root):
3601
3602 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
3603
3604         Web Inspector: CPU Usage Timeline - Better Thread chart layout values
3605         https://bugs.webkit.org/show_bug.cgi?id=195547
3606
3607         Reviewed by Devin Rousso.
3608
3609         * UserInterface/Views/CPUTimelineView.js:
3610         (WI.CPUTimelineView.prototype.layout.bestThreadLayoutMax):
3611         (WI.CPUTimelineView.prototype.layout.layoutView):
3612         (WI.CPUTimelineView.prototype._showGraphOverlay):
3613         Include a separate layoutMax for the combined view and a thread layoutMax
3614         for the thread groups.
3615
3616 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
3617
3618         Web Inspector: CPU Usage Timeline - Add legend and graph hover effects
3619         https://bugs.webkit.org/show_bug.cgi?id=195390
3620
3621         Reviewed by Devin Rousso.
3622
3623         * Localizations/en.lproj/localizedStrings.js:
3624         New strings for the legends.
3625
3626         * UserInterface/Main.html:
3627         Combined files.
3628
3629         * UserInterface/Views/Variables.css:
3630         (:root):
3631         (@media (prefers-color-scheme: dark)):
3632         Tweaked colors, including individual stroke and fill colors for each CPU section.
3633
3634         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3635         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.total-usage):
3636         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
3637         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
3638         Updated colors.
3639
3640         * UserInterface/Views/CPUUsageCombinedView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.css.
3641         (.cpu-usage-combined-view > .details > .legend-container):
3642         (.cpu-usage-combined-view > .details > .legend-container > .row):
3643         (.cpu-usage-combined-view > .details > .legend-container > .row + .row):
3644         (.cpu-usage-combined-view > .details > .legend-container > .row > .swatch):
3645         * UserInterface/Views/CPUUsageCombinedView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.js.
3646         (WI.CPUUsageCombinedView.appendLegendRow):
3647         (WI.CPUUsageCombinedView):
3648         (WI.CPUUsageCombinedView.prototype.get graphElement):
3649         (WI.CPUUsageCombinedView.prototype.get chart):
3650         (WI.CPUUsageCombinedView.prototype.get rangeChart):
3651         (WI.CPUUsageCombinedView.prototype.clear):
3652         (WI.CPUUsageCombinedView.prototype.updateChart):
3653         (WI.CPUUsageCombinedView.prototype.updateMainThreadIndicator):
3654         (WI.CPUUsageCombinedView.prototype.clearLegend):
3655         (WI.CPUUsageCombinedView.prototype.updateLegend):
3656         (WI.CPUUsageCombinedView.prototype._updateDetails):
3657         * UserInterface/Views/CPUUsageIndicatorView.css: Removed.
3658         * UserInterface/Views/CPUUsageIndicatorView.js: Removed.
3659         Combined the Indicator and StackedAreaChart into a single view
3660         that share a left details section.
3661
3662         * UserInterface/Views/CPUUsageView.js:
3663         (WI.CPUUsageView):
3664         (WI.CPUUsageView.prototype.get graphElement):
3665         (WI.CPUUsageView.prototype.clear):
3666         (WI.CPUUsageView.prototype.updateChart):
3667         (WI.CPUUsageView.prototype.clearLegend):
3668         (WI.CPUUsageView.prototype.updateLegend):
3669         (WI.CPUUsageView.prototype._updateDetails):
3670         Include a legend in the left details section.
3671
3672         * UserInterface/Views/AreaChart.js:
3673         (WI.AreaChart):
3674         (WI.AreaChart.prototype.addPointMarker):
3675         (WI.AreaChart.prototype.clearPointMarkers):
3676         (WI.AreaChart.prototype.clear):
3677         (WI.AreaChart.prototype.layout):
3678         * UserInterface/Views/StackedAreaChart.js:
3679         (WI.StackedAreaChart):
3680         (WI.StackedAreaChart.prototype.addPointMarker):
3681         (WI.StackedAreaChart.prototype.clearPointMarkers):
3682         (WI.StackedAreaChart.prototype.clear):
3683         (WI.StackedAreaChart.prototype.layout):
3684         Add point markers for the area charts.
3685
3686         * UserInterface/Views/CPUTimelineView.css:
3687         * UserInterface/Views/CPUTimelineView.js:
3688         (WI.CPUTimelineView):
3689         (WI.CPUTimelineView.prototype.get cpuUsageViewHeight):
3690         (WI.CPUTimelineView.prototype.clear):
3691         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
3692         (WI.CPUTimelineView.prototype.initialLayout):
3693         (WI.CPUTimelineView.prototype.layout):
3694         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
3695         (WI.CPUTimelineView.prototype._handleMouseClick):
3696         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
3697         (WI.CPUTimelineView.prototype._showGraphOverlayNearTo):
3698         (WI.CPUTimelineView.prototype._updateGraphOverlay):
3699         (WI.CPUTimelineView.prototype._showGraphOverlay.xScale):
3700         (WI.CPUTimelineView.prototype._showGraphOverlay.yScale):
3701         (WI.CPUTimelineView.prototype._showGraphOverlay.addOverlayPoint):
3702         (WI.CPUTimelineView.prototype._showGraphOverlay):
3703         (WI.CPUTimelineView.prototype._clearOverlayMarkers.clearGraphOverlayElement):
3704         (WI.CPUTimelineView.prototype._clearOverlayMarkers):
3705         (WI.CPUTimelineView.prototype._hideGraphOverlay):
3706         Include graph overlay markers.
3707
3708 2019-03-11  Devin Rousso  <drousso@apple.com>
3709
3710         Web Inspector: eliminate manual syncing of numeric constants used by JavaScript and CSS
3711         https://bugs.webkit.org/show_bug.cgi?id=194883
3712         <rdar://problem/48257785>
3713
3714         Reviewed by Joseph Pecoraro.
3715
3716         * UserInterface/Views/CanvasOverviewContentView.js:
3717         (WI.CanvasOverviewContentView):
3718         (WI.CanvasOverviewContentView.static get recordingAutoCaptureInputMargin): Added.
3719         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
3720         * UserInterface/Views/CanvasOverviewContentView.css:
3721         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
3722
3723         * UserInterface/Views/MemoryTimelineView.js:
3724         (WI.MemoryTimelineView.static get memoryCategoryViewHeight): Added.
3725         (WI.MemoryTimelineView.prototype.initialLayout): Added.
3726         (WI.MemoryTimelineView.prototype.layout):
3727         * UserInterface/Views/MemoryCategoryView.css:
3728         (.memory-category-view):
3729
3730         * UserInterface/Views/NetworkTableContentView.js:
3731         (WI.NetworkTableContentView.static get nodeWaterfallDOMEventSize): Added.
3732         (WI.NetworkTableContentView.prototype.initialLayout):
3733         * UserInterface/Views/NetworkTableContentView.css:
3734         (.content-view.network .network-table): Deleted.
3735
3736         * UserInterface/Views/TreeOutline.js:
3737         (WI.TreeOutline._generateStyleRulesIfNeeded):
3738         * UserInterface/Views/TreeOutline.css:
3739         (.tree-outline, .tree-outline .children):
3740         (.tree-outline .item):
3741
3742         * UserInterface/Controllers/CanvasManager.js:
3743         (WI.CanvasManager.supportsRecordingAutoCapture):
3744         Drive-by: fix usage of InspectorBackend.domains.{CanvasAgent => Canvas}
3745
3746 2019-03-11  Nikita Vasilyev  <nvasilyev@apple.com>
3747
3748         REGRESSION(r242622): Web Inspector: Fix asserts "Overridden property is missing overridingProperty"
3749         https://bugs.webkit.org/show_bug.cgi?id=195515
3750         <rdar://problem/48737315>
3751
3752         Reviewed by Matt Baker.
3753
3754         * UserInterface/Views/SpreadsheetStyleProperty.js:
3755         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3756
3757 2019-03-07  Nikita Vasilyev  <nvasilyev@apple.com>
3758
3759         Web Inspector: Styles: overridden CSS property should have go-to button to jump to effective property
3760         https://bugs.webkit.org/show_bug.cgi?id=185930
3761         <rdar://problem/40506252>
3762
3763         Reviewed by Matt Baker.
3764
3765         Introduce a new experimental jump to effective property button. The button is a small arrow button
3766         next to an overridden CSS property. Clicking the button scrolls to the effective CSS property and
3767         selects it.
3768
3769         * Localizations/en.lproj/localizedStrings.js:
3770         * UserInterface/Base/Setting.js:
3771         * UserInterface/Models/CSSProperty.js:
3772         (WI.CSSProperty):
3773         (WI.CSSProperty.prototype.update):
3774         (WI.CSSProperty.prototype.get overridingProperty):
3775         (WI.CSSProperty.prototype.set overridingProperty):
3776         * UserInterface/Models/DOMNodeStyles.js:
3777         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
3778         * UserInterface/Views/SettingsTabContentView.js:
3779         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3780         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3781         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property):
3782         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property,):
3783         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property::after,):
3784         (@media (prefers-color-scheme: dark)):
3785         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3786         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelectByProperty):
3787         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3788         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorSelectProperty):
3789         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3790         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionSelectProperty):
3791         * UserInterface/Views/SpreadsheetStyleProperty.js:
3792         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3793
3794 2019-03-07  Devin Rousso  <drousso@apple.com>
3795
3796         Web Inspector: Protocol: add type checking when commands are called via invoke
3797         https://bugs.webkit.org/show_bug.cgi?id=195310
3798         <rdar://problem/48588679>
3799
3800         Reviewed by Joseph Pecoraro.
3801
3802         * UserInterface/Protocol/InspectorBackend.js:
3803         (InspectorBackend.Command.prototype.invoke.deliverFailure): Added.
3804         (InspectorBackend.Command.prototype.invoke):
3805         (InspectorBackend.Command.prototype._invokeWithArguments):
3806
3807 2019-03-07  Devin Rousso  <drousso@apple.com>
3808
3809         Web Inspector: REGRESSION(r242118): WI.ScopeBar missing background
3810         https://bugs.webkit.org/show_bug.cgi?id=195299
3811
3812         Reviewed by Joseph Pecoraro.
3813
3814         Rework the way `color`, `background-color`, and `border-color` are set for `WI.ScopeBar` to
3815         use CSS variables instead. Divides the variables into three categories:
3816          - default: these are the values that the `WI.ScopeBar` would use normally
3817          - override: these are values that take precidence over the default (e.g. set by other elements)
3818             - falls back to default when no value is set
3819          - actual: this is the resulting value that will be used when displaying
3820             - this way, other elements can "mirror" the styling of the `WI.ScopeBar`
3821
3822         * UserInterface/Views/ScopeBar.css:
3823         (.scope-bar):
3824         (.scope-bar > li):
3825         (.scope-bar > li::before):
3826         (.scope-bar > li:matches(.selected, :hover)):
3827         (.scope-bar > li:not(.selected):hover::after):
3828         (.scope-bar > li.selected:active::after):
3829         (.scope-bar > li.multiple > select):
3830         (body[dir=ltr] .scope-bar > li.multiple > select):
3831         (body[dir=rtl] .scope-bar > li.multiple > select):
3832         (.scope-bar > li.multiple:not(.selected) > select): Added.
3833         (.scope-bar > li.multiple > .arrows):
3834         (.scope-bar > li::before): Deleted.
3835         (.scope-bar.default-item-selected > li.multiple.selected::before): Deleted.
3836         (.scope-bar > li:matches(.selected, :hover)::before): Deleted.
3837         (.scope-bar > li.selected:active::before): Deleted.
3838         (.scope-bar > li.multiple.selected > select): Deleted.
3839         (body[dir=ltr] .scope-bar > li.multiple > .arrows): Deleted.
3840         (body[dir=rtl] .scope-bar > li.multiple > .arrows): Deleted.
3841         (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows): Deleted.
3842         (.scope-bar > li:matches(.selected, :active)): Deleted.
3843         (@media (prefers-color-scheme: dark)): Deleted.
3844         Switch to using `::after` since `::before` is more commonly used.
3845
3846         * UserInterface/Views/MultipleScopeBarItem.js:
3847         (WI.MultipleScopeBarItem.prototype._handleMouseDown):
3848         Drive-by: fix the <select> alignment by re-firing the "mousedown" event on it.
3849
3850         * UserInterface/Views/AuditTestGroupContentView.js:
3851         (WI.AuditTestGroupContentView.prototype.layout):
3852         * UserInterface/Views/AuditTestGroupContentView.css:
3853         (.content-view.audit-test-group > header > nav > .scope-bar > li):