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