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