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