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