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