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