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