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