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