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