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