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