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