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