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