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