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