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