Web Inspector: Canvas: enabling auto-capture if the frame count is empty triggers...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-02-28  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Canvas: enabling auto-capture if the frame count is empty triggers an assertion
4         https://bugs.webkit.org/show_bug.cgi?id=195060
5
6         Reviewed by Matt Baker.
7
8         * UserInterface/Views/CanvasOverviewContentView.js:
9         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
10         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
11         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureCheckedDidChange):
12
13 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
14
15         Web Inspector: Revert -webkit-border-end changes that are unreliable
16         https://bugs.webkit.org/show_bug.cgi?id=195149
17
18         Reviewed by Matt Baker.
19
20         * UserInterface/Views/CPUUsageIndicatorView.css:
21         (.cpu-usage-indicator-view > .details):
22         (body[dir=ltr] .cpu-usage-indicator-view > .details):
23         (body[dir=rtl] .cpu-usage-indicator-view > .details):
24         * UserInterface/Views/CPUUsageStackedView.css:
25         (.cpu-usage-stacked-view > .details):
26         (body[dir=ltr] .cpu-usage-stacked-view > .details):
27         (body[dir=rtl] .cpu-usage-stacked-view > .details):
28         * UserInterface/Views/CPUUsageView.css:
29         (.cpu-usage-view > .details):
30         (body[dir=ltr] .cpu-usage-view > .details):
31         (body[dir=rtl] .cpu-usage-view > .details):
32         * UserInterface/Views/MemoryCategoryView.css:
33         (.memory-category-view > .details):
34         (body[dir=ltr] .memory-category-view > .details):
35         (body[dir=rtl] .memory-category-view > .details):
36
37 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
38
39         Web Inspector: Cleanup some Chart code
40         https://bugs.webkit.org/show_bug.cgi?id=195147
41
42         Reviewed by Matt Baker.
43
44         * UserInterface/Views/RangeChart.js:
45         (WI.RangeChart.prototype.layout):
46         (WI.RangeChart):
47         * UserInterface/Views/StackedColumnChart.js:
48         (WI.StackedColumnChart.prototype.layout):
49         (WI.StackedColumnChart):
50
51 2019-02-27  Joseph Pecoraro  <pecoraro@apple.com>
52
53         Web Inspector: Add a new Scanner TimelineMarker to show up when mousing over TimelineView graphs
54         https://bugs.webkit.org/show_bug.cgi?id=195079
55
56         Reviewed by Devin Rousso.
57
58         * UserInterface/Base/Utilities.js:
59         (Note.prototype.enclosingNodeOrSelfWithClassInArray):
60         Helper for a set of classes.
61
62         * UserInterface/Models/TimelineMarker.js:
63         Add a new marker type, "Scanner".
64
65         * UserInterface/Views/CPUTimelineView.js:
66         (WI.CPUTimelineView.prototype.initialLayout):
67         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
68         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
69         * UserInterface/Views/MemoryTimelineView.js:
70         (WI.MemoryTimelineView):
71         (WI.MemoryTimelineView.prototype._graphPositionForMouseEvent):
72         (WI.MemoryTimelineView.prototype._handleGraphMouseMove):
73         Update a scanner time when mousing over various graphs that span the entire time range.
74         These use the containing graph element because there was a single pixel between
75         adjacent graphs which would cause the scanner to flicker because the mouse event target
76         was not an svg element.
77
78         * UserInterface/Views/TimelineOverview.js:
79         (WI.TimelineOverview.prototype.hidden):
80         (WI.TimelineOverview.prototype.updateScannerTime):
81         (WI.TimelineOverview.prototype.clearScanner):
82         * UserInterface/Views/TimelineRecordingContentView.js:
83         (WI.TimelineRecordingContentView):
84         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerTimeDidChange):
85         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerDidClear):
86         Update the overview's ruler with scanner changes.
87
88         * UserInterface/Views/TimelineRuler.css:
89         (.timeline-ruler > .markers > .marker.scanner):
90         * UserInterface/Views/TimelineRuler.js:
91         (WI.TimelineRuler):
92         (WI.TimelineRuler.prototype.clearMarkers):
93         (WI.TimelineRuler.prototype.updateScannerTime):
94         (WI.TimelineRuler.prototype.clearScanner):
95         (WI.TimelineRuler.prototype._updateMarkers):
96         Have a special scanner marker that updates.
97
98         * UserInterface/Views/TimelineView.js:
99         New events that a TimelineView can dispatch to update the overview.
100
101         * UserInterface/Views/Variables.css:
102         (:root):
103         (@media (prefers-color-scheme: dark)):
104         Scanner marker colors.
105
106 2019-02-27  Devin Rousso  <drousso@apple.com>
107
108         Web Inspector: Use Element.closest for internal code
109         https://bugs.webkit.org/show_bug.cgi?id=173747
110
111         Reviewed by Joseph Pecoraro.
112
113         Replace usage of added utility functions on the `Node` prototype with the built-in
114         `Element.prototype.closest` as it's more flexible and is capable of doing the same thing.
115
116         * UserInterface/Base/Utilities.js:
117         (Node.prototype.enclosingNodeOrSelfWithClass): Deleted.
118         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Deleted.
119         (Node.prototype.enclosingNodeOrSelfWithNodeName): Deleted.
120         * UserInterface/Base/Main.js:
121         (WI.handlePossibleLinkClick):
122         (WI._focusedContentBrowser):
123         * UserInterface/Views/CPUTimelineView.js:
124         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
125         * UserInterface/Views/CompletionSuggestionsView.js:
126         (WI.CompletionSuggestionsView.prototype.set selectedIndex):
127         (WI.CompletionSuggestionsView.prototype.update):
128         (WI.CompletionSuggestionsView.prototype._itemClicked):
129         * UserInterface/Views/ConsoleGroup.js:
130         (WI.ConsoleGroup.prototype._titleClicked):
131         * UserInterface/Views/DOMTreeContentView.js:
132         (WI.DOMTreeContentView.prototype._mouseWasClicked):
133         * UserInterface/Views/DOMTreeElement.js:
134         (WI.DOMTreeElement.prototype._startEditingTarget):
135         (WI.DOMTreeElement.prototype._populateTagContextMenu):
136         * UserInterface/Views/DOMTreeOutline.js:
137         (WI.DOMTreeOutline.prototype.populateContextMenu):
138         * UserInterface/Views/DataGrid.js:
139         (WI.DataGrid.prototype._startEditing):
140         (WI.DataGrid.prototype._editingCancelled):
141         (WI.DataGrid.prototype.dataGridNodeFromNode):
142         (WI.DataGrid.prototype.dataGridNodeFromPoint):
143         (WI.DataGrid.prototype._headerCellClicked):
144         (WI.DataGrid.prototype._mouseoverColumnCollapser):
145         (WI.DataGrid.prototype._mouseoutColumnCollapser):
146         (WI.DataGrid.prototype._clickInColumnCollapser):
147         (WI.DataGrid.prototype._contextMenuInHeader):
148         (WI.DataGrid.prototype._contextMenuInDataTable):
149         * UserInterface/Views/DataGridNode.js:
150         (WI.DataGridNode.prototype.isEventWithinDisclosureTriangle):
151         * UserInterface/Views/LegacyTabBar.js:
152         (WI.LegacyTabBar.prototype._handleMouseDown):
153         (WI.LegacyTabBar.prototype._handleClick):
154         * UserInterface/Views/LogContentView.js:
155         (WI.LogContentView.prototype._handleContextMenuEvent):
156         (WI.LogContentView.prototype._mousedown):
157         (WI.LogContentView.prototype._targetInMessageCanBeSelected):
158         (WI.LogContentView.prototype._mousemove):
159         (WI.LogContentView.prototype._mouseup):
160         (WI.LogContentView.prototype._ondragstart):
161         * UserInterface/Views/NavigationBar.js:
162         (WI.NavigationBar.prototype._mouseDown):
163         (WI.NavigationBar.prototype._mouseMoved):
164         * UserInterface/Views/Popover.js:
165         (WI.Popover.prototype.handleEvent):
166         * UserInterface/Views/TabBar.js:
167         (WI.TabBar.prototype._handleMouseDown):
168         (WI.TabBar.prototype._handleClick):
169         * UserInterface/Views/Table.js:
170         (WI.Table.prototype._handleMouseDown):
171         (WI.Table.prototype._handleContextMenu):
172         * UserInterface/Views/TreeOutline.js:
173         (WI.TreeOutline.prototype.treeElementFromNode):
174
175 2019-02-27  Devin Rousso  <drousso@apple.com>
176
177         Web Inspector: REGRESSION(r242118): Debugger: event breakpoints have no icon
178         https://bugs.webkit.org/show_bug.cgi?id=195119
179
180         Reviewed by Matt Baker.
181
182         * UserInterface/Views/EventBreakpointTreeElement.js:
183         (WI.EventBreakpointTreeElement):
184
185 2019-02-27  Devin Rousso  <drousso@apple.com>
186
187         Web Inspector: Dark Mode: unreadable text in bezier curve editor numeric input fields
188         https://bugs.webkit.org/show_bug.cgi?id=195018
189         <rdar://problem/48378541>
190
191         Reviewed by Matt Baker.
192
193         Simplify some styles using `-webkit-*` properties instead of `[dir=ltr]`/`[dir=rtl]` selectors.
194
195         * UserInterface/Views/BezierEditor.css:
196         (.bezier-editor):
197         (.bezier-editor > .bezier-preview):
198         (.bezier-editor > .bezier-preview-timing):
199         (.bezier-editor > .bezier-container .linear-curve):
200         (.bezier-editor > .bezier-container .bezier-curve):
201         (.bezier-editor > .bezier-container .control-line):
202         (.bezier-editor > .bezier-container .control-handle):
203         (.bezier-editor > .number-input-container):
204         (.bezier-editor > .number-input-container > input):
205         (body[dir=ltr] .bezier-editor > .bezier-preview-timing): Deleted.
206         (body[dir=rtl] .bezier-editor > .bezier-preview-timing): Deleted.
207         (body[dir=ltr] .bezier-editor > .number-input-container > input): Deleted.
208         (body[dir=rtl] .bezier-editor > .number-input-container > input): Deleted.
209         (@media (prefers-color-scheme: dark)): Deleted.
210         Remove all custom styling on any <input>s, as they look fine with their default styling.
211
212         * UserInterface/Views/SpringEditor.css:
213         (.spring-editor > .spring-preview):
214         (.spring-editor > .spring-preview > div):
215         (.spring-editor > .spring-timing > div):
216
217 2019-02-27  Devin Rousso  <drousso@apple.com>
218
219         Web Inspector: popover colors don't change when transitioning to/from dark mode
220         https://bugs.webkit.org/show_bug.cgi?id=195113
221         <rdar://problem/48444188>
222
223         Reviewed by Timothy Hatcher.
224
225         * UserInterface/Views/Popover.js:
226         (WI.Popover.prototype.dismiss):
227         (WI.Popover.prototype._addListenersIfNeeded):
228
229 2019-02-26  Matt Baker  <mattbaker@apple.com>
230
231         Web Inspector: Use system accent color throughout UI
232         https://bugs.webkit.org/show_bug.cgi?id=193507
233         <rdar://problem/47327971>
234
235         Reviewed by Timothy Hatcher.
236
237         * UserInterface/Images/Breakpoint.png: Removed.
238         * UserInterface/Images/Breakpoint.svg: Added.
239         * UserInterface/Images/Breakpoint@2x.png: Removed.
240         * UserInterface/Images/BreakpointInactive.png: Removed.
241         * UserInterface/Images/BreakpointInactive@2x.png: Removed.
242         Replace breakpoint pixel art with an SVG image that can be styled in CSS.
243
244         * UserInterface/Images/CSSVariable.svg:
245         * UserInterface/Images/CubicBezier.svg:
246         * UserInterface/Images/UserInputPrompt.svg:
247         Remove fill color since it is now styled in CSS.
248
249         * UserInterface/Views/BezierEditor.css:
250         (.bezier-editor > .bezier-preview > div):
251         (@media (prefers-color-scheme: dark)):
252         (.bezier-editor > .bezier-container .control-handle):
253         (.bezier-editor > .bezier-container .control-line):
254         Use system accent color for control handles.
255
256         * UserInterface/Views/BreakpointTreeElement.css:
257         (.item.breakpoint .status > .status-image):
258         (.item.breakpoint .status > .status-image.resolved):
259         Use system accent color for breakpoint fill, with a dark outline
260         to match Xcode and make the button stand out against the selection.
261
262         * UserInterface/Views/BreakpointTreeElement.js:
263         (WI.BreakpointTreeElement.prototype._updateStatus):
264
265         * UserInterface/Views/ButtonNavigationItem.css:
266         (.navigation-bar .item.button > .glyph):
267
268         * UserInterface/Views/ConsolePrompt.js:
269         (WI.ConsolePrompt):
270
271         * UserInterface/Views/DOMBreakpointTreeElement.js:
272         * UserInterface/Views/DOMTreeContentView.css:
273         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
274         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,):
275         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
276         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled): Deleted.
277         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint): Deleted.
278         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint.disabled): Deleted.
279
280         * UserInterface/Views/DOMTreeOutline.css:
281         (.tree-outline.dom li.selected .selection-area):
282         (.tree-outline.dom li.elements-drag-over .selection-area):
283         (.tree-outline.dom:focus li:matches(.selected, .hovered) .selection-area):
284         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
285         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
286         Use the system accent color for the "pseudo-class enabled" marker.
287         (@media (prefers-color-scheme: dark)):
288         (.tree-outline.dom:focus li.selected .selection-area): Deleted.
289         Use --selected-background-color for selection and hover styles, which is
290         set to the system highlight color if available.
291
292         * UserInterface/Views/InlineSwatch.css:
293         (.inline-swatch:matches(.bezier, .spring, .variable)):
294         (.inline-swatch:matches(.bezier, .spring)): Deleted.
295         (.inline-swatch.variable): Deleted.
296
297         * UserInterface/Views/InlineSwatch.js:
298         (WI.InlineSwatch):
299
300         * UserInterface/Views/NetworkDetailView.css:
301         (.network .network-detail .navigation-bar .item.radio.button.text-only:before):
302         (.network .network-detail .navigation-bar .item.radio.button.text-only.selected):
303         (@media (prefers-color-scheme: dark)):
304         (.network-detail .item.close > .glyph):
305
306         * UserInterface/Views/QuickConsole.css:
307         (.quick-console > .console-prompt > .glyph):
308         (.quick-console > .console-prompt::before): Deleted.
309
310         * UserInterface/Views/RadioButtonNavigationItem.css:
311         (.navigation-bar .item.radio.button.text-only):
312         (.navigation-bar .item.radio.button.text-only::before):
313         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)):
314         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)::before):
315         (.navigation-bar .item.radio.button.text-only:not(.selected):hover::before):
316         (.navigation-bar .item.radio.button.text-only.selected:active::before):
317         (.navigation-bar .item.radio.button.text-only:hover): Deleted.
318         (.navigation-bar .item.radio.button.text-only.selected): Deleted.
319         (.navigation-bar .item.radio.button.text-only:active): Deleted.
320         (.navigation-bar .item.radio.button.text-only.selected:active): Deleted.
321         Use system accent color for selection and hover styles. Since it isn't
322         yet possible to derive new colors from the accent color in CSS, fake it
323         with a ::before pseudo-element that can have have `filter` or `opacity`
324         effects applied to it without altering the button text color.
325
326         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
327         (.timeline-overview-graph.rendering-frame > .frame-marker):
328         Use system accent color for selected frame marker.
329
330         * UserInterface/Views/ScopeBar.css:
331         (.scope-bar > li):
332         (.scope-bar > li::before):
333         (.scope-bar.default-item-selected > li.multiple.selected::before):
334         (.scope-bar > li:matches(.selected, :hover)):
335         (.scope-bar > li:matches(.selected, :hover)::before):
336         (.scope-bar > li:not(.selected):hover::before):
337         (.scope-bar > li.selected:active::before):
338         (.scope-bar > li:hover): Deleted.
339         (.scope-bar > li.selected): Deleted.
340         (.scope-bar > li:active): Deleted.
341         (.scope-bar > li.selected:active): Deleted.
342
343         * UserInterface/Views/SettingsTabContentView.css:
344         (.content-view.settings .navigation-bar .item.radio.button.text-only:before):
345
346         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
347         (.spreadsheet-style-declaration-editor):
348         (@media (prefers-color-scheme: dark)):
349
350         * UserInterface/Views/TextEditor.css:
351         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
352         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
353         (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
354         (@keyframes text-editor-highlight-fadeout):
355         (@keyframes text-editor-hovered-expression-highlight-fadeout):
356         Replace breakpoint pixel art with a solid color (the system accent
357         color) clipped to the shape of a breakpoint.
358
359         * UserInterface/Views/TimelineRecordFrame.css:
360         (.timeline-record-frame.selected):
361
362         * UserInterface/Views/URLBreakpointTreeElement.js:
363
364         * UserInterface/Views/Variables.css:
365         (:root):
366         (body.window-inactive):
367         (@media (prefers-color-scheme: dark)):
368         (body.mac-platform:not(.sierra, .high-sierra)):
369         Add custom property overrides for system colors where supported.
370
371 2019-02-26  Devin Rousso  <drousso@apple.com>
372
373         Web Inspector: Search: no results when opening to Search tab
374         https://bugs.webkit.org/show_bug.cgi?id=195058
375         <rdar://problem/48407699>
376
377         Reviewed by Joseph Pecoraro.
378
379         * UserInterface/Views/SearchSidebarPanel.js:
380         (WI.SearchSidebarPanel.prototype.performSearch):
381         If targets aren't available, wait until they are and then perform the search.
382
383         * UserInterface/Base/Main.js:
384         (WI.targetsAvailable): Added.
385         Expose getter for indicating whether targets are available.
386
387 2019-02-26  Joseph Pecoraro  <pecoraro@apple.com>
388
389         Web Inspector: CPU Usage Timeline - Main Thread Indicator
390         https://bugs.webkit.org/show_bug.cgi?id=194972
391
392         Reviewed by Devin Rousso.
393
394         * UserInterface/Main.html:
395         * UserInterface/Base/Utilities.js:
396         (value):
397         The existing enclosingNode doesn't work for SVG because its names
398         are lowercase. Add a simplified version for the svg case.
399
400         * UserInterface/Views/RangeChart.js: Added.
401         (WI.RangeChart):
402         (WI.RangeChart.prototype.get size):
403         (WI.RangeChart.prototype.set size):
404         (WI.RangeChart.prototype.addRange):
405         (WI.RangeChart.prototype.clear):
406         (WI.RangeChart.prototype.layout):
407         A new chart that draws rects for given ranges.
408
409         * UserInterface/Models/Timeline.js:
410         (WI.Timeline.prototype.recordsOverlappingTimeRange):
411         Helper to specifically get records touching a range. Useful
412         for when we have a single pixel spanning (startTime -> endTime)
413         and we want to find records in that pixel.
414
415         * UserInterface/Views/CPUTimelineView.css:
416         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart rect):
417         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-script):
418         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-style):
419         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-layout):
420         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-paint):
421         * UserInterface/Views/CPUTimelineView.js:
422         (WI.CPUTimelineView.prototype.get indicatorViewHeight):
423         (WI.CPUTimelineView.prototype.clear):
424         (WI.CPUTimelineView.prototype.get scrollableElements):
425         (WI.CPUTimelineView.prototype.initialLayout):
426         (WI.CPUTimelineView.prototype.layout):
427         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
428         (WI.CPUTimelineView.prototype._handleIndicatorClick):
429         (WI.CPUTimelineView.prototype._attemptSelectIndicatatorTimelineRecord):
430         (WI.CPUTimelineView.prototype._selectTimelineRecord):
431         Place the Main Thread Indicator view beneath the big graph.
432         Clicking inside it selects records in the Timeline Overview.
433
434         * UserInterface/Views/CPUUsageIndicatorView.css: Added.
435         (.cpu-usage-indicator-view):
436         (.cpu-usage-indicator-view > .details):
437         (body[dir=ltr] .cpu-usage-indicator-view > .details):
438         (body[dir=rtl] .cpu-usage-indicator-view > .details):
439         (body[dir=rtl] .cpu-usage-indicator-view > .graph):
440         (.cpu-usage-indicator-view > .graph):
441         (.cpu-usage-indicator-view > .graph,):
442         * UserInterface/Views/CPUUsageIndicatorView.js: Added.
443         (WI.CPUUsageIndicatorView):
444         (WI.CPUUsageIndicatorView.prototype.get chart):
445         (WI.CPUUsageIndicatorView.prototype.clear):
446         (WI.CPUUsageIndicatorView.prototype.updateChart):
447         Converts the CPU samples data into a RangeChart. It works to coalesce
448         many samples of the same type into a single range to reduce total ranges.
449
450         * UserInterface/Views/TimelineRecordingContentView.js:
451         (WI.TimelineRecordingContentView):
452         (WI.TimelineRecordingContentView.prototype._recordSelected):
453         (WI.TimelineRecordingContentView.prototype._recordWasSelected):
454         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineOverview):
455         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineView):
456         * UserInterface/Views/TimelineView.js:
457         Add a path for a TimelineView to dispatch a record selected event and cause
458         have the TimelineRecordingContentView react to it by updating the timeline
459         overview and relevent timeline view.
460
461 2019-02-26  Devin Rousso  <drousso@apple.com>
462
463         Web Inspector: navigation sidebar says "No Search Results" when a slow search is in progress
464         https://bugs.webkit.org/show_bug.cgi?id=170631
465         <rdar://problem/29473874>
466
467         Reviewed by Joseph Pecoraro.
468
469         Keep a count of all the backend commands (increment when firing, decrement when a result is
470         sent back to the frontend). Once the count comes back to `0`, attempt to show the "No Results"
471         placeholder, since we will have finished searching at that point. Since commands can be called
472         as a result of other commands, using `Promise.all` isn't possible.
473
474         * UserInterface/Views/SearchSidebarPanel.js:
475         (WI.SearchSidebarPanel.prototype.performSearch):
476         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon): Deleted.
477         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder): Deleted.
478         Drive-by: replace `bind` calls with arrow functions, and use for-of loops.
479
480         * Localizations/en.lproj/localizedStrings.js:
481
482 2019-02-26  Devin Rousso  <drousso@apple.com>
483
484         Web Inspector: Canvas: if no auto-capture value is specified, don't force the input to have "0" as the value
485         https://bugs.webkit.org/show_bug.cgi?id=194950
486         <rdar://problem/48276798>
487
488         Reviewed by Joseph Pecoraro.
489
490         Create a getter/setter for the value of the auto-capture frame count <input> so that all
491         code follows the same path.
492
493         If the <input> currently has no content and the frame count is 0, only set the placeholder.
494
495         * UserInterface/Views/CanvasOverviewContentView.js:
496         (WI.CanvasOverviewContentView):
497         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
498         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
499         (WI.CanvasOverviewContentView.prototype.get _recordingAutoCaptureFrameCountInputElementValue): Added.
500         (WI.CanvasOverviewContentView.prototype.set _recordingAutoCaptureFrameCountInputElementValue): Added.
501         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
502         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
503
504 2019-02-26  Devin Rousso  <drousso@apple.com>
505
506         Web Inspector: Console: dragging a selection outside the selected element clears the selection
507         https://bugs.webkit.org/show_bug.cgi?id=194660
508         <rdar://problem/46719239>
509
510         Reviewed by Joseph Pecoraro.
511
512         * UserInterface/Views/LogContentView.js:
513         (WI.LogContentView.prototype._mousemove):
514         Don't clear the selection if the target of the "mousemove" is outside of the view.
515
516         (WI.LogContentView.prototype._updateMessagesSelection):
517         Drive-by: clear the saved selected messages when we're just selecting a single message.
518
519 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
520
521         Web Inspector: Rename LineChart to AreaChart
522         https://bugs.webkit.org/show_bug.cgi?id=195038
523
524         Rubber-stamped by Matt Baker.
525
526         * UserInterface/Main.html:
527         New file names.
528
529         * UserInterface/Views/AreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LineChart.js.
530         * UserInterface/Views/StackedAreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/StackedLineChart.js.
531         Renamed.
532
533         * UserInterface/Views/CPUTimelineView.css:
534         * UserInterface/Views/CPUUsageStackedView.css:
535         * UserInterface/Views/CPUUsageStackedView.js:
536         * UserInterface/Views/CPUUsageView.css:
537         * UserInterface/Views/CPUUsageView.js:
538         * UserInterface/Views/LegacyCPUTimelineView.css:
539         * UserInterface/Views/MemoryCategoryView.css:
540         * UserInterface/Views/MemoryCategoryView.js:
541         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
542         Update references.
543
544 2019-02-25  Devin Rousso  <drousso@apple.com>
545
546         Web Inspector: hovering a node inside an object preview should highlight it
547         https://bugs.webkit.org/show_bug.cgi?id=194862
548         <rdar://problem/48246433>
549
550         Reviewed by Joseph Pecoraro.
551
552         * UserInterface/Views/FormattedValue.js:
553         (WI.FormattedValue.createElementForNodePreview):
554         When provided a way to access the `WI.RemoteObject` for the given preview, add various mouse
555         event listeners that highlight the corresponding DOM node.
556
557         * UserInterface/Views/ObjectPreviewView.js:
558         (WI.ObjectPreviewView):
559         (WI.ObjectPreviewView.prototype._initTitleElement):
560         (WI.ObjectPreviewView.prototype._appendPropertyPreviews):
561         (WI.ObjectPreviewView.prototype._appendValuePreview):
562         Implement various ways of getting the `WI.RemoteObject` for a given preview.
563          - When the preview is for the actual `WI.RemoteObject`, simply return it
564          - If the preview is a property of the main object, get the `WI.RemoteObject` for that property
565
566         * UserInterface/Views/ObjectTreeView.js:
567         (WI.ObjectTreeView):
568         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
569         (WI.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
570         Pass the `WI.RemoteObject` to the preview so that it can utilize it.
571
572         * UserInterface/Controllers/ConsoleManager.js:
573         (WI.ConsoleManager):
574         (WI.ConsoleManager.prototype.releaseRemoteObjectWithConsoleClear): Added.
575         (WI.ConsoleManager.prototype.messagesCleared): Added.
576
577 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
578
579         Web Inspector: CPU Usage Timeline - Thread Breakdown
580         https://bugs.webkit.org/show_bug.cgi?id=194788
581
582         Reviewed by Devin Rousso.
583
584         * Localizations/en.lproj/localizedStrings.js:
585         * UserInterface/Main.html:
586         New strings and files.
587
588         * UserInterface/Views/Variables.css:
589         (:root):
590         New colors for cpu threads / activity breakdown.
591
592         * UserInterface/Models/CPUTimelineRecord.js:
593         (WI.CPUTimelineRecord.prototype.get workers):
594         (WI.CPUTimelineRecord):
595         Distinguish the workers in a CPU timeline record.
596
597         * UserInterface/Views/CPUTimelineOverviewGraph.js:
598         (WI.CPUTimelineOverviewGraph):
599         (WI.CPUTimelineOverviewGraph.prototype.layout):
600         * UserInterface/Views/CPUTimelineOverviewGraph.css:
601         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect):
602         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
603         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
604         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
605         Stacked column chart for CPU in the overview graph.
606
607         * UserInterface/Views/CPUTimelineView.css:
608         (.timeline-view.cpu > .content > .overview):
609         (.timeline-view.cpu > .content > .details > .subtitle.threads):
610         (.timeline-view.cpu > .content > .overview > .chart):
611         (.timeline-view.cpu > .content > .overview > .chart > .subtitle):
612         (.timeline-view.cpu > .content > .overview > .chart > .container):
613         (.timeline-view.cpu > .content > .overview .samples,):
614         (.timeline-view.cpu .legend):
615         (.timeline-view.cpu .legend .row):
616         (.timeline-view.cpu .legend .row + .row):
617         (.timeline-view.cpu .legend .swatch):
618         (.timeline-view.cpu .legend > .row > .swatch.sample-type-idle):
619         (.timeline-view.cpu .legend > .row > .swatch.sample-type-script):
620         (.timeline-view.cpu .legend > .row > .swatch.sample-type-style):
621         (.timeline-view.cpu .legend > .row > .swatch.sample-type-layout):
622         (.timeline-view.cpu .legend > .row > .swatch.sample-type-paint):
623         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-idle):
624         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script):
625         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-style):
626         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-layout):
627         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-paint):
628         (.timeline-view.cpu svg > path):
629         (.timeline-view.cpu .main-thread svg > path,):
630         (.timeline-view.cpu .worker-thread svg > path,):
631         (.timeline-view.cpu .cpu-usage-view.empty):
632         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers):
633         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div):
634         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div > .label):
635         (.timeline-view.cpu > .content): Deleted.
636         (.cpu-usage-view .line-chart > svg > path): Deleted.
637         (.timeline-view.cpu .legend > .row > .swatch.current): Deleted.
638         * UserInterface/Views/CPUTimelineView.js:
639         (WI.CPUTimelineView):
640         (WI.CPUTimelineView.displayNameForSampleType):
641         (WI.CPUTimelineView.prototype.shown):
642         (WI.CPUTimelineView.prototype.clear.clearUsageView):
643         (WI.CPUTimelineView.prototype.clear):
644         (WI.CPUTimelineView.prototype.initialLayout.createChartContainer):
645         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
646         (WI.CPUTimelineView.prototype.initialLayout):
647         (WI.CPUTimelineView.prototype.layout.removeGreaterThan):
648         (WI.CPUTimelineView.prototype.layout):
649         (WI.CPUTimelineView.prototype.layout.layoutView):
650         (WI.CPUTimelineView.prototype.layout.yScale):
651         (WI.CPUTimelineView.prototype._computeSamplingData.markRecordEntries):
652         (WI.CPUTimelineView.prototype._computeSamplingData):
653         (WI.CPUTimelineView.prototype._removeWorkerThreadViews):
654         (WI.CPUTimelineView.prototype._clearBreakdownLegend):
655         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
656         Line charts and Circle Chart for threads and breakdowns.
657
658         * UserInterface/Views/CPUUsageStackedView.css:
659         (.cpu-usage-stacked-view):
660         (.cpu-usage-stacked-view > .details):
661         (body[dir=ltr] .cpu-usage-stacked-view > .details):
662         (body[dir=rtl] .cpu-usage-stacked-view > .details):
663         (.cpu-usage-stacked-view > .details > .name):
664         (body[dir=rtl] .cpu-usage-stacked-view > .graph):
665         (.cpu-usage-stacked-view > .graph):
666         (.cpu-usage-stacked-view > .graph,):
667         * UserInterface/Views/CPUUsageStackedView.js:
668         (WI.CPUUsageStackedView):
669         (WI.CPUUsageStackedView.prototype.get chart):
670         (WI.CPUUsageStackedView.prototype.clear):
671         (WI.CPUUsageStackedView.prototype.updateChart):
672         (WI.CPUUsageStackedView.prototype._updateDetails):
673         Same as CPUUsageView except Stacked for the total.
674
675         * UserInterface/Views/CPUUsageView.css:
676         (.cpu-usage-view):
677         (.cpu-usage-view > .details):
678         (.cpu-usage-view > .details > .name):
679         (.cpu-usage-view > .graph):
680         * UserInterface/Views/CPUUsageView.js:
681         (WI.CPUUsageView):
682         (WI.CPUUsageView.prototype.get chart):
683         (WI.CPUUsageView.prototype.clear):
684         (WI.CPUUsageView.prototype.updateChart):
685         (WI.CPUUsageView.prototype._updateDetails):
686         Slight modifications for the new UI.
687
688         * UserInterface/Views/LegacyCPUTimelineView.css:
689         (.timeline-view.legacy-cpu .cpu-usage-view .line-chart > svg > path):
690         * UserInterface/Views/LegacyCPUTimelineView.js:
691         (WI.LegacyCPUTimelineView.prototype.layout):
692         Update API calls in the legacy view for minor changes.
693
694         * UserInterface/Views/MemoryCategoryView.css:
695         (.memory-category-view > .details):
696         (.memory-category-view > .details > .name):
697         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
698         (WI.MemoryTimelineOverviewGraph.prototype.layout):
699         * UserInterface/Views/MemoryTimelineView.css:
700         (body .timeline-view.memory):
701         (.timeline-view.memory): Deleted.
702         Improvements ported from the CPU timeline views.
703
704         * UserInterface/Views/StackedColumnChart.js: Added.
705         (WI.StackedColumnChart):
706         (WI.StackedColumnChart.prototype.get size):
707         (WI.StackedColumnChart.prototype.set size):
708         (WI.StackedColumnChart.prototype.initializeSections):
709         (WI.StackedColumnChart.prototype.addColumnSet):
710         (WI.StackedColumnChart.prototype.clear):
711         (WI.StackedColumnChart.prototype.layout):
712         A stacked column chart implementation.
713
714         * UserInterface/Views/View.js:
715         (WI.View.prototype.removeUnparentedSubview):
716         Add a way to remove a subview that had its `element` moved
717         someplace other than a direct child of our element.
718
719 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
720
721         Web Inspector: Dark Mode: Network Overview Graph segments have distracting white box shadow
722         https://bugs.webkit.org/show_bug.cgi?id=194966
723
724         Reviewed by Devin Rousso.
725
726         * UserInterface/Views/Variables.css:
727         (@media (prefers-color-scheme: dark)):
728         Make global timeline even/odd colors where odd is the default content background
729         color and even is slightly different. These were used in multiple places.
730
731         * UserInterface/Views/CPUTimelineOverviewGraph.css:
732         (.timeline-overview-graph.cpu > .legend):
733         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
734         (@media (prefers-color-scheme: dark)): Deleted.
735         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
736         (.timeline-overview-graph.memory > .legend):
737         (.timeline-overview-graph.memory:nth-child(even) > .legend):
738         (@media (prefers-color-scheme: dark)): Deleted.
739         * UserInterface/Views/NetworkTimelineOverviewGraph.css:
740         (.timeline-overview-graph.network > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
741         (.timeline-overview-graph.network:nth-child(even) > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
742         Use the variable colors now and eliminate dark mode blocks.
743
744 2019-02-25  Nikita Vasilyev  <nvasilyev@apple.com>
745
746         Web Inspector: Styles: Command-/ should toggle edited property
747         https://bugs.webkit.org/show_bug.cgi?id=194967
748         <rdar://problem/48329852>
749
750         Reviewed by Devin Rousso.
751
752         * UserInterface/Models/CSSProperty.js:
753         (WI.CSSProperty.prototype.commentOut):
754         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
755         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect):
756         * UserInterface/Views/SpreadsheetStyleProperty.js:
757         (WI.SpreadsheetStyleProperty.prototype.update):
758         (WI.SpreadsheetStyleProperty.prototype._toggle):
759         (WI.SpreadsheetStyleProperty.prototype._select):
760
761 2019-02-25  Devin Rousso  <drousso@apple.com>
762
763         Web Inspector: REGRESSION(r242018): Timelines shows no results
764         https://bugs.webkit.org/show_bug.cgi?id=195017
765
766         Reviewed by Joseph Pecoraro.
767
768         `simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
769
770         * UserInterface/Base/SearchUtilities.js:
771         (WI.SearchUtilities.prototype.regExpForString):
772         Add assertions that the provided search query is a valid non-empty string.
773
774         * UserInterface/Views/DataGrid.js:
775         (WI.DataGrid.prototype._updateFilter):
776         If the search query is empty, don't attempt to create a `RegExp` for it.
777
778 2019-02-25  Matt Baker  <mattbaker@apple.com>
779
780         Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
781         https://bugs.webkit.org/show_bug.cgi?id=194918
782         <rdar://problem/48289314>
783
784         Reviewed by Devin Rousso.
785
786         * UserInterface/Views/Table.js:
787         (WI.Table.prototype.selectionControllerSelectionDidChange):
788
789         * UserInterface/Views/TreeOutline.js:
790         (WI.TreeOutline.prototype._treeKeyDown):
791
792 2019-02-25  Devin Rousso  <drousso@apple.com>
793
794         Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
795         https://bugs.webkit.org/show_bug.cgi?id=183420
796
797         Reviewed by Joseph Pecoraro.
798
799         * UserInterface/Views/SourcesNavigationSidebarPanel.js: Added.
800         (WI.SourcesNavigationSidebarPanel):
801         (WI.SourcesNavigationSidebarPanel.shouldPlaceResourcesAtTopLevel):
802         (WI.SourcesNavigationSidebarPanel.prototype.get minimumWidth):
803         (WI.SourcesNavigationSidebarPanel.prototype.closed):
804         (WI.SourcesNavigationSidebarPanel.prototype.showDefaultContentView):
805         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
806         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
807         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
808         (WI.SourcesNavigationSidebarPanel.prototype.resetFilter):
809         (WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
810         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
811         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
812         (WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
813         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
814         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
815         (WI.SourcesNavigationSidebarPanel.prototype._addTarget):
816         (WI.SourcesNavigationSidebarPanel.prototype._findCallStackTargetTreeElement):
817         (WI.SourcesNavigationSidebarPanel.prototype._updateCallStackTreeOutline):
818         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
819         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
820         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
821         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
822         (WI.SourcesNavigationSidebarPanel.prototype._addDebuggerTreeElementForSourceCode):
823         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
824         (WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements):
825         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
826         (WI.SourcesNavigationSidebarPanel.prototype._removeBreakpoint):
827         (WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
828         (WI.SourcesNavigationSidebarPanel.prototype._toggleAllBreakpoints):
829         (WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
830         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
831         (WI.SourcesNavigationSidebarPanel.prototype._removeDebuggerTreeElement):
832         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
833         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
834         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
835         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
836         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonGotoArrow):
837         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
838         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceTypeScopeBarSelectionChanged):
839         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
840         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
841         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked):
842         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
843         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceAdded):
844         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
845         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointAdded):
846         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointRemoved):
847         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointsEnabledDidChange):
848         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptAdded):
849         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
850         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptsCleared):
851         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
852         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
853         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
854         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerActiveCallFrameDidChange):
855         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerWaitingToPause):
856         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
857         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateDidChange):
858         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleIssueAdded):
859         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleCleared):
860         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
861         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
862         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
863         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetAdded):
864         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetRemoved):
865         (WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
866         * UserInterface/Views/SourcesNavigationSidebarPanel.css: Added.
867         (.sidebar > .panel.navigation.sources > .content):
868         (.sidebar > .panel.navigation.sources > .navigation-bar):
869         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints):
870         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated):
871         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume):
872         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated):
873         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
874         (.sidebar > .panel.navigation.sources > .content > .details-section):
875         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
876         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
877         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)):
878         (.sidebar > .panel.navigation.sources > .content > .navigation-bar):
879         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread):
880         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread):
881         (@media (prefers-dark-interface) .sidebar > > .content > .panel.navigation.sources .warning-banner):
882
883         * UserInterface/Views/SourcesTabContentView.js: Added.
884         (WI.SourcesTabContentView):
885         (WI.SourcesTabContentView.tabInfo):
886         (WI.SourcesTabContentView.isTabAllowed):
887         (WI.SourcesTabContentView.prototype.get type):
888         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
889         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
890         (WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
891         (WI.SourcesTabContentView.prototype.showScopeChainDetailsSidebarPanel):
892         (WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint):
893
894         * UserInterface/Views/CanvasSidebarPanel.js:
895         (WI.CanvasSidebarPanel):
896         * UserInterface/Views/DebuggerSidebarPanel.js:
897         (WI.DebuggerSidebarPanel):
898         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
899         * UserInterface/Views/NavigationSidebarPanel.js:
900         (WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
901         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
902         (WI.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
903         Rework `createContentTreeOutline` to allow for additional symbols.
904         Add another symbol to ensure that the `WI.TreeOutline` is not used for cookie restoration.
905
906         * UserInterface/Protocol/InspectorFrontendAPI.js:
907         (InspectorFrontendAPI.showResources):
908         * UserInterface/Views/ContextMenuUtilities.js:
909         (WI.appendContextMenuItemsForURL):
910         * UserInterface/Views/DefaultDashboardView.js:
911         (WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
912         * UserInterface/Views/SourceCodeTextEditor.js:
913         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
914
915         * UserInterface/Views/TabBrowser.js:
916         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
917
918         * UserInterface/Base/Main.js:
919         (WI.contentLoaded):
920         (WI.showSourcesTab): Added.
921         (WI.isShowingSourcesTab): Added.
922         (WI.tabContentViewClassForRepresentedObject):
923         (WI._debuggerDidPause):
924
925         * UserInterface/Views/DebuggerTabContentView.js:
926         (WI.DebuggerTabContentView.isTabAllowed):
927         * UserInterface/Views/ResourcesTabContentView.js:
928         (WI.ResourcesTabContentView.isTabAllowed):
929
930         * UserInterface/Base/Setting.js:
931         * UserInterface/Views/SettingsTabContentView.js:
932         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
933
934         * UserInterface/Main.html:
935         * UserInterface/Images/Sources.svg: Added.
936         * Localizations/en.lproj/localizedStrings.js:
937
938 2019-02-24  Devin Rousso  <drousso@apple.com>
939
940         Web Inspector: Change the InspectorOverlay to use native rather than canvas
941         https://bugs.webkit.org/show_bug.cgi?id=105023
942         <rdar://problem/13443692>
943
944         Reviewed by Brian Burg.
945
946         * UserInterface/Base/Main.js:
947         (WI.initializeTarget):
948
949         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
950         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
951         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
952         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
953         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
954         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
955         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
956         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
957         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
958         * Versions/Inspector-iOS-10.0.json:
959         * Versions/Inspector-iOS-10.3.json:
960         * Versions/Inspector-iOS-11.0.json:
961         * Versions/Inspector-iOS-11.3.json:
962         * Versions/Inspector-iOS-12.0.json:
963         * Versions/Inspector-iOS-12.2.json:
964         * Versions/Inspector-iOS-8.0.json:
965         * Versions/Inspector-iOS-9.0.json:
966         * Versions/Inspector-iOS-9.3.json:
967         Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.
968
969 2019-02-24  Devin Rousso  <drousso@apple.com>
970
971         Web Inspector: provide a way to make searches case sensitive or use a regular expression
972         https://bugs.webkit.org/show_bug.cgi?id=192527
973
974         Reviewed by Joseph Pecoraro.
975
976         * UserInterface/Base/SearchUtilities.js: Added.
977         (WI.SearchUtilities.get defaultSettings):
978         (WI.SearchUtilities.createSettings):
979         (WI.SearchUtilities.regExpForString):
980         (WI.SearchUtilities.createSettingsButton):
981         (WI.SearchUtilities.createSettingsButton.toggleActive):
982         * UserInterface/Views/Main.css:
983         (.search-settings): Added.
984         (.search-settings > .glyph): Added.
985         (.search-settings:active > .glyph): Added.
986         (.search-settings.active > .glyph): Added.
987         (.search-settings:active.active > .glyph): Added.
988         Create static utility class for handling settings related to searching/filtering.
989
990         * UserInterface/Base/Setting.js:
991         * UserInterface/Views/SettingsTabContentView.js:
992         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
993         Create default search settings that apply across WebInspector, unless a more specific
994         setting has been created that overrides it (e.g. the navigation sidebar or Search tab).
995
996         * UserInterface/Views/SearchSidebarPanel.js:
997         (WI.SearchSidebarPanel):
998         (WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
999         (WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
1000         (WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
1001         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
1002         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts):
1003         (WI.SearchSidebarPanel.prototype.performSearch.domSearchResults):
1004         (WI.SearchSidebarPanel.prototype.performSearch.domCallback):
1005         (WI.SearchSidebarPanel.prototype.performSearch):
1006         * UserInterface/Views/SearchSidebarPanel.css:
1007         (.sidebar > .panel.navigation.search > .search-bar):
1008         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
1009         Add a (*) settings "gear" after each `<input type="search">` that shows a contextmenu with
1010         checkboxes for each search setting. Any settings changed for each input take precedence over
1011         the default settings, but will match the corresponding default setting if it's changed.
1012
1013         * UserInterface/Views/SearchResultTreeElement.js:
1014         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
1015         Use the length of the found text, rather than the length of the query.
1016
1017         * UserInterface/Views/DOMTreeElement.js:
1018         (WI.DOMTreeElement.prototype._highlightSearchResults):
1019         * UserInterface/Views/DataGrid.js:
1020         (WI.DataGrid.prototype._updateFilter):
1021         * UserInterface/Views/LogContentView.js:
1022         (WI.LogContentView.prototype.performSearch):
1023         * UserInterface/Views/NetworkTableContentView.js:
1024         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
1025         * UserInterface/Views/ResourceHeadersContentView.js:
1026         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
1027         * UserInterface/Views/ResourceSecurityContentView.js:
1028         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
1029         * UserInterface/Views/SourceCodeTextEditor.js:
1030         (WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
1031         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
1032         * UserInterface/Views/TextEditor.js:
1033         (WI.TextEditor.prototype.performSearch):
1034         Use the default search settings when searching/filtering.
1035
1036         * UserInterface/Views/SearchBar.css:
1037         (.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Added.
1038         Drive-by: prevent the (x) from appearing when no text has been entered.
1039
1040         * Localizations/en.lproj/localizedStrings.js:
1041         * UserInterface/Main.html:
1042
1043 2019-02-24  Devin Rousso  <drousso@apple.com>
1044
1045         Web Inspector: make debounce Proxy into its own class
1046         https://bugs.webkit.org/show_bug.cgi?id=194721
1047
1048         Reviewed by Joseph Pecoraro.
1049
1050         The `debounce`/`throttle` functions leveraged a `Proxy` to intercept the function call and
1051         replace it with a "delayed" version. The issue with this is that it set the identifier for
1052         the timer on the function itself, which is shared across all instances of a given class.
1053         When different instances call the same delayed function, they'd clobber eachother's attempts
1054         to delay work.
1055
1056         * UserInterface/Base/Debouncer.js: Added.
1057         (Debouncer):
1058         (Debouncer.prototype.force):
1059         (Debouncer.prototype.delayForTime):
1060         (Debouncer.prototype.delayForFrame):
1061         (Debouncer.prototype.delayForMicrotask):
1062         (Debouncer.prototype.cancel):
1063         (Debouncer.prototype._execute):
1064         * UserInterface/Base/Throttler.js: Added.
1065         (Throttler):
1066         (Throttler.prototype.force):
1067         (Throttler.prototype.fire):
1068         (Throttler.prototype.cancel):
1069         (Throttler.prototype._execute):
1070         * UserInterface/Base/Utilities.js:
1071
1072         * UserInterface/Views/BezierEditor.js:
1073         (WI.BezierEditor):
1074         * UserInterface/Views/ContentBrowser.js:
1075         (WI.ContentBrowser):
1076         (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
1077         (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
1078         (WI.ContentBrowser.prototype._currentContentViewDidChange):
1079         (WI.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Deleted.
1080         * UserInterface/Views/DOMTreeUpdater.js:
1081         (WI.DOMTreeUpdater):
1082         (WI.DOMTreeUpdater.prototype._nodeAttributeModified):
1083         (WI.DOMTreeUpdater.prototype._nodeInserted):
1084         (WI.DOMTreeUpdater.prototype._nodeRemoved):
1085         * UserInterface/Views/NavigationSidebarPanel.js:
1086         (WI.NavigationSidebarPanel):
1087         (WI.NavigationSidebarPanel.prototype.closed):
1088         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
1089         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
1090         (WI.NavigationSidebarPanel.prototype.updateFilter):
1091         (WI.NavigationSidebarPanel.prototype.shown):
1092         (WI.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
1093         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
1094         (WI.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
1095         * UserInterface/Views/RecordingContentView.js:
1096         (WI.RecordingContentView):
1097         (WI.RecordingContentView.prototype.updateActionIndex):
1098         (WI.RecordingContentView.prototype.hidden):
1099         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1100         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
1101         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
1102         (WI.ResourceDetailsSidebarPanel):
1103         * UserInterface/Views/ShaderProgramContentView.js:
1104         (WI.ShaderProgramContentView):
1105         * UserInterface/Views/SpringEditor.js:
1106         (WI.SpringEditor.prototype._resetPreviewAnimation):
1107         * UserInterface/Views/TreeElement.js:
1108         (WI.TreeElement.prototype.set hidden):
1109         (WI.TreeElement.prototype.didChange):
1110         (WI.TreeElement.prototype._attach):
1111         (WI.TreeElement.prototype._detach):
1112         (WI.TreeElement.prototype.collapse):
1113         (WI.TreeElement.prototype.expand):
1114         (WI.TreeElement.prototype.reveal):
1115         * UserInterface/Views/TreeOutline.js:
1116         (WI.TreeOutline):
1117         (WI.TreeOutline.prototype.registerScrollVirtualizer):
1118         (WI.TreeOutline.prototype.get updateVirtualizedElementsDebouncer): Added.
1119         (WI.TreeOutline.prototype._updateVirtualizedElements): Added.
1120         (WI.TreeOutline.prototype.updateVirtualizedElements.walk): Deleted.
1121         (WI.TreeOutline.prototype.updateVirtualizedElements): Deleted.
1122         * UserInterface/Views/WebSocketContentView.js:
1123         (WI.WebSocketContentView):
1124         (WI.WebSocketContentView.prototype.shown):
1125         (WI.WebSocketContentView.prototype._updateFramesSoon):
1126         (WI.WebSocketContentView.prototype._updateFrames):
1127
1128         * UserInterface/Main.html:
1129         * UserInterface/Test.html:
1130         * .eslintrc:
1131
1132 2019-02-24  Nikita Vasilyev  <nvasilyev@apple.com>
1133
1134         Unreviewed, fix indentation.
1135
1136         * UserInterface/Models/CSSStyleDeclaration.js:
1137         (WI.CSSStyleDeclaration.prototype.markModified):
1138
1139 2019-02-23  Keith Miller  <keith_miller@apple.com>
1140
1141         Add new mac target numbers
1142         https://bugs.webkit.org/show_bug.cgi?id=194955
1143
1144         Reviewed by Tim Horton.
1145
1146         * Configurations/Base.xcconfig:
1147         * Configurations/DebugRelease.xcconfig:
1148
1149 2019-02-22  Devin Rousso  <drousso@apple.com>
1150
1151         Web Inspector: Timelines: add UI for preventing auto-stop
1152         https://bugs.webkit.org/show_bug.cgi?id=194956
1153
1154         Reviewed by Joseph Pecoraro.
1155
1156         Add a checkbox to the navigation area of the Timelines tab that controls whether recordings
1157         automatically stop (e.g. after "load" or a period of inactivity).
1158
1159         * UserInterface/Views/TimelineRecordingContentView.js:
1160         (WI.TimelineRecordingContentView):
1161         (WI.TimelineRecordingContentView.prototype.get navigationItems):
1162         (WI.TimelineRecordingContentView.prototype._handleAutoStopCheckboxCheckedDidChange): Added.
1163         (WI.TimelineRecordingContentView.prototype._handleTimelinesAutoStopSettingChanged): Added.
1164
1165         * UserInterface/Controllers/TimelineManager.js:
1166         (WI.TimelineManager):
1167         (WI.TimelineManager.prototype.capturingStopped):
1168         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
1169         (WI.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
1170         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1171         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
1172
1173         * UserInterface/Base/Setting.js:
1174         * Localizations/en.lproj/localizedStrings.js:
1175
1176 2019-02-22  Devin Rousso  <drousso@apple.com>
1177
1178         REGRESSION(r?): Web Inspector: Popovers have inset shadows
1179         https://bugs.webkit.org/show_bug.cgi?id=192963
1180         <rdar://problem/46888679>
1181
1182         Reviewed by Brian Burg.
1183
1184         * UserInterface/Views/Popover.js:
1185         (WI.Popover.prototype._drawBackground):
1186         (WI.Popover.prototype._drawBackground.isolate): Added.
1187         * UserInterface/Views/Popover.css:
1188         (.popover):
1189
1190 2019-02-22  Devin Rousso  <drousso@apple.com>
1191
1192         Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
1193         https://bugs.webkit.org/show_bug.cgi?id=180791
1194         <rdar://problem/36038366>
1195
1196         Reviewed by Brian Burg.
1197
1198         * UserInterface/Views/SpreadsheetSelectorField.js:
1199         (WI.SpreadsheetSelectorField):
1200         (WI.SpreadsheetSelectorField.prototype.startEditing):
1201         (WI.SpreadsheetSelectorField.prototype.stopEditing):
1202         (WI.SpreadsheetSelectorField.prototype._handleMouseDown): Added.
1203         (WI.SpreadsheetSelectorField.prototype._handleMouseUp): Added.
1204         (WI.SpreadsheetSelectorField.prototype._handleFocus): Deleted.
1205
1206         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1207         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1208         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1209         (.spreadsheet-css-declaration .selector.editing:focus, .spreadsheet-css-declaration .selector > .matched): Added.
1210         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
1211         (.spreadsheet-css-declaration .selector:focus, .spreadsheet-css-declaration .selector > .matched): Deleted.
1212
1213 2019-02-22  Nikita Vasilyev  <nvasilyev@apple.com>
1214
1215         Web Inspector: Dark Mode: DOM Content Loaded blue marker is too dark
1216         https://bugs.webkit.org/show_bug.cgi?id=194970
1217         <rdar://problem/48330126>
1218
1219         Reviewed by Joseph Pecoraro.
1220
1221         * UserInterface/Views/TimelineRuler.css:
1222         (@media (prefers-color-scheme: dark)):
1223         (.timeline-ruler > .markers > .marker.dom-content-event):
1224         Make the marker lighter for the dark mode.
1225
1226 2019-02-22  Joseph Pecoraro  <pecoraro@apple.com>
1227
1228         Web Inspector: Remove unused Timeline record selection code path
1229         https://bugs.webkit.org/show_bug.cgi?id=194931
1230
1231         Reviewed by Devin Rousso.
1232
1233         * UserInterface/Views/TimelineOverview.js:
1234         (WI.TimelineOverview):
1235         (WI.TimelineOverview.prototype.userSelectedRecord): Deleted.
1236         * UserInterface/Views/TimelineRecordingContentView.js:
1237         (WI.TimelineRecordingContentView):
1238         (WI.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord): Deleted.
1239         * UserInterface/Views/TimelineView.js:
1240         (WI.TimelineView.prototype.userSelectedRecordFromOverview): Deleted.
1241
1242 2019-02-21  Darin Adler  <darin@apple.com>
1243
1244         Some refinements for Node and Document
1245         https://bugs.webkit.org/show_bug.cgi?id=194764
1246
1247         Reviewed by Ryosuke Niwa.
1248
1249         * UserInterface/Models/NativeFunctionParameters.js: Removed getOverrideStyle
1250         because this deprecated non-working function is no longer something web authors
1251         should be thinking about or typing.
1252
1253 2019-02-21  Devin Rousso  <drousso@apple.com>
1254
1255         Web Inspector: Canvas: recordings with a single frame sometimes missing TreeElement
1256         https://bugs.webkit.org/show_bug.cgi?id=194687
1257
1258         Reviewed by Joseph Pecoraro.
1259
1260         * UserInterface/Views/CanvasSidebarPanel.js:
1261         (WI.CanvasSidebarPanel):
1262         Wait until the entire `Recording` has been processed before setting the selected action.
1263
1264         * UserInterface/Views/CanvasSidebarPanel.css:
1265         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
1266         Drive-by: ensure that the recording `TreeOutline` container element has the full height to
1267         take advantage of for virtualization.
1268
1269         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
1270         (WI.RecordingStateDetailsSidebarPanel.prototype.set recording):
1271         Drive-by: clear the `DataGrid` list when changing recordings since we removed all subviews.
1272
1273 2019-02-21  Devin Rousso  <drousso@apple.com>
1274
1275         Web Inspector: DOM Debugger: node-specific event breakpoints aren't cleared/recalculated on navigation
1276         https://bugs.webkit.org/show_bug.cgi?id=194874
1277         <rdar://problem/48253415>
1278
1279         Reviewed by Joseph Pecoraro.
1280
1281         * UserInterface/Controllers/DOMManager.js:
1282         (WI.DOMManager.prototype._setDocument):
1283         (WI.DOMManager.prototype.removeBreakpointForEventListener):
1284
1285 2019-02-21  Devin Rousso  <drousso@apple.com>
1286
1287         Web Inspector: macOS user agent option should be available in device settings menu
1288         https://bugs.webkit.org/show_bug.cgi?id=194885
1289         <rdar://problem/48259253>
1290
1291         Reviewed by Joseph Pecoraro.
1292
1293         * UserInterface/Base/Main.js:
1294         (WI._handleDeviceSettingsToolbarButtonClicked):
1295
1296 2019-02-20  Joseph Pecoraro  <pecoraro@apple.com>
1297
1298         Web Inspector: RTL: Scripts Timeline loading indicator has incorrect margins
1299         https://bugs.webkit.org/show_bug.cgi?id=194882
1300
1301         Reviewed by Matt Baker.
1302
1303         * UserInterface/Views/TimelineRecordingContentView.css:
1304         (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
1305
1306 2019-02-20  Andy Estes  <aestes@apple.com>
1307
1308         [Xcode] Add SDKVariant.xcconfig to various Xcode projects
1309         https://bugs.webkit.org/show_bug.cgi?id=194869
1310
1311         Rubber-stamped by Jer Noble.
1312
1313         * WebInspectorUI.xcodeproj/project.pbxproj:
1314
1315 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
1316
1317         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
1318         https://bugs.webkit.org/show_bug.cgi?id=172848
1319         <rdar://problem/25709212>
1320
1321         Reviewed by Mark Lam.
1322
1323         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1324         (HeapSnapshot):
1325         Support the new snapshot version. The only thing that changes are the
1326         node flags, and its actually completely compatible with version 1.
1327
1328         (HeapSnapshot.updateCategoriesAndMetadata):
1329         List the count of object type instances in each class category.
1330
1331         (HeapSnapshot.prototype.serializeNode):
1332         Include whether or not the node is an object type.
1333
1334         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
1335         (WebInspector.HeapSnapshotNodeProxy):
1336         (WebInspector.HeapSnapshotNodeProxy.deserialize):
1337         Add a new Node isObjectType property based on the new data.
1338
1339         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
1340         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
1341         * UserInterface/Views/HeapSnapshotClusterContentView.js:
1342         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
1343         If a class contains 50% or more object type instances then treat it as such
1344         instead of defaulting to native.
1345
1346         * UserInterface/Views/HeapSnapshotDataGridTree.js:
1347         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1348         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1349         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
1350         We can be more specific than the default if the individual instance is
1351         known to be an object type.
1352
1353 2019-02-19  Truitt Savell  <tsavell@apple.com>
1354
1355         Unreviewed, rolling out r241784.
1356
1357         Broke all OpenSource builds.
1358
1359         Reverted changeset:
1360
1361         "Web Inspector: Improve ES6 Class instances in Heap Snapshot
1362         instances view"
1363         https://bugs.webkit.org/show_bug.cgi?id=172848
1364         https://trac.webkit.org/changeset/241784
1365
1366 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
1367
1368         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
1369         https://bugs.webkit.org/show_bug.cgi?id=172848
1370         <rdar://problem/25709212>
1371
1372         Reviewed by Mark Lam.
1373
1374         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1375         (HeapSnapshot):
1376         Support the new snapshot version. The only thing that changes are the
1377         node flags, and its actually completely compatible with version 1.
1378
1379         (HeapSnapshot.updateCategoriesAndMetadata):
1380         List the count of object type instances in each class category.
1381
1382         (HeapSnapshot.prototype.serializeNode):
1383         Include whether or not the node is an object type.
1384
1385         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
1386         (WebInspector.HeapSnapshotNodeProxy):
1387         (WebInspector.HeapSnapshotNodeProxy.deserialize):
1388         Add a new Node isObjectType property based on the new data.
1389
1390         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
1391         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
1392         * UserInterface/Views/HeapSnapshotClusterContentView.js:
1393         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
1394         If a class contains 50% or more object type instances then treat it as such
1395         instead of defaulting to native.
1396
1397         * UserInterface/Views/HeapSnapshotDataGridTree.js:
1398         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1399         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1400         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
1401         We can be more specific than the default if the individual instance is
1402         known to be an object type.
1403
1404 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
1405
1406         Web Inspector: Scripts timeline on-going-recording text looks poor in dark mode
1407         https://bugs.webkit.org/show_bug.cgi?id=194809
1408
1409         Reviewed by Matt Baker.
1410
1411         * UserInterface/Views/TimelineRecordingContentView.css:
1412         (.content-view.timeline-recording > .content-browser .recording-progress > .status):
1413
1414 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1415
1416         Web Inspector: Provide a way to avoid a recording auto-stop on reload
1417         https://bugs.webkit.org/show_bug.cgi?id=194793
1418
1419         Reviewed by Matt Baker.
1420
1421         * Localizations/en.lproj/localizedStrings.js:
1422         New tooltip.
1423
1424         * UserInterface/Controllers/TimelineManager.js:
1425         (WI.TimelineManager.prototype.willAutoStop):
1426         (WI.TimelineManager.prototype.relaxAutoStop):
1427         Getter and relaxer for auto stop behavior.
1428
1429         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1430         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
1431         Drive-by fix some whitespace issues.
1432
1433         * UserInterface/Views/TimelineTabContentView.js:
1434         (WI.TimelineTabContentView):
1435         (WI.TimelineTabContentView.prototype._showRecordButton):
1436         (WI.TimelineTabContentView.prototype._showContinueButton):
1437         (WI.TimelineTabContentView.prototype._updateNavigationBarButtons):
1438         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped):
1439         (WI.TimelineTabContentView.prototype._globalModifierKeysDidChange):
1440         (WI.TimelineTabContentView.prototype._continueButtonClicked):
1441         Show a "continue" like icon instead of the usual stop button when
1442         a recording would auto-stop and the alt key is down. When pressed
1443         this button will relax the auto-stop and continue the recording
1444         until explicitly stopped by the user.
1445
1446 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1447
1448         Web Inspector: Fix a typo causing assertions in ConsoleManager
1449         https://bugs.webkit.org/show_bug.cgi?id=194792
1450
1451         Reviewed by Matt Baker.
1452
1453         * UserInterface/Controllers/ConsoleManager.js:
1454         (WI.ConsoleManager.prototype.initializeLogChannels):
1455         Extra comma produced an undefined value in the list.
1456
1457 2019-02-18  Nikita Vasilyev  <nvasilyev@apple.com>
1458
1459         Web Inspector: Styles: typing ";" shouldn't focus on the next property when there's open parenthesis or comment
1460         https://bugs.webkit.org/show_bug.cgi?id=194789
1461
1462         Reviewed by Matt Baker.
1463
1464         * UserInterface/Views/SpreadsheetStyleProperty.js:
1465         (WI.SpreadsheetStyleProperty.prototype._handleValueBeforeInput):
1466
1467 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1468
1469         Web Inspector: Better categorize CPU usage per-thread / worker
1470         https://bugs.webkit.org/show_bug.cgi?id=194564
1471
1472         Reviewed by Devin Rousso.
1473
1474         * UserInterface/Controllers/TimelineManager.js:
1475         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
1476         * UserInterface/Models/CPUTimelineRecord.js:
1477         (WI.CPUTimelineRecord.prototype.get mainThreadUsage):
1478         (WI.CPUTimelineRecord.prototype.get webkitThreadUsage):
1479         (WI.CPUTimelineRecord.prototype.get workerThreadUsage):
1480         (WI.CPUTimelineRecord.prototype.get unknownThreadUsage):
1481         Build a better record from the protocol events.
1482
1483 2019-02-18  Devin Rousso  <drousso@apple.com>
1484
1485         Web Inspector: duplicate left double quotation mark (\u201C) in 'Unable to show certificate for ā€œ%sā€œ.'
1486         https://bugs.webkit.org/show_bug.cgi?id=194782
1487         <rdar://problem/48159683>
1488
1489         Reviewed by Joseph Pecoraro.
1490
1491         * UserInterface/Models/Resource.js:
1492         (WI.Resource.prototype.async showCertificate):
1493         * Localizations/en.lproj/localizedStrings.js:
1494
1495 2019-02-18  Eric Carlson  <eric.carlson@apple.com>
1496
1497         Add MSE logging configuration
1498         https://bugs.webkit.org/show_bug.cgi?id=194719
1499         <rdar://problem/48122151>
1500
1501         Reviewed by Joseph Pecoraro.
1502
1503         * Localizations/en.lproj/localizedStrings.js:
1504         * UserInterface/Models/ConsoleMessage.js:
1505         * UserInterface/Models/IssueMessage.js:
1506         (WI.IssueMessage):
1507         * UserInterface/Views/LogContentView.js:
1508         (WI.LogContentView):
1509         * UserInterface/Views/SettingsTabContentView.js:
1510         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1511
1512 2019-02-17  Nikita Vasilyev  <nvasilyev@apple.com>
1513
1514         Web Inspector: Move CSS completion logic from SpreadsheetTextField to SpreadsheetStyleProperty
1515         https://bugs.webkit.org/show_bug.cgi?id=194724
1516
1517         Reviewed by Devin Rousso.
1518
1519         Move CSS value completion logic from SpreadsheetTextField, a generic text field,
1520         to SpreadsheetStyleProperty.
1521
1522         * UserInterface/Views/SpreadsheetStyleProperty.js:
1523         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
1524         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1525
1526         * UserInterface/Views/SpreadsheetTextField.js:
1527         (WI.SpreadsheetTextField):
1528         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1529         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
1530         (WI.SpreadsheetTextField.prototype._updateCompletions):
1531         (WI.SpreadsheetTextField.prototype._showSuggestionsView):
1532         (WI.SpreadsheetTextField.prototype._getCompletionPrefix): Deleted.
1533
1534 2019-02-17  Matt Baker  <mattbaker@apple.com>
1535
1536         Web Inspector: Frontend performance is very slow reloading theverge.com - 50% of time in TreeOutline _indexOfTreeElement
1537         https://bugs.webkit.org/show_bug.cgi?id=193605
1538         <rdar://problem/47403986>
1539
1540         Reviewed by Devin Rousso.
1541
1542         SelectionController should track an unordered Set of represented objects
1543         instead of an ordered set of indexes. This eliminates the costly and
1544         error-prone updates needed to keep the selected indexes in sync as items
1545         are added and removed from TreeOutline (and Table, to a far lesser extent).
1546
1547         The SelectionController interface is largely the same. Class and delegate
1548         methods have been renamed to reflect the change from indexes to objects.
1549         SelectionController tracks selected items in selection order. For the
1550         operations that rely on objects being in insertion order, the controller
1551         uses a comparator function provided at construction time.
1552
1553         * UserInterface/Base/IndexSet.js: Removed.
1554         No longer used. SelectionController now uses a plain Set.
1555
1556         * UserInterface/Base/Utilities.js:
1557         (value):
1558         (get return):
1559         Add utilities previously supplied by IndexSet and used by SelectionController.
1560
1561         * UserInterface/Controllers/SelectionController.js:
1562         (WI.SelectionController):
1563         (WI.SelectionController.prototype.get lastSelectedItem):
1564         (WI.SelectionController.prototype.get selectedItems):
1565         (WI.SelectionController.prototype.set allowsMultipleSelection):
1566         (WI.SelectionController.prototype.hasSelectedItem):
1567         (WI.SelectionController.prototype.selectItem):
1568         (WI.SelectionController.prototype.deselectItem):
1569         (WI.SelectionController.prototype.selectAll):
1570         (WI.SelectionController.prototype.deselectAll):
1571         (WI.SelectionController.prototype.removeSelectedItems):
1572         (WI.SelectionController.prototype.reset):
1573         (WI.SelectionController.prototype.didRemoveItems):
1574         (WI.SelectionController.prototype.handleKeyDown):
1575         (WI.SelectionController.prototype.handleItemMouseDown):
1576         (WI.SelectionController.prototype._deselectAllAndSelect):
1577         (WI.SelectionController.prototype._selectItemsFromArrowKey):
1578         (WI.SelectionController.prototype._firstSelectableItem):
1579         (WI.SelectionController.prototype._lastSelectableItem):
1580         (WI.SelectionController.prototype._previousSelectableItem):
1581         (WI.SelectionController.prototype._nextSelectableItem):
1582         (WI.SelectionController.prototype._updateSelectedItems):
1583         (WI.SelectionController.prototype._addRange):
1584         (WI.SelectionController.prototype._deleteRange):
1585         (WI.SelectionController.prototype.get numberOfItems): Deleted.
1586         (WI.SelectionController.prototype.didInsertItem): Deleted.
1587         (WI.SelectionController.prototype.handleItemMouseDown.normalizeRange): Deleted.
1588         (WI.SelectionController.prototype._nextSelectableIndex): Deleted.
1589         (WI.SelectionController.prototype._previousSelectableIndex): Deleted.
1590
1591         * UserInterface/Main.html:
1592         * UserInterface/Test.html:
1593         Remove IndexSet.
1594
1595         * UserInterface/Views/CookieStorageContentView.js:
1596         (WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject):
1597         (WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex):
1598
1599         * UserInterface/Views/DOMTreeOutline.js:
1600         (WI.DOMTreeOutline.prototype.objectForSelection):
1601
1602         * UserInterface/Views/NetworkTableContentView.js:
1603         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
1604         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
1605
1606         * UserInterface/Views/Table.js:
1607         (WI.Table):
1608         (WI.Table.prototype.get selectedRow):
1609         (WI.Table.prototype.get selectedRows):
1610         (WI.Table.prototype.isRowSelected):
1611         (WI.Table.prototype.selectRow):
1612         (WI.Table.prototype.deselectRow):
1613         (WI.Table.prototype.removeRow):
1614         (WI.Table.prototype.removeSelectedRows):
1615         (WI.Table.prototype.selectionControllerSelectionDidChange):
1616         (WI.Table.prototype.selectionControllerFirstSelectableItem):
1617         (WI.Table.prototype.selectionControllerLastSelectableItem):
1618         (WI.Table.prototype.selectionControllerPreviousSelectableItem):
1619         (WI.Table.prototype.selectionControllerNextSelectableItem):
1620         (WI.Table.prototype._handleMouseDown):
1621         (WI.Table.prototype._removeRows):
1622         (WI.Table.prototype._indexForRepresentedObject):
1623         (WI.Table.prototype._representedObjectForIndex):
1624         (WI.Table.prototype.selectionControllerNumberOfItems): Deleted.
1625         (WI.Table.prototype.selectionControllerNextSelectableIndex): Deleted.
1626         (WI.Table.prototype.selectionControllerPreviousSelectableIndex): Deleted.
1627         (WI.Table.prototype._toggleSelectedRowStyle): Deleted.
1628
1629         * UserInterface/Views/TreeOutline.js:
1630         (WI.TreeOutline.compareSiblings):
1631         (WI.TreeOutline):
1632         (WI.TreeOutline.prototype.get selectedTreeElement):
1633         (WI.TreeOutline.prototype.set selectedTreeElement):
1634         (WI.TreeOutline.prototype.get selectedTreeElements):
1635         (WI.TreeOutline.prototype.removeChildAtIndex):
1636         (WI.TreeOutline.prototype.removeChildren):
1637         (WI.TreeOutline.prototype._rememberTreeElement):
1638         (WI.TreeOutline.prototype.getCachedTreeElement):
1639         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
1640         (WI.TreeOutline.prototype.selectionControllerFirstSelectableItem):
1641         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
1642         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
1643         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
1644         (WI.TreeOutline.prototype.objectForSelection):
1645         (WI.TreeOutline._generateStyleRulesIfNeeded):
1646         (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex): Deleted.
1647         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex): Deleted.
1648         (WI.TreeOutline._generateStyleRulesIfNeeded._indexesForSubtree.numberOfElementsInSubtree): Deleted.
1649
1650 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
1651
1652         Web Inspector: Logging a native function to the console, such as `alert`, produces unhandled rejection
1653         https://bugs.webkit.org/show_bug.cgi?id=194740
1654
1655         Reviewed by Matt Baker.
1656
1657         * UserInterface/Protocol/RemoteObject.js:
1658         (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
1659         In case of a protocol error (common when attempting to get a location
1660         for a native function) produce the NoSourceFound result.
1661
1662         * UserInterface/Views/ConsoleMessageView.js:
1663         (WI.ConsoleMessageView.prototype._appendLocationLink):
1664         Simplify with an arrow function.
1665
1666 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
1667
1668         Web Inspector: Some timelines views work, show Legacy CPU timeline
1669         https://bugs.webkit.org/show_bug.cgi?id=194738
1670
1671         Reviewed by Yusuke Suzuki.
1672
1673         * UserInterface/Views/ContentView.js:
1674         (WI.ContentView.createFromRepresentedObject):
1675
1676 2019-02-15  Aaron Chu  <aaron_chu@apple.com>
1677
1678         AX: Audit tab should have built-in accessibility tests.
1679         https://bugs.webkit.org/show_bug.cgi?id=194005
1680         <rdar://problem/47657503>
1681
1682         Updated built-in accessibility audits test suite.
1683
1684         Reviewed by Devin Rousso.
1685
1686         * Localizations/en.lproj/localizedStrings.js:
1687         * UserInterface/Controllers/AuditManager.js:
1688         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
1689         (WI.AuditManager):
1690         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.): Deleted.
1691
1692 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1693
1694         Web Inspector: Dark Mode: commas in CSS selectors are too dim
1695         https://bugs.webkit.org/show_bug.cgi?id=194729
1696         <rdar://problem/48128592>
1697
1698         Reviewed by Matt Baker.
1699
1700         Use `--text-color-tertiary` for both light and dark modes.
1701
1702         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1703         (.spreadsheet-style-declaration-editor):
1704         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1705         (.spreadsheet-css-declaration):
1706         (.spreadsheet-css-declaration .selector > span):
1707         (@media (prefers-color-scheme: dark)):
1708         * UserInterface/Views/Variables.css:
1709         (:root):
1710
1711 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1712
1713         Unreviewed, fix intentation.
1714
1715         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
1716         (.sidebar > .panel.details.css-style .rules):
1717         (.sidebar > .panel.details.css-style > .content > .rules .section-header):
1718
1719 2019-02-15  Dean Jackson  <dino@apple.com>
1720
1721         Allow emulation of user gestures from Web Inspector console
1722         https://bugs.webkit.org/show_bug.cgi?id=194725
1723         <rdar://problem/48126604>
1724
1725         Reviewed by Joseph Pecoraro and Devin Rousso.
1726
1727         Add some UI for emulating a User Gesture when evaluating in the console. This
1728         allows the developer to do things that would otherwise require actual interaction
1729         with the page, such as start playback of media on iOS.
1730
1731         * Localizations/en.lproj/localizedStrings.js:
1732         * UserInterface/Base/Setting.js: Add a new setting for this option.
1733         * UserInterface/Controllers/JavaScriptLogViewController.js:
1734         (WI.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
1735         * UserInterface/Controllers/RuntimeManager.js: Call evaluate with this new option.
1736         (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
1737         * UserInterface/Views/LogContentView.js: Add a new checkbox in the upper bar
1738         that allows the user to toggle the setting.
1739         (WI.LogContentView):
1740         (WI.LogContentView.prototype.get navigationItems):
1741         (WI.LogContentView.prototype._handleEmulateInUserGestureSettingChanged):
1742
1743         * UserInterface/Views/NetworkTableContentView.js: Two drive-by typo fixes :)
1744         (WI.NetworkTableContentView): perserve -> preserve
1745         (WI.NetworkTableContentView.prototype.get navigationItems): checkboxs -> checkboxes
1746
1747 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1748
1749         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
1750         https://bugs.webkit.org/show_bug.cgi?id=194619
1751         <rdar://problem/47917373>
1752
1753         Reviewed by Devin Rousso.
1754
1755         Payload of inline styles may contain `range` that doesn't match
1756         the actual text of the payload - it has an extra empty line at the end.
1757         Mismatching ranges caused data corruption.
1758
1759         * UserInterface/Models/DOMNodeStyles.js:
1760         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1761
1762 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1763
1764         Web Inspector: remove unused parameter in _parseStylePropertyPayload
1765         https://bugs.webkit.org/show_bug.cgi?id=194642
1766
1767         Reviewed by Devin Rousso.
1768
1769         * UserInterface/Models/DOMNodeStyles.js:
1770         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
1771         The `styleText` parameter was never used
1772
1773 2019-02-15  Devin Rousso  <drousso@apple.com>
1774
1775         Web Inspector: Canvas: all actions after an offscreen path modification are marked as offscreen path errors
1776         https://bugs.webkit.org/show_bug.cgi?id=194684
1777
1778         Reviewed by Joseph Pecoraro.
1779
1780         * UserInterface/Models/RecordingAction.js:
1781         (WI.RecordingAction.prototype.process):
1782
1783 2019-02-15  Devin Rousso  <drousso@apple.com>
1784
1785         Web Inspector: Canvas: taking a second recording doesn't select the Initial State by default
1786         https://bugs.webkit.org/show_bug.cgi?id=194685
1787
1788         Reviewed by Matt Baker.
1789
1790         * UserInterface/Views/CanvasSidebarPanel.js:
1791         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1792
1793 2019-02-14  Commit Queue  <commit-queue@webkit.org>
1794
1795         Unreviewed, rolling out r241497.
1796         https://bugs.webkit.org/show_bug.cgi?id=194676
1797
1798         New test times out (Requested by NVI on #webkit).
1799
1800         Reverted changeset:
1801
1802         "Web Inspector: Styles: valid values in style attributes are
1803         reported as unsupported property values"
1804         https://bugs.webkit.org/show_bug.cgi?id=194619
1805         https://trac.webkit.org/changeset/241497
1806
1807 2019-02-13  Nikita Vasilyev  <nvasilyev@apple.com>
1808
1809         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
1810         https://bugs.webkit.org/show_bug.cgi?id=194619
1811         <rdar://problem/47917373>
1812
1813         Reviewed by Devin Rousso.
1814
1815         Payload of inline styles may contain `range` that doesn't match
1816         the actual text of the payload - it has an extra empty line at the end.
1817         Mismatching ranges caused data corruption.
1818
1819         * UserInterface/Models/DOMNodeStyles.js:
1820         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1821
1822 2019-02-13  Joseph Pecoraro  <pecoraro@apple.com>
1823
1824         Web Inspector: Update combined and minified copyright header for 2018-2019
1825         https://bugs.webkit.org/show_bug.cgi?id=194635
1826
1827         Reviewed by Devin Rousso.
1828
1829         * Scripts/copy-user-interface-resources.pl:
1830
1831 2019-02-13  Chris Dumez  <cdumez@apple.com>
1832
1833         Unreviewed, update localizable strings.
1834
1835         * Localizations/en.lproj/localizedStrings.js:
1836
1837 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1838
1839         Web Inspector: Experimental setting for CPU Usage Timeline improvements
1840         https://bugs.webkit.org/show_bug.cgi?id=194556
1841
1842         Reviewed by Matt Baker.
1843
1844         * UserInterface/Main.html:
1845         * UserInterface/Views/LegacyCPUTimelineView.css: Added.
1846         * UserInterface/Views/LegacyCPUTimelineView.js: Added.
1847         Copy of CPUTimelineView.js/css to be used when the setting is not set.
1848
1849         * UserInterface/Views/ContentView.js:
1850         (WI.ContentView.createFromRepresentedObject):
1851         ContentView to create based on the setting.
1852
1853         * UserInterface/Base/Setting.js:
1854         * UserInterface/Views/SettingsTabContentView.js:
1855         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1856         Experimental switch.
1857
1858 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1859
1860         Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have
1861         https://bugs.webkit.org/show_bug.cgi?id=194549
1862
1863         Reviewed by Devin Rousso.
1864
1865         * UserInterface/Models/Timeline.js:
1866         (WI.Timeline.prototype.recordsInTimeRange):
1867
1868 2019-02-12  Devin Rousso  <drousso@apple.com>
1869
1870         Web Inspector: Timelines: clicking on an empty space in the overview should deselect any selected record bar
1871         https://bugs.webkit.org/show_bug.cgi?id=194365
1872         <rdar://problem/47868426>
1873
1874         Reviewed by Joseph Pecoraro.
1875
1876         * UserInterface/Views/TimelineRecordBar.js:
1877         (WI.TimelineRecordBar.prototype._handleClick):
1878         Mark the "click" event so that later listeners know it was handled by `WI.TimelineRecordBar`.
1879
1880         * UserInterface/Views/TimelineOverview.js:
1881         (WI.TimelineOverview):
1882         (WI.TimelineOverview.prototype._instrumentAdded):
1883         (WI.TimelineOverview.prototype._instrumentRemoved):
1884         (WI.TimelineOverview.prototype._handleGraphsContainerClick): Added.
1885         (WI.TimelineOverview.prototype._handleOverviewGraphRecordSelected): Added.
1886         (WI.TimelineOverview.prototype._recordSelected):
1887         Listen for "click" on the graph container and deselect all records when fired, unless the
1888         click was marked by a `WI.TimelineRecordBar`.
1889
1890         * UserInterface/Views/TimelineRecordingContentView.js:
1891         (WI.TimelineRecordingContentView.prototype._recordSelected):
1892         Ensure that all `WI.TimelineView` update their selected record whenever it changes for any
1893         other `WI.TimelineView` (or if there is no selected record).
1894
1895         * UserInterface/Views/TimelineOverviewGraph.js:
1896         (WI.TimelineOverviewGraph.prototype.didLayoutSubtree): Added.
1897         Drive-by: since `WI.TimelineRecordBar` are reused when combining, we need to re-determine
1898         which one holds the currently selected record.
1899
1900 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1901
1902         Web Inspector: Remove unused maxUsage in CPUTimelineView
1903         https://bugs.webkit.org/show_bug.cgi?id=194526
1904
1905         Reviewed by Devin Rousso.
1906
1907         * UserInterface/Views/CPUTimelineView.js:
1908         (WI.CPUTimelineView):
1909         (WI.CPUTimelineView.prototype.shown):
1910
1911 2019-02-11  Devin Rousso  <drousso@apple.com>
1912
1913         Web Inspector: add context menu items to copy a resource's HTTP request/response data
1914         https://bugs.webkit.org/show_bug.cgi?id=194261
1915         <rdar://problem/21693696>
1916
1917         Reviewed by Joseph Pecoraro.
1918
1919         * UserInterface/Models/Resource.js:
1920         (WI.Resource.prototype.stringifyHTTPRequest): Added.
1921         (WI.Resource.prototype.stringifyHTTPResponse): Added.
1922         Don't include the request/response data, as that can be very large, and can easily be
1923         accessed by actually selecting the resource in the Resources/Network tab.
1924
1925         * UserInterface/Views/ContextMenuUtilities.js:
1926         (WI.appendContextMenuItemsForSourceCode):
1927
1928         * Localizations/en.lproj/localizedStrings.js:
1929
1930 2019-02-08  Devin Rousso  <drousso@apple.com>
1931
1932         Web Inspector: Audit: show keyboard shortcut in export tooltip
1933         https://bugs.webkit.org/show_bug.cgi?id=194454
1934
1935         Reviewed by Matt Baker.
1936
1937         * UserInterface/Views/AuditTestContentView.js:
1938         (WI.AuditTestContentView):
1939         (WI.AuditTestContentView.prototype.get saveData):
1940         (WI.AuditTestContentView.prototype._exportResult): Added.
1941         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
1942         (WI.AuditTestContentView.prototype._exportAudit): Deleted.
1943
1944         * Localizations/en.lproj/localizedStrings.js:
1945
1946 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
1947
1948         Web Inspector: Styles: easier way to select a single line
1949         https://bugs.webkit.org/show_bug.cgi?id=193305
1950
1951         Reviewed by Devin Rousso.
1952
1953         Start property selection after mousedown when mouse cursor moves 8px,
1954         which is ~1.5 times the width of a text character in the style editor.
1955
1956         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1957         (WI.SpreadsheetCSSStyleDeclarationSection):
1958         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
1959         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
1960         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
1961
1962 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
1963
1964         Web Inspector: Debugger Popover should work with value in template string `${identifier}`
1965         https://bugs.webkit.org/show_bug.cgi?id=194459
1966         <rdar://problem/47932564>
1967
1968         Reviewed by Devin Rousso.
1969
1970         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
1971         (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
1972         When walking backwards to get the full expression we were walking outside
1973         of the interpolation group `outside ${inside}`. Stop walking backwards once
1974         we cross the boundary.
1975
1976 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
1977
1978         Web Inspector: Import / Export Heap Snapshots
1979         https://bugs.webkit.org/show_bug.cgi?id=194448
1980         <rdar://problem/47928093>
1981
1982         Reviewed by Devin Rousso.
1983
1984         * Localizations/en.lproj/localizedStrings.js:
1985         New strings.
1986
1987         * UserInterface/Proxies/HeapSnapshotProxy.js:
1988         (WI.HeapSnapshotProxy):
1989         (WI.HeapSnapshotProxy.deserialize):
1990         (WI.HeapSnapshotProxy.prototype.get imported):
1991         (WI.HeapSnapshotProxy.prototype.get snapshotStringData):
1992         (WI.HeapSnapshotProxy.prototype.set snapshotStringData):
1993         Include an "imported" state on the HeapSnapshot and allow for
1994         stashing the snapshotStringData on the main thread side.
1995
1996         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
1997         (WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):
1998         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
1999         (HeapSnapshotWorker.prototype.clearSnapshots):
2000         (HeapSnapshotWorker.prototype.createSnapshot):
2001         Provide a specialized way to create an imported HeapSnapshot.
2002         Track imported snapshots separately since they won't want to
2003         be searched for live/dead objects due to active recording GCs.
2004
2005         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2006         (HeapSnapshot):
2007         (HeapSnapshot.updateCategoriesAndMetadata):
2008         (HeapSnapshot.allocationBucketCounts):
2009         (HeapSnapshot.instancesWithClassName):
2010         (HeapSnapshot.prototype.nodeWithIdentifier):
2011         (HeapSnapshot.prototype.dominatedNodes):
2012         (HeapSnapshot.prototype.retainedNodes):
2013         (HeapSnapshot.prototype.retainers):
2014         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
2015         (HeapSnapshot.prototype.serialize):
2016         (HeapSnapshot.prototype.serializeNode):
2017         (HeapSnapshot.prototype._buildPostOrderIndexes):
2018         (HeapSnapshot.prototype._buildDominatorIndexes):
2019         (HeapSnapshot.prototype._buildRetainedSizes):
2020         (HeapSnapshot.prototype._gcRootPathes.visitNode):
2021         (HeapSnapshot.prototype._gcRootPathes):
2022         Construct a HeapSnapshot knowinng whether or not it is imported.
2023         Imported snapshots may be the "GCDebugging" snapshot type which
2024         differs from "Inspector" by the number of node fields. So keep
2025         the node field count a member instead of a global constant
2026         in order to work with both snapshot types.
2027
2028         * UserInterface/Models/HeapAllocationsInstrument.js:
2029         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
2030         * UserInterface/Protocol/ConsoleObserver.js:
2031         (WI.ConsoleObserver.prototype.heapSnapshot):
2032         * UserInterface/Protocol/HeapObserver.js:
2033         (WI.HeapObserver.prototype.trackingStart):
2034         (WI.HeapObserver.prototype.trackingComplete):
2035         Stash the original string JSON data on the main thread side
2036         where we already have the data.
2037
2038         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2039         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
2040         Don't show [S] icons for imported snapshots with no timestamp.
2041
2042         * UserInterface/Views/HeapAllocationsTimelineView.js:
2043         (WI.HeapAllocationsTimelineView):
2044         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
2045         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
2046         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
2047         Import button that just creates a new snapshot.
2048
2049         * UserInterface/Views/HeapSnapshotContentView.js:
2050         (WI.HeapSnapshotContentView):
2051         (WI.HeapSnapshotContentView.prototype.get navigationItems):
2052         (WI.HeapSnapshotContentView.prototype.get supportsSave):
2053         (WI.HeapSnapshotContentView.prototype.get saveData):
2054         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
2055         Export button that saves the original data.
2056
2057         * UserInterface/Views/TimelineTabContentView.js:
2058         (WI.TimelineTabContentView.displayNameForRecord):
2059         Specialized display string for imported snapshots.
2060
2061 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
2062
2063         Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
2064         https://bugs.webkit.org/show_bug.cgi?id=194445
2065
2066         Reviewed by Devin Rousso.
2067
2068         * UserInterface/Base/Setting.js:
2069         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2070         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2071         * UserInterface/Views/SettingsTabContentView.js:
2072         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
2073
2074 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
2075
2076         Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
2077         https://bugs.webkit.org/show_bug.cgi?id=182523
2078         <rdar://problem/37260209>
2079
2080         Reviewed by Devin Rousso.
2081
2082         Close CSS comments, append missing closed quotes and right parenthesis.
2083
2084         * UserInterface/Models/CSSCompletions.js:
2085         (WI.CSSCompletions.completeUnbalancedValue):
2086         * UserInterface/Models/CSSProperty.js:
2087         (WI.CSSProperty.prototype.set rawValue):
2088
2089 2019-02-07  Joseph Pecoraro  <pecoraro@apple.com>
2090
2091         Web Inspector: Make Timeline markers light gray instead of black in dark mode
2092         https://bugs.webkit.org/show_bug.cgi?id=194417
2093
2094         Reviewed by Devin Rousso.
2095
2096         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
2097         (.timeline-overview-graph.rendering-frame > .divider):
2098         * UserInterface/Views/TimelineRuler.css:
2099         (.timeline-ruler > .markers > .divider):
2100
2101 2019-02-06  Devin Rousso  <drousso@apple.com>
2102
2103         Web Inspector: DOM: don't send the entire function string with each event listener
2104         https://bugs.webkit.org/show_bug.cgi?id=194293
2105         <rdar://problem/47822809>
2106
2107         Reviewed by Joseph Pecoraro.
2108
2109         * UserInterface/Views/EventListenerSectionGroup.js:
2110         (WI.EventListenerSectionGroup.prototype._functionTextOrLink):
2111
2112 2019-02-06  Joseph Pecoraro  <pecoraro@apple.com>
2113
2114         Web Inspector: "Worker not found" uncaught protocol errors
2115         https://bugs.webkit.org/show_bug.cgi?id=194319
2116
2117         Reviewed by Matt Baker.
2118
2119         * UserInterface/Base/Main.js:
2120         (WI.terminatePageTarget):
2121         Remove Worker targets associated with the Page on navigation.
2122         Eventually we will have to associate Workers with their parent
2123         frame, but for now a transition can only happen at the Page
2124         level, so we can eliminate all workers on the page.
2125
2126         * UserInterface/Controllers/WorkerManager.js:
2127         (WI.WorkerManager.prototype.workerCreated):
2128         * UserInterface/Protocol/Connection.js:
2129         (InspectorBackend.WorkerConnection.sendMessageToBackend):
2130         Allow any WorkerAgent domain message to fail silently. This can
2131         happen if a Worker is created and destroyed before the frontend
2132         hears about it and sends messages to the backend for that Worker.
2133
2134 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
2135
2136         Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
2137         https://bugs.webkit.org/show_bug.cgi?id=194318
2138
2139         Reviewed by Devin Rousso.
2140
2141         Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
2142         old text and new text were empty strings.
2143
2144         * UserInterface/Models/CSSStyleDeclaration.js:
2145
2146 2019-02-05  Devin Rousso  <drousso@apple.com>
2147
2148         Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
2149         https://bugs.webkit.org/show_bug.cgi?id=159577
2150         <rdar://problem/27251461>
2151
2152         Reviewed by Joseph Pecoraro.
2153
2154         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2155         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
2156         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
2157
2158 2019-02-05  Matt Baker  <mattbaker@apple.com>
2159
2160         Web Inspector: Elements tab: selection is broken after deleting the selected node
2161         https://bugs.webkit.org/show_bug.cgi?id=194300
2162         <rdar://problem/47829275>
2163
2164         Reviewed by Devin Rousso.
2165
2166         Deleting a TreeElement can cause an IndexSet including indexes
2167         outside the deleted range to be passed to SelectionController,
2168         corrupting the internal selection state.
2169
2170         * UserInterface/Views/TreeOutline.js:
2171         (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
2172         (WI.TreeOutline.prototype._indexesForSubtree):
2173         Finding the last (rightmost leaf) TreeElement in the subtree used
2174         TreeElement.prototype.traverseNextElement to do a depth first traversal.
2175         This method did not stay within the subtree rooted at `treeElement`.
2176
2177 2019-02-05  Matt Baker  <mattbaker@apple.com>
2178
2179         Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
2180         https://bugs.webkit.org/show_bug.cgi?id=194254
2181         <rdar://problem/47805023>
2182
2183         Reviewed by Devin Rousso.
2184
2185         * UserInterface/Views/TreeOutline.js:
2186         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2187         TreeOutline should always call the TreeElement `select` and `deselect`
2188         methods while processing selection changes. Having notifications
2189         suppressed by `this._suppressNextSelectionDidChangeEvent` should only
2190         affect the dispatching of TreeOutline events.
2191
2192 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
2193
2194         Web Inspector: Styles: remove harmless "property was unlocked" asserts
2195         https://bugs.webkit.org/show_bug.cgi?id=194262
2196
2197         Reviewed by Matt Baker.
2198
2199         * UserInterface/Views/SpreadsheetStyleProperty.js:
2200         (WI.SpreadsheetStyleProperty.prototype.remove):
2201         (WI.SpreadsheetStyleProperty.prototype.update):
2202         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
2203         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
2204
2205 2019-02-04  Devin Rousso  <drousso@apple.com>
2206
2207         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
2208         https://bugs.webkit.org/show_bug.cgi?id=194280
2209         <rdar://problem/47811159>
2210
2211         Reviewed by Matt Baker.
2212
2213         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2214         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
2215         Add a fallback value in case the `class` attribute isn't specified for the selected node.
2216
2217 2019-02-04  Devin Rousso  <drousso@apple.com>
2218
2219         Web Inspector: Resources: missing resource data for document on reload
2220         https://bugs.webkit.org/show_bug.cgi?id=194243
2221         <rdar://problem/47559021>
2222
2223         Reviewed by Joseph Pecoraro.
2224
2225         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2226         (WI.ResourceDetailsSidebarPanel.prototype.set resource):
2227         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
2228
2229         * UserInterface/Base/Object.js:
2230         (WI.Object.removeEventListener):
2231         Drive-by: there's no need to iterate over the entire table to check if `thisObject` exists,
2232         as that is handled for us by `ListMultimap`, which we later call anyways.
2233
2234 2019-02-04  Matt Baker  <mattbaker@apple.com>
2235
2236         Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
2237         https://bugs.webkit.org/show_bug.cgi?id=194242
2238         <rdar://problem/47802027>
2239
2240         Reviewed by Joseph Pecoraro.
2241
2242         * UserInterface/Views/FolderizedTreeElement.js:
2243         (WI.FolderizedTreeElement.prototype.removeChildren):
2244         FolderTreeElements are removed by the base class call to removeChildren.
2245         Calling `removeChildren` for detached TreeElements is unnecessary.
2246
2247 2019-02-04  Matt Baker  <mattbaker@apple.com>
2248
2249         Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
2250         https://bugs.webkit.org/show_bug.cgi?id=194169
2251         <rdar://problem/47743864>
2252
2253         Reviewed by Devin Rousso.
2254
2255         * UserInterface/Views/TreeOutline.js:
2256         (WI.TreeOutline.prototype._handleMouseDown):
2257         Add a special case for a single-selection TreeOutline with
2258         allowsRepeatSelection enabled. Since the element is already
2259         selected, bypass the SelectionCongroller and dispatch an
2260         event with event.data.selectedByUser set to true.
2261
2262 2019-02-04  Nikita Vasilyev  <nvasilyev@apple.com>
2263
2264         Web Inspector: Styles: fix race conditions when editing
2265         https://bugs.webkit.org/show_bug.cgi?id=192739
2266         <rdar://problem/46752925>
2267
2268         Reviewed by Devin Rousso.
2269
2270         Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
2271         and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
2272         on the backend, CSSStyleDeclaration (on the front-end) gets updated.
2273
2274         Unsure there's no race conditions by introducing `_updatesInProgressCount`:
2275
2276           - Increment it before calling CSSAgent.setStyleText.
2277           - Decrement it after CSSAgent.setStyleText is finished.
2278
2279         Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.
2280
2281         * UserInterface/Models/CSSProperty.js:
2282         (WI.CSSProperty.prototype._updateOwnerStyleText):
2283         * UserInterface/Models/CSSStyleDeclaration.js:
2284         (WI.CSSStyleDeclaration):
2285         (WI.CSSStyleDeclaration.prototype.set text): Removed.
2286         (WI.CSSStyleDeclaration.prototype.setText): Added.
2287         Change the setter to a method since it has side effects including an asynchronous backend call.
2288
2289         * UserInterface/Models/DOMNodeStyles.js:
2290         (WI.DOMNodeStyles.prototype.changeStyleText):
2291
2292         * UserInterface/Views/SpreadsheetStyleProperty.js:
2293         (WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed.
2294         (WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed.
2295         Drive-by: remove unused code.
2296
2297 2019-02-01  Devin Rousso  <drousso@apple.com>
2298
2299         Web Inspector: create icons for media event types instead of using a blue circle
2300         https://bugs.webkit.org/show_bug.cgi?id=190381
2301         <rdar://problem/45507995>
2302
2303         Reviewed by Brian Burg.
2304
2305         * UserInterface/Models/DOMNode.js:
2306         (WI.DOMNode.isPlayEvent): Added.
2307         (WI.DOMNode.isPauseEvent): Added.
2308         (WI.DOMNode.isStopEvent): Added.
2309
2310         * UserInterface/Views/DOMEventsBreakdownView.js:
2311         (WI.DOMEventsBreakdownView.prototype.layout):
2312         * UserInterface/Views/DOMEventsBreakdownView.css:
2313         (.dom-events-breakdown tr > :matches(th, td)):
2314         (.dom-events-breakdown .graph):
2315         (.dom-events-breakdown .graph > :matches(img, .area)): Added.
2316         (.dom-events-breakdown .graph > img): Added.
2317         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > img): Added.
2318         (.dom-events-breakdown .graph > :matches(.point, .area)): Deleted.
2319         (.dom-events-breakdown .graph > .point): Deleted.
2320         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Deleted.
2321
2322         * UserInterface/Views/NetworkTableContentView.js:
2323         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
2324
2325         * UserInterface/Images/EventPause.svg: Added.
2326         * UserInterface/Images/EventPlay.svg: Added.
2327         * UserInterface/Images/EventProcessing.svg: Added.
2328         * UserInterface/Images/EventStop.svg: Added.
2329
2330 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2331
2332         Web Inspector: Make WI.ColumnChart a WI.View subclass
2333         https://bugs.webkit.org/show_bug.cgi?id=194171
2334
2335         Rubber-stamped by Devin Rousso.
2336
2337         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2338         (WI.CPUTimelineOverviewGraph):
2339         * UserInterface/Views/ColumnChart.js:
2340         (WI.ColumnChart):
2341         (WI.ColumnChart.prototype.set size):
2342         (WI.ColumnChart.prototype.layout):
2343         (WI.ColumnChart.prototype.get element): Deleted.
2344         (WI.ColumnChart.prototype.needsLayout): Deleted.
2345         (WI.ColumnChart.prototype.updateLayout): Deleted.
2346
2347 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2348
2349         Web Inspector: Make WI.StackedLineChart a WI.View subclass
2350         https://bugs.webkit.org/show_bug.cgi?id=194119
2351
2352         Rubber-stamped by Devin Rousso.
2353
2354         * UserInterface/Views/LineChart.js:
2355         (WI.LineChart.prototype.layout):
2356         (WI.LineChart):
2357         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2358         (WI.MemoryTimelineOverviewGraph):
2359         * UserInterface/Views/StackedLineChart.js:
2360         (WI.StackedLineChart):
2361         (WI.StackedLineChart.prototype.set size):
2362         (WI.StackedLineChart.prototype.layout):
2363         (WI.StackedLineChart.prototype.get element): Deleted.
2364         (WI.StackedLineChart.prototype.get points): Deleted.
2365         (WI.StackedLineChart.prototype.needsLayout): Deleted.
2366         (WI.StackedLineChart.prototype.updateLayout): Deleted.
2367
2368 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2369
2370         Web Inspector: Make WI.CircleChart a WI.View subclass
2371         https://bugs.webkit.org/show_bug.cgi?id=194118
2372
2373         Reviewed by Matt Baker.
2374
2375         * UserInterface/Views/CircleChart.js:
2376         (WI.CircleChart.prototype.get centerElement):
2377         (WI.CircleChart.prototype.layout):
2378         (WI.CircleChart.prototype.get element): Deleted.
2379         (WI.CircleChart.prototype.needsLayout): Deleted.
2380         (WI.CircleChart.prototype.updateLayout): Deleted.
2381         * UserInterface/Views/MemoryTimelineView.js:
2382         (WI.MemoryTimelineView):
2383
2384 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2385
2386         Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
2387         https://bugs.webkit.org/show_bug.cgi?id=194115
2388         <rdar://problem/47716693>
2389
2390         Rubber-stamped by Devin Rousso.
2391
2392         * UserInterface/Views/CPUTimelineView.js:
2393         (WI.CPUTimelineView.prototype.reset):
2394         (WI.CPUTimelineView.prototype.clear):
2395         (WI.CPUTimelineView.prototype.layout):
2396         * UserInterface/Views/MemoryTimelineView.js:
2397         (WI.MemoryTimelineView.prototype.reset):
2398         (WI.MemoryTimelineView.prototype.clear):
2399         (WI.MemoryTimelineView.prototype.layout):
2400         When there are no visible records in the selected range clear our UI.
2401         Introduce a `clear` method that clears the UI but keeps
2402         non-range-specific values (e.g. maximums).
2403
2404 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2405
2406         Web Inspector: Timeline graphs have drawing issues with multiple discontinuities
2407         https://bugs.webkit.org/show_bug.cgi?id=194110
2408         <rdar://problem/47714356>
2409
2410         Reviewed by Devin Rousso.
2411
2412         * UserInterface/Views/CPUTimelineView.js:
2413         (WI.CPUTimelineView):
2414         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
2415         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2416         (WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
2417         (WI.MemoryTimelineOverviewGraph.prototype.layout):
2418         * UserInterface/Views/MemoryTimelineView.js:
2419         (WI.MemoryTimelineView.prototype.layout.xScale):
2420         (WI.MemoryTimelineView.prototype.layout.yScale):
2421         (WI.MemoryTimelineView.prototype.layout):
2422         Handle if multiple discontinuities exist between records.
2423
2424 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2425
2426         Web Inspector: Timeline time range selection should show duration alongside start and end
2427         https://bugs.webkit.org/show_bug.cgi?id=194109
2428         <rdar://problem/47714279>
2429
2430         Reviewed by Devin Rousso.
2431
2432         * Localizations/en.lproj/localizedStrings.js:
2433         * UserInterface/Views/TimelineRecordingContentView.js:
2434         (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
2435         Include the duration when not obvious.
2436
2437 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2438
2439         Web Inspector: Improve API and documentation of ColumnChart
2440         https://bugs.webkit.org/show_bug.cgi?id=193982
2441
2442         Reviewed by Devin Rousso.
2443
2444         This used to be named "BarChart". Convert remaining instances
2445         of "bar" to "column" and clean up related things.
2446
2447         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2448         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart):
2449         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
2450         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart): Deleted.
2451         (.timeline-overview-graph.cpu > .bar-chart > svg > rect): Deleted.
2452         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2453         (WI.CPUTimelineOverviewGraph.prototype.layout):
2454         * UserInterface/Views/ColumnChart.js:
2455         (WI.ColumnChart):
2456         (WI.ColumnChart.prototype.get columns):
2457         (WI.ColumnChart.prototype.addColumn):
2458         (WI.ColumnChart.prototype.clear):
2459         (WI.ColumnChart.prototype.updateLayout):
2460         (WI.ColumnChart.prototype.get bars): Deleted.
2461         (WI.ColumnChart.prototype.addBar): Deleted.
2462         * UserInterface/Views/StackedLineChart.js:
2463         (WI.StackedLineChart.prototype.get element):
2464         (WI.StackedLineChart.prototype.get points):
2465
2466 2019-01-31  Joseph Pecoraro  <pecoraro@apple.com>
2467
2468         Web Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
2469         https://bugs.webkit.org/show_bug.cgi?id=194108
2470         <rdar://problem/47714273>
2471
2472         Reviewed by Devin Rousso.
2473
2474         * UserInterface/Base/Utilities.js:
2475         Check under epsilon for the zero case.
2476
2477 2019-01-31  Matt Baker  <mattbaker@apple.com>
2478
2479         REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
2480         https://bugs.webkit.org/show_bug.cgi?id=192652
2481         <rdar://problem/46684612>
2482
2483         Reviewed by Devin Rousso.
2484
2485         * UserInterface/Views/DOMTreeElement.js:
2486         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
2487         Call to Event.preventDefault() should be made here instead of at the
2488         TreeOutline level.
2489
2490         * UserInterface/Views/TreeElement.js:
2491         (WI.TreeElement.prototype.selectOnMouseDown): Deleted.
2492         Remove dead code.
2493
2494         * UserInterface/Views/TreeOutline.js:
2495         (WI.TreeOutline._handleMouseDown):
2496         Do not prevent default event handling when the item cannot be selected.
2497         This matches TreeOutline behavior prior to introducing SelectionController.
2498
2499 2019-01-30  Devin Rousso  <drousso@apple.com>
2500
2501         Web Inspector: Memory Timeline View should be responsive / resizable
2502         https://bugs.webkit.org/show_bug.cgi?id=153758
2503         <rdar://problem/24444320>
2504
2505         Reviewed by Joseph Pecoraro.
2506
2507         Leverage the SVG `viewBox` (which was misspelled) to scale the graphs when the width of the
2508         container changes. The `viewBox` used is equal to the total amount of time that is visible.
2509
2510         Make `WI.LineChart` (and its container classes) into subclasses of `WI.View` to leverage the
2511         existing layout system.
2512
2513         Prevent any work from being done when resizing, as this is now handled by CSS/SVG.
2514
2515         * UserInterface/Views/LineChart.js:
2516         (WI.LineChart):
2517         (WI.LineChart.prototype.set size):
2518         (WI.LineChart.prototype.addPoint):
2519         (WI.LineChart.prototype.clear):
2520         (WI.LineChart.prototype.layout):
2521         (WI.LineChart.prototype.get element): Deleted.
2522         (WI.LineChart.prototype.get points): Deleted.
2523         (WI.LineChart.prototype.needsLayout): Deleted.
2524         (WI.LineChart.prototype.updateLayout): Deleted.
2525
2526         * UserInterface/Views/CPUUsageView.js:
2527         (WI.CPUUsageView):
2528         (WI.CPUUsageView.prototype.clear):
2529         (WI.CPUUsageView.prototype.updateChart): Added.
2530         (WI.CPUUsageView.prototype.get element): Deleted.
2531         (WI.CPUUsageView.prototype.layoutWithDataPoints): Deleted.
2532         * UserInterface/Views/CPUUsageView.css:
2533         (.cpu-usage-view):
2534         (.cpu-usage-view > .details):
2535         (.cpu-usage-view > .graph, .cpu-usage-view > .graph > .line-chart, .cpu-usage-view > .graph > .line-chart > svg): Added.
2536         (.cpu-usage-view > .graph): Deleted.
2537
2538         * UserInterface/Views/CPUTimelineView.js:
2539         (WI.CPUTimelineView):
2540         (WI.CPUTimelineView.prototype.layout):
2541         (WI.CPUTimelineView.prototype.layout.layoutView):
2542         (WI.CPUTimelineView.prototype.layout.layoutView.xScale):
2543         (WI.CPUTimelineView.prototype.layout.layoutView.yScale):
2544         * UserInterface/Views/CPUTimelineView.css:
2545         (body .timeline-view.cpu): Added.
2546         (.timeline-view.cpu > .content):
2547         (.timeline-view.cpu): Deleted.
2548
2549         * UserInterface/Views/MemoryCategoryView.js:
2550         (WI.MemoryCategoryView):
2551         (WI.MemoryCategoryView.prototype.clear):
2552         (WI.MemoryCategoryView.prototype.updateChart): Added.
2553         (WI.MemoryCategoryView.prototype.get element): Deleted.
2554         (WI.MemoryCategoryView.prototype.layoutWithDataPoints): Deleted.
2555         * UserInterface/Views/MemoryCategoryView.css:
2556         (.memory-category-view):
2557         (.memory-category-view > .details):
2558         (.memory-category-view > .graph, .memory-category-view > .graph > .line-chart, .memory-category-view > .graph > .line-chart > svg): Added.
2559         (.memory-category-view > .graph): Deleted.
2560
2561         * UserInterface/Views/MemoryTimelineView.js:
2562         (WI.MemoryTimelineView.prototype.layout):
2563         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView):
2564         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.xScale):
2565         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.yScale):
2566         (WI.MemoryTimelineView.prototype._initializeCategoryViews):
2567         (WI.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
2568         * UserInterface/Views/MemoryTimelineView.css:
2569         (.timeline-view.memory > .content > .overview):
2570         (.timeline-view.memory > .content > .overview > .divider):
2571         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage, .timeline-view.memory > .content > .overview .legend .size): Added.
2572         (.timeline-view.memory .legend):
2573         (.timeline-view.memory .legend .row): Added.
2574         (.timeline-view.memory .legend .row + .row): Added.
2575         (.timeline-view.memory .legend .swatch): Addd.
2576         (.timeline-view.memory .legend .swatch.javascript): Addd.
2577         (.timeline-view.memory .legend .swatch.images): Addd.
2578         (.timeline-view.memory .legend .swatch.layers): Addd.
2579         (.timeline-view.memory .legend .swatch.page): Addd.
2580         (.timeline-view.memory .legend .swatch.current): Addd.
2581         (.timeline-view.memory > .content): Deleted.
2582         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage):
2583         (body[dir=ltr] .timeline-view.memory .legend): Deleted.
2584         (body[dir=rtl] .timeline-view.memory .legend): Deleted.
2585         (.timeline-view.memory .legend > .row): Deleted.
2586         (.timeline-view.memory .legend > .row > .swatch): Deleted.
2587         (body[dir=ltr] .timeline-view.memory .legend > .row > .swatch): Deleted.
2588         (body[dir=rtl] .timeline-view.memory .legend > .row > .swatch): Deleted.
2589         (.timeline-view.memory .legend > .row > p): Deleted.
2590         (body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
2591         (body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
2592         (.timeline-view.memory .legend > .row > .label): Deleted.
2593         (.timeline-view.memory .legend > .row > .size): Deleted.
2594         (.timeline-view.memory .legend > .row > .swatch.javascript): Deleted.
2595         (.timeline-view.memory .legend > .row > .swatch.images): Deleted.
2596         (.timeline-view.memory .legend > .row > .swatch.layers): Deleted.
2597         (.timeline-view.memory .legend > .row > .swatch.page): Deleted.
2598         (.timeline-view.memory .legend > .row > .swatch.current): Deleted.
2599
2600 2019-01-30  Nikita Vasilyev  <nvasilyev@apple.com>
2601
2602         Web Inspector: Changes: group CSS rules by resource
2603         https://bugs.webkit.org/show_bug.cgi?id=193940
2604         <rdar://problem/47617785>
2605
2606         Reviewed by Matt Baker.
2607
2608         Create resource sections with source links in their headers.
2609
2610         Also:
2611         - Use read-only WI.SpreadsheetStyleProperty to display inline swatches for colors;
2612         - Make the red and green background span the entire width of the panel.
2613
2614         * Localizations/en.lproj/localizedStrings.js:
2615         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
2616         (.sidebar > .panel.changes-panel):
2617         (.sidebar > .panel.changes-panel .css-rule):
2618         (.sidebar > .panel.selected.changes-panel.empty):
2619         (.changes-panel .resource-section):
2620         (.changes-panel .resource-section > .header):
2621         (.changes-panel .resource-section > .header > a:hover):
2622         (.sidebar > .panel.changes-panel .selector-line,):
2623         (.changes-panel .css-property-line > .property):
2624         (.changes-panel .css-property-line.unchanged):
2625         (.changes-panel .css-property-line.added):
2626         (.changes-panel .css-property-line.removed):
2627         (.changes-panel .css-property-line.removed::before):
2628         (.changes-panel .css-property-line.added::before):
2629         (@media (prefers-color-scheme: dark)):
2630
2631         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
2632         (WI.ChangesDetailsSidebarPanel.prototype.layout):
2633         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
2634         (WI.ChangesDetailsSidebarPanel.prototype._createLocationLink):
2635
2636         * UserInterface/Views/SpreadsheetStyleProperty.js:
2637         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2638         Allow passing `null` as a delegate.
2639
2640 2019-01-30  Devin Rousso  <drousso@apple.com>
2641
2642         Web Inspector: change style of device settings override popover content
2643         https://bugs.webkit.org/show_bug.cgi?id=194049
2644
2645         Reviewed by Joseph Pecoraro.
2646
2647         * UserInterface/Base/Main.js:
2648         (WI._handleDeviceSettingsToolbarButtonClicked):
2649         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
2650         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer): Deleted.
2651         * UserInterface/Views/Main.css:
2652         (.device-settings-content):
2653         (.device-settings-content > tr > td:first-child): Added.
2654         (.device-settings-content .container):
2655         (.device-settings-content .container > * + *): Added.
2656         (.device-settings-content .column): Added.
2657         (.device-settings-content .user-agent select): Added.
2658         (.device-settings-content .user-agent input): Added.
2659         (.device-settings-content label + label): Added.
2660         (.device-settings-content label > input): Added.
2661         (.device-settings-content .columns): Deleted.
2662         (.device-settings-content .columns > .column): Deleted.
2663         (.device-settings-content .columns > .column + .column): Deleted.
2664         (.device-settings-content .user-agent-value): Deleted.
2665         (.device-settings-content .user-agent-value > select): Deleted.
2666         (.device-settings-content .user-agent-value > input): Deleted.
2667         (body[dir=ltr] .device-settings-content .user-agent-value > input): Deleted.
2668         (body[dir=rtl] .device-settings-content .user-agent-value > input): Deleted.
2669
2670 2019-01-30  Devin Rousso  <drousso@apple.com>
2671
2672         Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
2673         https://bugs.webkit.org/show_bug.cgi?id=194029
2674
2675         Reviewed by Matt Baker.
2676
2677         * UserInterface/Views/ConsoleMessageView.js:
2678         (WI.ConsoleMessageView.prototype._appendLocationLink):
2679
2680 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
2681
2682         Web Inspector: Enabled Changes panel in Elements tab by default
2683         https://bugs.webkit.org/show_bug.cgi?id=193986
2684         <rdar://problem/47647683>
2685
2686         Reviewed by Matt Baker.
2687
2688         * UserInterface/Base/Setting.js:
2689         * UserInterface/Views/ElementsTabContentView.js:
2690         (WI.ElementsTabContentView):
2691         * UserInterface/Views/SettingsTabContentView.js:
2692         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2693
2694 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
2695
2696         Web Inspector: Styles: enable computed style cascades by default
2697         https://bugs.webkit.org/show_bug.cgi?id=193983
2698         <rdar://problem/47645821>
2699
2700         Reviewed by Matt Baker.
2701
2702         * Localizations/en.lproj/localizedStrings.js:
2703         * UserInterface/Base/Setting.js:
2704         * UserInterface/Views/ComputedStyleDetailsPanel.css:
2705         (.computed-style-properties):
2706         (.computed-style-properties .property .go-to-arrow):
2707         (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
2708         (.details-section.computed-style-properties > .content):
2709         (@media (prefers-color-scheme: dark)):
2710         (.computed-with-traces .computed-style-properties): Deleted.
2711         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
2712         (.computed-with-traces .details-section.computed-style-properties > .content): Deleted.
2713         (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted.
2714         * UserInterface/Views/ComputedStyleDetailsPanel.js:
2715         (WI.ComputedStyleDetailsPanel.prototype.refresh):
2716         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
2717         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
2718         (WI.ComputedStyleDetailsSidebarPanel):
2719         * UserInterface/Views/SettingsTabContentView.js:
2720         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2721
2722 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
2723
2724         Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
2725         https://bugs.webkit.org/show_bug.cgi?id=193921
2726
2727         Reviewed by Devin Rousso.
2728
2729         * UserInterface/Base/Utilities.js:
2730         * UserInterface/Debug/UncaughtExceptionReporter.js:
2731         * UserInterface/Views/NetworkTableContentView.js:
2732         (WI.NetworkTableContentView.prototype._exportHAR):
2733         * UserInterface/Views/TextEditor.js:
2734         (WI.TextEditor.prototype.updateFormattedState):
2735
2736 2019-01-28  Devin Rousso  <drousso@apple.com>
2737
2738         Web Inspector: provide a way to edit page WebRTC settings on a remote target
2739         https://bugs.webkit.org/show_bug.cgi?id=193863
2740         <rdar://problem/47572764>
2741
2742         Reviewed by Joseph Pecoraro.
2743
2744         * UserInterface/Base/Main.js:
2745         (WI.loaded):
2746         (WI.initializeTarget):
2747         (WI._handleDeviceSettingsToolbarButtonClicked):
2748         (WI._handleDeviceSettingsToolbarButtonClicked.createCheckbox):
2749         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns): Deleted.
2750         * UserInterface/Views/Main.css:
2751         (.device-settings-content .container): Added.
2752
2753         * Localizations/en.lproj/localizedStrings.js:
2754
2755 2019-01-28  Matt Baker  <mattbaker@apple.com>
2756
2757         Web Inspector: Elements tab should toggle visibility for all selected nodes
2758         https://bugs.webkit.org/show_bug.cgi?id=193089
2759         <rdar://problem/47009256>
2760
2761         Reviewed by Devin Rousso.
2762
2763         Update "Toggle Visibility" command in DOM tree for multiple selection.
2764         When both visible and hidden elements are selected in the DOM tree,
2765         the toggle command behaves contextually. If one or more elements are
2766         visible, they are hidden, otherwise they are shown. The context menu
2767         shows "Hide Elements" or "Show Elements", respectively.
2768
2769         When only one element is selected, or the context menu target element
2770         is not selected, the command continues to be "Toggle Visibility".
2771
2772         * Localizations/en.lproj/localizedStrings.js:
2773
2774         * UserInterface/Views/DOMTreeElement.js:
2775         (WI.DOMTreeElement.prototype.get isNodeHidden): Added.
2776         (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
2777         (WI.DOMTreeElement.prototype.toggleElementVisibility):
2778         (WI.DOMTreeElement.prototype._populateTagContextMenu):
2779
2780         * UserInterface/Views/DOMTreeOutline.js:
2781         (WI.DOMTreeOutline):
2782         (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility):  Added.
2783         Provide a public method for toggling the visibility of selected DOM nodes.
2784         Used by the "H" keyboard shortcut and DOMTreeElement context menu.
2785
2786         (WI.DOMTreeOutline.prototype._hideElements):
2787         (WI.DOMTreeOutline.prototype._hideElement): Deleted.
2788         Rename for multiple selection.
2789
2790 2019-01-28  Commit Queue  <commit-queue@webkit.org>
2791
2792         Unreviewed, rolling out r240351.
2793         https://bugs.webkit.org/show_bug.cgi?id=193918
2794
2795         Causes overlapping Timeline records, as some record types
2796         don't have an endTime (Requested by drousso on #webkit).
2797
2798         Reverted changeset:
2799
2800         "WebInspector: Confusingly nested events in the timeline for
2801         Mutation Observers"
2802         https://bugs.webkit.org/show_bug.cgi?id=192884
2803         https://trac.webkit.org/changeset/240351
2804
2805 2019-01-28  Matt Baker  <mattbaker@apple.com>
2806
2807         REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
2808         https://bugs.webkit.org/show_bug.cgi?id=193808
2809         <rdar://problem/47537734>
2810
2811         Reviewed by Devin Rousso.
2812
2813         * UserInterface/Controllers/SelectionController.js:
2814         (WI.SelectionController.prototype.didRemoveItems):
2815
2816         * UserInterface/Views/TreeOutline.js:
2817         (WI.TreeOutline.prototype._indexesForSubtree):
2818         Fix a bug where no IndexSet was returned when passed a TreeElement with
2819         no children. This caused the Timelines tree selection to be corrupted when
2820         entering and exiting edit mode, as TreeElements are inserted and removed.
2821
2822 2019-01-28  Nikita Vasilyev  <nvasilyev@apple.com>
2823
2824         Web Inspector: Add Changes panel to Elements tab
2825         https://bugs.webkit.org/show_bug.cgi?id=193803
2826
2827         Reviewed by Devin Rousso.
2828
2829         Introduce the new experimental Changes Panel. It shows a list of CSS changes
2830         made via Web Inspector, so the changes could be copied to the source files.
2831
2832         * Localizations/en.lproj/localizedStrings.js:
2833         * UserInterface/Base/Setting.js:
2834         * UserInterface/Base/Utilities.js:
2835         (Array.diffArrays): Added.
2836
2837         * UserInterface/Controllers/CSSManager.js:
2838         (WI.CSSManager):
2839         (WI.CSSManager.prototype.get modifiedCSSRules):
2840         (WI.CSSManager.prototype.addModifiedCSSRule):
2841         (WI.CSSManager.prototype.removeModifiedCSSRule):
2842         (WI.CSSManager.prototype._mainResourceDidChange):
2843
2844         * UserInterface/Main.html:
2845         * UserInterface/Models/CSSProperty.js:
2846         (WI.CSSProperty):
2847         (WI.CSSProperty.prototype.remove):
2848         (WI.CSSProperty.prototype.replaceWithText):
2849         (WI.CSSProperty.prototype.commentOut):
2850         (WI.CSSProperty.prototype.set text):
2851         (WI.CSSProperty.prototype.get modified):
2852         (WI.CSSProperty.prototype.set name):
2853         (WI.CSSProperty.prototype.set rawValue):
2854         (WI.CSSProperty.prototype.get initialState):
2855         (WI.CSSProperty.prototype._updateOwnerStyleText):
2856         (WI.CSSProperty.prototype._markModified):
2857         Mark CSSProperty modified *before* making any changes to copy its initial state.
2858
2859         * UserInterface/Models/CSSRule.js:
2860         (WI.CSSRule):
2861         (WI.CSSRule.prototype.get id):
2862         (WI.CSSRule.prototype.get initialState):
2863         (WI.CSSRule.prototype.get stringId):
2864         (WI.CSSRule.prototype.markModified):
2865
2866         * UserInterface/Models/CSSStyleDeclaration.js:
2867         (WI.CSSStyleDeclaration):
2868         (WI.CSSStyleDeclaration.prototype.get initialState):
2869         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
2870         (WI.CSSStyleDeclaration.prototype.get properties):
2871         (WI.CSSStyleDeclaration.prototype.set properties):
2872         (WI.CSSStyleDeclaration.prototype.propertyForName):
2873         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
2874         (WI.CSSStyleDeclaration.prototype.markModified):
2875
2876         * UserInterface/Views/ChangesDetailsSidebarPanel.css: Added.
2877         (.sidebar > .panel.changes-panel):
2878         (.sidebar > .panel.changes-panel:not(.empty)):
2879         (.sidebar > .panel.changes-panel.empty):
2880         (.changes-panel ins):
2881         (.changes-panel del):
2882         (.changes-panel del.css-property::before):
2883         (.changes-panel ins.css-property::before):
2884         (@media (prefers-color-scheme: dark)):
2885
2886         * UserInterface/Views/ChangesDetailsSidebarPanel.js: Added.
2887         (WI.ChangesDetailsSidebarPanel):
2888         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
2889         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
2890         (WI.ChangesDetailsSidebarPanel.prototype.shown):
2891         (WI.ChangesDetailsSidebarPanel.prototype.detached):
2892         (WI.ChangesDetailsSidebarPanel.prototype.layout):
2893         (WI.ChangesDetailsSidebarPanel.prototype._mainResourceDidChange):
2894
2895         * UserInterface/Views/ElementsTabContentView.js:
2896         (WI.ElementsTabContentView):
2897
2898         * UserInterface/Views/SettingsTabContentView.js:
2899         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2900
2901         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2902         (.spreadsheet-style-declaration-editor .property):
2903         (.spreadsheet-style-declaration-editor .property.modified):
2904         (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
2905         (@media (prefers-color-scheme: dark)):
2906
2907         * UserInterface/Views/SpreadsheetStyleProperty.js:
2908         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
2909
2910 2019-01-26  Devin Rousso  <drousso@apple.com>
2911
2912         Web Inspector: handle CSS Color 4 color syntaxes
2913         https://bugs.webkit.org/show_bug.cgi?id=193166
2914         <rdar://problem/47062403>
2915
2916         Reviewed by Simon Fraser.
2917
2918         * UserInterface/Models/Color.js:
2919         (WI.Color.fromString):
2920         (WI.Color.fromString.splitFunctionString): Added.
2921         (WI.Color.fromString.parseFunctionAlpha): Added.
2922         (WI.Color.fromString.parseFunctionComponent): Added.
2923         (WI.Color.fromString.parseHueComponent): Added.
2924         (WI.Color.fromString.parsePercentageComponent): Added.
2925
2926 2019-01-26  Devin Rousso  <drousso@apple.com>
2927
2928         Web Inspector: provide a way to edit the user agent of a remote target
2929         https://bugs.webkit.org/show_bug.cgi?id=193862
2930         <rdar://problem/47359292>
2931
2932         Reviewed by Joseph Pecoraro.
2933
2934         * UserInterface/Base/Main.js:
2935         (WI.loaded):
2936         (WI.contentLoaded):
2937         (WI.initializeTarget):
2938         (WI._handleDeviceSettingsToolbarButtonClicked):
2939         (WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
2940         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
2941         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
2942         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
2943         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
2944         (WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
2945         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
2946
2947         * UserInterface/Views/Main.css:
2948         (.device-settings-content):
2949         (.device-settings-content .user-agent-value): Added.
2950         (.device-settings-content .user-agent-value > select): Added.
2951         (.device-settings-content .user-agent-value > input): Added.
2952         (body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
2953         (body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
2954         (.device-settings-content label > input): Added.
2955         (body[dir=ltr] .device-settings-content label > input): Deleted.
2956         (body[dir=rtl] .device-settings-content label > input): Deleted.
2957
2958         * Localizations/en.lproj/localizedStrings.js:
2959
2960 2019-01-25  Devin Rousso  <drousso@apple.com>
2961
2962         Web Inspector: provide a way to edit page settings on a remote target
2963         https://bugs.webkit.org/show_bug.cgi?id=193813
2964         <rdar://problem/47359510>
2965
2966         Reviewed by Joseph Pecoraro.
2967
2968         Add toolbar button that shows a popover with the target's (page's) settings when clicked.
2969
2970         * UserInterface/Base/Main.js:
2971         (WI.loaded):
2972         (WI.contentLoaded):
2973         (WI.initializeTarget): Added.
2974         (WI._handleDeviceSettingsToolbarButtonClicked): Added.
2975         (WI.didDismissPopover): Added.
2976         * UserInterface/Views/Main.css:
2977         (.device-settings-content): Added.
2978         (.device-settings-content .columns): Added.
2979         (.device-settings-content .columns > .column): Added.
2980         (.device-settings-content .columns > .column + .column): Added.
2981         (body[dir=ltr] .device-settings-content label > input): Added.
2982         (body[dir=rtl] .device-settings-content label > input): Added.
2983
2984         * UserInterface/Views/Popover.js:
2985         (WI.Popover.prototype._update.area):
2986         (WI.Popover.prototype._update):
2987         (WI.Popover.prototype._drawBackground):
2988         (WI.Popover.prototype._bestMetricsForEdge):
2989         (WI.Popover.prototype._drawFrame):
2990         If the best area is negative, treat it as the worst area.
2991         Allow areas to be clamped so long as the clamped edge is not the preferred edge.
2992
2993         * UserInterface/Base/Test.js:
2994         (WI.initializeTarget): Added.
2995
2996         * UserInterface/Images/Device.svg: Added.
2997         * Localizations/en.lproj/localizedStrings.js:
2998
2999 2019-01-25  Devin Rousso  <drousso@apple.com>
3000
3001         Web Inspector: Audit: unable to import audits
3002         https://bugs.webkit.org/show_bug.cgi?id=193861
3003
3004         Reviewed by Joseph Pecoraro.
3005
3006         * UserInterface/Controllers/AuditManager.js:
3007         (WI.AuditManager.prototype.async processJSON):
3008
3009 2019-01-25  Devin Rousso  <drousso@apple.com>
3010
3011         Web Inspector: Uncaught Exception: No node with given id found
3012         https://bugs.webkit.org/show_bug.cgi?id=193833
3013
3014         Reviewed by Joseph Pecoraro.
3015
3016         * UserInterface/Views/CanvasContentView.js:
3017         (WI.CanvasContentView):
3018         (WI.CanvasContentView.prototype.initialLayout):
3019         (WI.CanvasContentView.prototype.layout):
3020         (WI.CanvasContentView.prototype._refreshPixelSize):
3021         Drive-by: show the refresh button when viewing a specific canvas.
3022
3023         * UserInterface/Views/CanvasTabContentView.js:
3024         (WI.CanvasTabContentView.prototype._removeCanvas):
3025         Reset to the overview if the canvas is removed.
3026
3027 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
3028
3029         Web Inspector: Improve Dark Mode appearance within Memory timeline
3030         https://bugs.webkit.org/show_bug.cgi?id=193804
3031
3032         Reviewed by Matt Baker.
3033
3034         * UserInterface/Views/TimelineOverview.css:
3035         (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
3036         (.timeline-overview > .tree-outline.timelines .item.selected + .item,):
3037         (@media (prefers-color-scheme: dark)):
3038         (.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
3039         (body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
3040         Fix some colors for Timelines edit mode.
3041
3042         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3043         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
3044         (@media (prefers-color-scheme: dark)):
3045         (.timeline-overview-graph.cpu > .legend):
3046         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
3047         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
3048         (.timeline-overview-graph.memory:nth-child(even) > .legend):
3049         (@media (prefers-color-scheme: dark)):
3050         (.timeline-overview-graph.memory > .legend):
3051         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
3052         Improved colors in CPU / Memory overview graph legends.
3053
3054         * UserInterface/Views/CPUUsageView.css:
3055         (.cpu-usage-view > .details):
3056         * UserInterface/Views/CircleChart.css:
3057         (.circle-chart > svg > path.background):
3058         * UserInterface/Views/MemoryCategoryView.css:
3059         (.memory-category-view > .details):
3060         (.memory-category-view > .details > .name):
3061         * UserInterface/Views/MemoryTimelineView.css:
3062         (.timeline-view.memory > .content > .overview .total-usage,):
3063         (.timeline-view.memory .legend > .row > .size):
3064         Improved colors in CPU / Memory detail views.
3065
3066         * UserInterface/Views/Variables.css:
3067         (:root):
3068         Add a default --text-secondary-color which will end up slightly
3069         lighter in dark mode where it was already implemented.
3070
3071         (@media (prefers-color-scheme: dark)):
3072         Improved max-comparison colors.
3073
3074 2019-01-25  Devin Rousso  <drousso@apple.com>
3075
3076         Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
3077         https://bugs.webkit.org/show_bug.cgi?id=193186
3078         <rdar://problem/45100694>
3079
3080         Reviewed by Joseph Pecoraro.
3081
3082         Shift around z-index values to make Timelines markers appear behind record bars. Widen the
3083         marker hit region to make it easier to see the tooltip.
3084
3085         * UserInterface/Views/Variables.css:
3086         (:root):
3087
3088         * UserInterface/Views/TimelineRuler.css:
3089         (.timeline-ruler):
3090         (.timeline-ruler > .markers):
3091         (.timeline-ruler > .markers > .marker):
3092         (body[dir=ltr] .timeline-ruler > .markers > .marker):
3093         (body[dir=rtl] .timeline-ruler > .markers > .marker):
3094         (.timeline-ruler > .markers > .marker::before):
3095         (body[dir=ltr] .timeline-ruler > .markers > .marker::before):
3096         (body[dir=rtl] .timeline-ruler > .markers > .marker::before):
3097         (.timeline-ruler > .markers > .marker::after): Added.
3098         (body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
3099         (body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
3100         (.timeline-ruler > .markers > .marker.current-time):
3101         (.timeline-ruler > .markers > .marker.current-time::after): Added.
3102         (.timeline-ruler > .markers > .marker.load-event):
3103         (.timeline-ruler > .markers > .marker.dom-content-event):
3104         (.timeline-ruler > .markers > .marker.timestamp):
3105         (.timeline-ruler > .selection-handle):
3106         (.timeline-ruler.both-handles-clamped > .selection-handle):
3107         (.timeline-ruler > .shaded-area):
3108         (.timeline-ruler > .markers > .marker.current-time::before): Deleted.
3109
3110         * UserInterface/Views/TimelineRecordBar.css:
3111         (.timeline-record-bar):
3112         (.timeline-record-bar > .segment):
3113
3114         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3115         (.timeline-overview-graph.cpu > .legend):
3116         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
3117         (.timeline-overview-graph.memory > .legend):
3118
3119 2019-01-25  Devin Rousso  <drousso@apple.com>
3120
3121         Web Inspector: Audit: remove experimental setting
3122         https://bugs.webkit.org/show_bug.cgi?id=193743
3123         <rdar://problem/28234022>
3124
3125         Reviewed by Joseph Pecoraro.
3126
3127         * UserInterface/Base/Setting.js:
3128         (WI.Setting):
3129         (WI.Setting.localStorageKey): Added.
3130         (WI.Setting.migrateValue):
3131         Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
3132
3133         * UserInterface/Base/Main.js:
3134         (WI.loaded):
3135
3136         * UserInterface/Views/AuditTabContentView.js:
3137         (WI.AuditTabContentView.isTabAllowed):
3138
3139         * UserInterface/Views/SettingsTabContentView.js:
3140         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3141
3142         * Localizations/en.lproj/localizedStrings.js:
3143
3144 2019-01-25  Devin Rousso  <drousso@apple.com>
3145
3146         Web Inspector: show uncaught exception view for unhandled promise rejections
3147         https://bugs.webkit.org/show_bug.cgi?id=193832
3148
3149         Reviewed by Matt Baker.
3150
3151         * UserInterface/Debug/UncaughtExceptionReporter.js:
3152         (handleUnhandledPromiseRejection): Added.
3153
3154 2019-01-25  Devin Rousso  <drousso@apple.com>
3155
3156         Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
3157         https://bugs.webkit.org/show_bug.cgi?id=193830
3158
3159         Reviewed by Matt Baker.
3160
3161         * UserInterface/Models/RecordingAction.js:
3162         (WI.RecordingAction.prototype.process):
3163
3164 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
3165
3166         Web Inspector: Add another Protocol Version (iOS 12.2)
3167         https://bugs.webkit.org/show_bug.cgi?id=193810
3168         <rdar://problem/42981838>
3169
3170         Reviewed by Matt Baker.
3171
3172         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
3173         * Versions/Inspector-iOS-12.2.json: Added.
3174
3175 2019-01-25  Devin Rousso  <drousso@apple.com>
3176
3177         Web Inspector: `WI.Setting.migrateValue` doesn't take into account the key prefix
3178         https://bugs.webkit.org/show_bug.cgi?id=193814
3179
3180         Reviewed by Matt Baker.
3181
3182         * UserInterface/Base/Setting.js:
3183         (WI.Setting):
3184         (WI.Setting.migrateValue):
3185         (WI.Setting._localStorageKey): Added.
3186
3187 2019-01-25  Devin Rousso  <drousso@apple.com>
3188
3189         Web Inspector: improve invalid Audit/Recording JSON error messages
3190         https://bugs.webkit.org/show_bug.cgi?id=193476
3191         <rdar://problem/47303659>
3192
3193         Reviewed by Joseph Pecoraro.
3194
3195         * UserInterface/Models/AuditTestBase.js:
3196         (WI.AuditTestBase):
3197         * UserInterface/Models/AuditTestCase.js:
3198         (WI.AuditTestCase.async fromPayload):
3199         * UserInterface/Models/AuditTestGroup.js:
3200         (WI.AuditTestGroup.async fromPayload):
3201         * UserInterface/Models/AuditTestCaseResult.js:
3202         (WI.AuditTestCaseResult.async fromPayload.checkArray):
3203         (WI.AuditTestCaseResult.async fromPayload):
3204         * UserInterface/Models/AuditTestGroupResult.js:
3205         (WI.AuditTestGroupResult.async fromPayload):
3206         * UserInterface/Controllers/AuditManager.js:
3207         (WI.AuditManager.synthesizeWarning): Added.
3208         (WI.AuditManager.synthesizeError):
3209         (WI.AuditManager.prototype.async processJSON):
3210
3211         * UserInterface/Models/Recording.js:
3212         (WI.Recording.fromPayload):
3213         (WI.Recording.synthesizeWarning): Added.
3214         (WI.Recording.synthesizeError):
3215         * UserInterface/Models/RecordingFrame.js:
3216         (WI.RecordingFrame.fromPayload):
3217         * UserInterface/Models/RecordingAction.js:
3218         (WI.RecordingAction.fromPayload):
3219         (WI.RecordingAction.prototype.async swizzle):
3220         (WI.RecordingAction.prototype.apply):
3221         * UserInterface/Controllers/CanvasManager.js:
3222         (WI.CanvasManager.prototype.processJSON):
3223
3224         * Localizations/en.lproj/localizedStrings.js:
3225
3226 2019-01-24  Devin Rousso  <drousso@apple.com>
3227
3228         Web Inspector: Audit: add supports key to test/group for compatibility
3229         https://bugs.webkit.org/show_bug.cgi?id=193686
3230         <rdar://problem/47460872>
3231
3232         Reviewed by Joseph Pecoraro.
3233
3234         * UserInterface/Models/AuditTestBase.js:
3235         (WI.AuditTestBase):
3236         (WI.AuditTestBase.prototype.get supported): Added.
3237         (WI.AuditTestBase.prototype.set supported): Added.
3238         (WI.AuditTestBase.prototype.set disabled):
3239         (WI.AuditTestBase.prototype.async start):
3240         (WI.AuditTestBase.prototype.stop):
3241         (WI.AuditTestBase.toJSON):
3242         * UserInterface/Models/AuditTestCase.js:
3243         (WI.AuditTestCase.async fromPayload):
3244         * UserInterface/Models/AuditTestGroup.js:
3245         (WI.AuditTestGroup):
3246         (WI.AuditTestGroup.async fromPayload):
3247         (WI.AuditTestGroup.prototype.get supported): Added.
3248         (WI.AuditTestGroup.prototype.set supported): Added.
3249         Add support for a "supports" key in the test JSON that prevents the test from being run if
3250         it's value is lower than the frontend/backend version.
3251
3252         * UserInterface/Views/AuditTreeElement.js:
3253         (WI.AuditTreeElement.prototype.onattach):
3254         (WI.AuditTreeElement.prototype.ondelete):
3255         (WI.AuditTreeElement.prototype.populateContextMenu):
3256         (WI.AuditTreeElement.prototype._updateStatus): Added.
3257         (WI.AuditTreeElement.prototype._showRunningSpinner):
3258         (WI.AuditTreeElement.prototype._showRunningProgress):
3259         (WI.AuditTreeElement.prototype._updateTestGroupDisabled):
3260         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
3261         (WI.AuditTreeElement.prototype._handleTestResultCleared):
3262         (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
3263         (WI.AuditTreeElement.prototype._handleManagerEditingChanged):
3264         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Deleted.
3265         (WI.AuditTreeElement.prototype._updateLevel): Deleted.
3266         * UserInterface/Views/AuditTreeElement.css:
3267         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Added.
3268         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Added.
3269         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported  > .status > img): Added.
3270         (.tree-outline .item.audit.unsupported:not(.selected) > :matches(.icon, .titles)): Added.
3271         (.tree-outline .item.audit.unsupported > .status > img): Added.
3272         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Deleted.
3273         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Deleted.
3274         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
3275         Hide unsupported tests unless in edit mode, where they are greyed out and cannot be enabled.
3276         Drive-by: only allow tests to be deleted when in edit mode.
3277
3278         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3279         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
3280
3281         * Localizations/en.lproj/localizedStrings.js:
3282
3283 2019-01-24  Joseph Pecoraro  <pecoraro@apple.com>
3284
3285         Web Inspector: CPU Usage Timeline
3286         https://bugs.webkit.org/show_bug.cgi?id=193730
3287         <rdar://problem/46797201>
3288
3289         Reviewed by Devin Rousso.
3290
3291         CPU Usage is gathered in the backend twice a second, the frequency of the
3292         ResourceUsageThread in WebCore. The frontend displays cpu usage in a few
3293         ways in the Timeline.
3294
3295         We use a column chart in the timeline overview to display the frequency and
3296         relative distance of samples. This helps show if the samples were close
3297         together or far apart, which indicates how meaningful they will be at a
3298         particular scale.
3299
3300         We use a line chart in the timeline detail view which will be easier to see
3301         the changes over a particular time range selection.
3302
3303         * Localizations/en.lproj/localizedStrings.js:
3304         New strings.
3305
3306         * UserInterface/Main.html:
3307         * UserInterface/Base/Main.js:
3308         (WI.loaded):
3309         * UserInterface/Test.html:
3310         * UserInterface/Test/Test.js:
3311         (WI.loaded):
3312         * UserInterface/Protocol/CPUProfilerObserver.js:
3313         (WI.CPUProfilerObserver.prototype.trackingStart):
3314         (WI.CPUProfilerObserver.prototype.trackingUpdate):
3315         (WI.CPUProfilerObserver.prototype.trackingComplete):
3316         (WI.CPUProfilerObserver):
3317         New files and default registration.
3318
3319         * UserInterface/Protocol/Target.js:
3320         (WI.Target.prototype.get CPUProfilerAgent):
3321         New Agent.
3322
3323         * UserInterface/Controllers/TimelineManager.js:
3324         (WI.TimelineManager.availableTimelineTypes):
3325         (WI.TimelineManager.prototype.cpuProfilerTrackingStarted):
3326         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
3327         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
3328         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
3329         (WI.TimelineManager.prototype.memoryTrackingStart): Renamed.
3330         (WI.TimelineManager.prototype.memoryTrackingUpdate): Renamed.
3331         (WI.TimelineManager.prototype.memoryTrackingComplete): Renamed.
3332         * UserInterface/Models/CPUInstrument.js:
3333         (WI.CPUInstrument):
3334         (WI.CPUInstrument.supported):
3335         (WI.CPUInstrument.prototype.get timelineRecordType):
3336         (WI.CPUInstrument.prototype.startInstrumentation):
3337         (WI.CPUInstrument.prototype.stopInstrumentation):
3338         * UserInterface/Models/CPUTimelineRecord.js:
3339         (WI.CPUTimelineRecord):
3340         (WI.CPUTimelineRecord.prototype.get timestamp):
3341         (WI.CPUTimelineRecord.prototype.get usage):
3342         * UserInterface/Models/Instrument.js:
3343         (WI.Instrument.createForTimelineType):
3344         * UserInterface/Models/TimelineRecord.js:
3345         * UserInterface/Models/TimelineRecording.js:
3346         (WI.TimelineRecording.prototype.addRecord):
3347         Expose a new CPU instrument and timeline.
3348
3349         * UserInterface/Views/ColumnChart.js: Added.
3350         (WI.ColumnChart):
3351         (WI.ColumnChart.prototype.get element):
3352         (WI.ColumnChart.prototype.get bars):
3353         (WI.ColumnChart.prototype.get size):
3354         (WI.ColumnChart.prototype.set size):
3355         (WI.ColumnChart.prototype.addBar):
3356         (WI.ColumnChart.prototype.clear):
3357         (WI.ColumnChart.prototype.needsLayout):
3358         (WI.ColumnChart.prototype.updateLayout):
3359         View that will draw vertical bars with independent widths.
3360         This is meant to be used similiar to WI.LineChart.
3361
3362         * UserInterface/Images/CPUInstrument.svg: Added.
3363         * UserInterface/Views/Variables.css:
3364         (:root):
3365         CPU timeline colors and icon.
3366
3367         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3368         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
3369         (.timeline-overview-graph.cpu):
3370         (.timeline-overview-graph.cpu > .legend):
3371         (body[dir=ltr] .timeline-overview-graph.cpu > .legend):
3372         (body[dir=rtl] .timeline-overview-graph.cpu > .legend):
3373         (.timeline-overview-graph:nth-child(even) > .legend):
3374         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart):
3375         (.timeline-overview-graph.cpu > .bar-chart > svg > g > rect):
3376         * UserInterface/Views/CPUTimelineOverviewGraph.js: Added.
3377         (WI.CPUTimelineOverviewGraph):
3378         (WI.CPUTimelineOverviewGraph.prototype.get height):
3379         (WI.CPUTimelineOverviewGraph.prototype.reset):
3380         (WI.CPUTimelineOverviewGraph.prototype.layout.xScale):
3381         (WI.CPUTimelineOverviewGraph.prototype.layout.yScale):
3382         (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord):
3383         (WI.CPUTimelineOverviewGraph.prototype.layout):
3384         (WI.CPUTimelineOverviewGraph.prototype._updateLegend):
3385         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
3386         * UserInterface/Views/CPUTimelineView.css:
3387         (.timeline-view.cpu):
3388         (.timeline-view.cpu > .content):
3389         (.timeline-view.cpu > .content .subtitle):
3390         (.timeline-view.cpu > .content > .details):
3391         (.timeline-view.cpu > .content > .details > .timeline-ruler):
3392         (body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler):
3393         (body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler):
3394         (.timeline-view.cpu > .content > .details > .subtitle):
3395         (.cpu-usage-view .line-chart > svg > path):
3396         (.timeline-view.cpu .legend > .row > .swatch.current):
3397         * UserInterface/Views/CPUTimelineView.js: Added.
3398         (WI.CPUTimelineView):
3399         (WI.CPUTimelineView.prototype.shown):
3400         (WI.CPUTimelineView.prototype.hidden):
3401         (WI.CPUTimelineView.prototype.closed):
3402         (WI.CPUTimelineView.prototype.reset):
3403         (WI.CPUTimelineView.prototype.get scrollableElements):
3404         (WI.CPUTimelineView.prototype.get showsFilterBar):
3405         (WI.CPUTimelineView.prototype.layout.layoutView):
3406         (WI.CPUTimelineView.prototype.layout.xScale):
3407         (WI.CPUTimelineView.prototype.layout.yScale):
3408         (WI.CPUTimelineView.prototype.layout):
3409         (WI.CPUTimelineView.prototype._cpuTimelineRecordAdded):
3410         * UserInterface/Views/CPUUsageView.css:
3411         (.cpu-usage-view):
3412         (.cpu-usage-view > .details):
3413         (body[dir=ltr] .cpu-usage-view > .details):
3414         (body[dir=rtl] .cpu-usage-view > .details):
3415         (.cpu-usage-view > .graph):
3416         (body[dir=rtl] .cpu-usage-view > .graph):
3417         * UserInterface/Views/CPUUsageView.js:
3418         (WI.CPUUsageView):
3419         (WI.CPUUsageView.prototype.get element):
3420         (WI.CPUUsageView.prototype.clear):
3421         (WI.CPUUsageView.prototype.layoutWithDataPoints):
3422         (WI.CPUUsageView.prototype._updateDetails):
3423         * UserInterface/Views/ContentView.js:
3424         (WI.ContentView.createFromRepresentedObject):
3425         * UserInterface/Views/TimelineIcons.css:
3426         (.cpu-icon .icon):
3427         * UserInterface/Views/TimelineOverviewGraph.js:
3428         (WI.TimelineOverviewGraph.createForTimeline):
3429         * UserInterface/Views/TimelineTabContentView.js:
3430         (WI.TimelineTabContentView.displayNameForTimelineType):
3431         (WI.TimelineTabContentView.iconClassNameForTimelineType):
3432         (WI.TimelineTabContentView.genericClassNameForTimelineType):
3433         (WI.TimelineTabContentView.iconClassNameForRecord):
3434         (WI.TimelineTabContentView.displayNameForRecord):
3435         Timeline views for CPU usage.
3436
3437         * UserInterface/Views/MemoryCategoryView.js:
3438         (WI.MemoryCategoryView):
3439         * UserInterface/Views/MemoryTimelineView.js:
3440         (WI.MemoryTimelineView.createChartContainer):
3441         (WI.MemoryTimelineView):
3442         (WI.MemoryTimelineView.prototype._clearMaxComparisonLegend):
3443         Minor updates to style and comments.
3444
3445 2019-01-23  Nikita Vasilyev  <nvasilyev@apple.com>
3446
3447         Web Inspector: Refactor WI.CSSStyleDeclaration.prototype.update
3448         https://bugs.webkit.org/show_bug.cgi?id=193737
3449
3450         Reviewed by Matt Baker.
3451
3452         Remove unused event data from the WI.CSSStyleDeclaration.Event.PropertiesChanged event.
3453
3454         * UserInterface/Models/CSSStyleDeclaration.js:
3455         (WI.CSSStyleDeclaration.prototype.update):
3456
3457 2019-01-23  Devin Rousso  <drousso@apple.com>
3458
3459         WebInspector: Confusingly nested events in the timeline for Mutation Observers
3460         https://bugs.webkit.org/show_bug.cgi?id=192884
3461         <rdar://problem/46854178>
3462
3463         Reviewed by Joseph Pecoraro.
3464
3465         If a microtask event (e.g. `ObserverCallback`) is contained within a `EvaluatedScript`
3466         event, move that microtask event to be a sibling of the `EvaluateScript`, subtracting the
3467         microtask's time taken from the `EvaluateScript`'s time. If there are no other children
3468         after this move, then remove the `EvaluateScript` altogether.
3469
3470         * UserInterface/Controllers/TimelineManager.js:
3471         (WI.TimelineManager.prototype.eventRecorded.fixMicrotaskPlacement): Added.
3472         (WI.TimelineManager.prototype.eventRecorded):
3473         (WI.TimelineManager.prototype._mergeScriptProfileRecords):
3474
3475 2019-01-23  Joseph Pecoraro  <pecoraro@apple.com>
3476
3477         Web Inspector: Network Waterfall column should redraw when adding/removing new columns
3478         https://bugs.webkit.org/show_bug.cgi?id=193696
3479         <rdar://problem/47464149>
3480
3481         Reviewed by Devin Rousso.
3482
3483         * UserInterface/Views/TableColumn.js:
3484         (WI.TableColumn.prototype.get needsReloadOnResize):
3485         * UserInterface/Views/NetworkTableContentView.js:
3486         (WI.NetworkTableContentView.prototype.initialLayout):
3487         Mark the waterfall column as sensitive to any resizes.
3488
3489         * UserInterface/Views/Table.js:
3490         (WI.Table.prototype.showColumn):
3491         (WI.Table.prototype.hideColumn):
3492         Update column widths and reload any columns that may be sensitive to resizes.
3493
3494 2019-01-22  Devin Rousso  <drousso@apple.com>
3495
3496         Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
3497         https://bugs.webkit.org/show_bug.cgi?id=116191
3498         <rdar://problem/13905910>
3499
3500         Reviewed by Joseph Pecoraro.
3501
3502         * UserInterface/Controllers/TimelineManager.js:
3503         (WI.TimelineManager.prototype._processRecord):
3504
3505 2019-01-22  Devin Rousso  <drousso@apple.com>
3506
3507         Web Inspector: expose Audit and Recording versions to the frontend
3508         https://bugs.webkit.org/show_bug.cgi?id=193262
3509         <rdar://problem/47130684>
3510
3511         Reviewed by Joseph Pecoraro.
3512
3513         * UserInterface/Protocol/InspectorBackend.js:
3514         (InspectorBackendClass.prototype.registerVersion): Added.
3515
3516         * UserInterface/Models/AuditTestCase.js:
3517         * UserInterface/Models/Recording.js:
3518         (WI.Recording.fromPayload):
3519         Add Interface version values.
3520
3521 2019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
3522
3523         Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
3524         https://bugs.webkit.org/show_bug.cgi?id=193615
3525
3526         Reviewed by Devin Rousso.
3527
3528         Remove unused visibleProperties.
3529
3530         Rename:
3531         - properties to enabledProperties;
3532         - allProperties to properties;
3533         - allVisibleProperties to visibleProperties.
3534
3535         * UserInterface/Models/CSSProperty.js:
3536         (WI.CSSProperty.prototype._prependSemicolonIfNeeded):
3537         (WI.CSSProperty):
3538         * UserInterface/Models/CSSStyleDeclaration.js:
3539         (WI.CSSStyleDeclaration):
3540         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
3541         (WI.CSSStyleDeclaration.prototype.get properties):
3542         (WI.CSSStyleDeclaration.prototype.propertyForName):
3543         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
3544         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
3545         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
3546         * UserInterface/Models/DOMNodeStyles.js:
3547         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
3548         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
3549         (WI.DOMNodeStyles.prototype._associateRelatedProperties):
3550         (WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
3551         (WI.DOMNodeStyles):
3552         * UserInterface/Views/BoxModelDetailsSectionRow.js:
3553         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
3554         * UserInterface/Views/ComputedStyleDetailsPanel.js:
3555         (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
3556         * UserInterface/Views/ComputedStyleSection.js:
3557         (WI.ComputedStyleSection.prototype.get propertiesToRender):
3558         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3559         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
3560         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3561         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
3562         * UserInterface/Views/SpreadsheetStyleProperty.js:
3563         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3564
3565 2019-01-22  Joseph Pecoraro  <pecoraro@apple.com>
3566
3567         Web Inspector: Network Table appears broken after filter - rows look collapsed
3568         https://bugs.webkit.org/show_bug.cgi?id=192730
3569         <rdar://problem/46853158>
3570
3571         Reviewed by Devin Rousso.
3572
3573         * UserInterface/Views/Table.js:
3574         (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
3575         Affect the filler row like the other applyColumnWidths calls since this
3576         now may be the initial call to size visible columns.
3577
3578 2019-01-22  Devin Rousso  <drousso@apple.com>
3579
3580         Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
3581         https://bugs.webkit.org/show_bug.cgi?id=193675
3582         <rdar://problem/46628680>
3583
3584         Reviewed by Joseph Pecoraro.
3585
3586         * UserInterface/Views/AuditTestGroupContentView.js:
3587         (WI.AuditTestGroupContentView.prototype.layout):
3588
3589         * Localizations/en.lproj/localizedStrings.js:
3590
3591 2019-01-18  Jer Noble  <jer.noble@apple.com>
3592
3593         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
3594         https://bugs.webkit.org/show_bug.cgi?id=189553
3595
3596         Reviewed by Tim Horton.
3597
3598         * Configurations/Base.xcconfig:
3599         * Configurations/SDKVariant.xcconfig: Added.
3600
3601 2019-01-18  Devin Rousso  <drousso@apple.com>
3602
3603         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
3604         https://bugs.webkit.org/show_bug.cgi?id=193589
3605
3606         Reviewed by Joseph Pecoraro.
3607
3608         * UserInterface/Views/NetworkTableContentView.js:
3609         (WI.NetworkTableContentView.prototype.get supportsSave):
3610         (WI.NetworkTableContentView.prototype._HARResources):
3611
3612 2019-01-17  Truitt Savell  <tsavell@apple.com>
3613
3614         Unreviewed, rolling out r240124.
3615
3616         This commit broke an internal build.
3617
3618         Reverted changeset:
3619
3620         "SDK_VARIANT build destinations should be separate from non-
3621         SDK_VARIANT builds"
3622         https://bugs.webkit.org/show_bug.cgi?id=189553
3623         https://trac.webkit.org/changeset/240124
3624
3625 2019-01-17  Jer Noble  <jer.noble@apple.com>
3626
3627         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
3628         https://bugs.webkit.org/show_bug.cgi?id=189553
3629
3630         Reviewed by Tim Horton.
3631
3632         * Configurations/Base.xcconfig:
3633         * Configurations/SDKVariant.xcconfig: Added.
3634
3635 2019-01-16  Matt Baker  <mattbaker@apple.com>
3636
3637         Web Inspector: Fix TreeOutline TypeError:ā€‹ this._indexesForSubtree is not a function
3638         https://bugs.webkit.org/show_bug.cgi?id=193501
3639         <rdar://problem/47323967>
3640
3641         Reviewed by Joseph Pecoraro.
3642
3643         * UserInterface/Views/TreeOutline.js:
3644         (WI.TreeOutline.prototype.removeChildAtIndex):
3645
3646 2019-01-15  Devin Rousso  <drousso@apple.com>
3647
3648         Web Inspector: Audit: create new IDL type for exposing special functionality in test context
3649         https://bugs.webkit.org/show_bug.cgi?id=193149
3650         <rdar://problem/46801218>
3651
3652         Reviewed by Joseph Pecoraro.
3653
3654         Add `AuditAgent` getters and plumbing.
3655
3656         * UserInterface/Protocol/Target.js:
3657         (WI.Target.prototype.get AuditAgent): Added.
3658
3659         * UserInterface/Models/AuditTestCase.js:
3660         (WI.AuditTestCase.prototype.async run):
3661
3662         * UserInterface/Controllers/AuditManager.js:
3663         (WI.AuditManager.prototype.async start):
3664
3665         * .eslintrc:
3666
3667 2019-01-14  Devin Rousso  <drousso@apple.com>
3668
3669         Web Inspector: Event breakpoints: typing uppercase "DOM" doesn't show completions for events that start with "DOM"
3670         https://bugs.webkit.org/show_bug.cgi?id=193384
3671
3672         Reviewed by Joseph Pecoraro.
3673
3674         * UserInterface/Views/EventBreakpointPopover.js:
3675         (WI.EventBreakpointPopover.prototype.show):
3676
3677 2019-01-14  Devin Rousso  <drousso@apple.com>
3678
3679         Web Inspector: Event breakpoints: text field and completion popover fonts should match
3680         https://bugs.webkit.org/show_bug.cgi?id=193249
3681
3682         Reviewed by Matt Baker.
3683
3684         * UserInterface/Views/EventBreakpointPopover.css:
3685         (.popover .event-breakpoint-content > .event-type > input): Added.
3686         (.popover .event-breakpoint-content > .event-type > input::placeholder): Added.
3687         * UserInterface/Views/EventBreakpointPopover.js:
3688         (WI.EventBreakpointPopover.prototype.show):
3689         (WI.EventBreakpointPopover.prototype._showSuggestionsView):
3690         Subtract the <input> border and padding from the bounds position so the <input> text lines
3691         up with the `WI.CompletionSuggestionsView` text.
3692
3693         * UserInterface/Views/CompletionSuggestionsView.js:
3694         (WI.CompletionSuggestionsView):
3695         Drive-by: force `dir=ltr` to match the `text-align: left;` CSS styling.
3696
3697 2019-01-14  Nikita Vasilyev  <nvasilyev@apple.com>
3698
3699         Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
3700         https://bugs.webkit.org/show_bug.cgi?id=193098
3701         <rdar://problem/47016036>
3702
3703         Reviewed by Devin Rousso.
3704
3705         Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
3706         Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
3707         move from wrapping text.
3708
3709         * UserInterface/Views/CompletionSuggestionsView.js:
3710         (WI.CompletionSuggestionsView.prototype.hide):
3711         (WI.CompletionSuggestionsView.prototype.show):
3712         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
3713         (WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
3714         (WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
3715         (WI.CompletionSuggestionsView):
3716
3717         * UserInterface/Views/SpreadsheetTextField.js:
3718         (WI.SpreadsheetTextField.prototype.set suggestionHint):
3719         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
3720         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
3721         (WI.SpreadsheetTextField.prototype._updateCompletions):
3722         (WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.
3723
3724         (WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
3725         Drive-by: abstract out repeating code into a private method.
3726
3727 2019-01-14  Devin Rousso  <drousso@apple.com>
3728
3729         Web Inspector: Settings: group titles should vertically align with the first editor
3730         https://bugs.webkit.org/show_bug.cgi?id=193391
3731
3732         Reviewed by Dean Jackson.
3733
3734         * UserInterface/Views/SettingsTabContentView.css:
3735         (.content-view.settings > .settings-view > .container):
3736         (.content-view.settings > .settings-view > .container > .editor-group > .editor): Added.
3737         (.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
3738         (.content-view.settings > .settings-view > .container > .editor-group > .editor select):
3739         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):
3740
3741 2019-01-11  Matt Baker  <mattbaker@apple.com>
3742
3743         Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
3744         https://bugs.webkit.org/show_bug.cgi?id=192917
3745         <rdar://problem/46875285>
3746
3747         Reviewed by Devin Rousso.
3748
3749         SelectionController should not be notified of removed children until the
3750         child items have been removed from the TreeOutline. Doing so at this stage
3751         is unsafe, since this method checks `this.selectedTreeElement`, which could
3752         return the adjusted index from the SelectionController before anything has
3753         actually been removed from the TreeOutline.
3754
3755         The number of calls to SelectionController.prototype.didRemoveItems is also
3756         reduced somewhat, since we're no longer calling it for every TreeElement.
3757
3758         * UserInterface/Views/TreeOutline.js:
3759         (WI.TreeOutline.prototype.removeChildAtIndex):
3760         (WI.TreeOutline.prototype.removeChildren):
3761         (WI.TreeOutline.prototype._forgetTreeElement):
3762         (WI.TreeOutline.prototype._indexesForSubtree): Added.        
3763
3764 2019-01-10  Devin Rousso  <drousso@apple.com>
3765
3766         Web Inspector: Audit: allow audits to be enabled/disabled
3767         https://bugs.webkit.org/show_bug.cgi?id=192210
3768         <rdar://problem/46423583>
3769
3770         Reviewed by Joseph Pecoraro.
3771
3772         * UserInterface/Controllers/AuditManager.js:
3773         (WI.AuditManager.prototype.get editing): Added.
3774         (WI.AuditManager.prototype.set editing): Added.
3775         (WI.AuditManager.prototype.stop):
3776         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
3777         Since default audits aren't stored, keep a list of disabled default tests in a `WI.Setting`.
3778
3779         * UserInterface/Models/AuditTestBase.js:
3780         (WI.AuditTestBase):
3781         (WI.AuditTestBase.prototype.get disabled): Added.
3782         (WI.AuditTestBase.prototype.set disabled): Added.
3783         (WI.AuditTestBase.prototype.async start):
3784         (WI.AuditTestBase.prototype.stop):
3785         (WI.AuditTestBase.toJSON):
3786
3787         * UserInterface/Models/AuditTestCase.js:
3788         (WI.AuditTestCase):
3789         (WI.AuditTestCase.async fromPayload):
3790         (WI.AuditTestCase.prototype.toJSON):
3791
3792         * UserInterface/Models/AuditTestGroup.js:
3793         (WI.AuditTestGroup):
3794         (WI.AuditTestGroup.async fromPayload):
3795         (WI.AuditTestGroup.prototype.get disabled): Added.
3796         (WI.AuditTestGroup.prototype.set disabled): Added.
3797         (WI.AuditTestGroup.prototype.toJSON):
3798         (WI.AuditTestGroup.prototype.async run):
3799         (WI.AuditTestGroup.prototype._handleTestDisabledChanged): Added.
3800         (WI.AuditTestGroup.prototype._handleTestProgress):
3801         Propagate `disabled` changes to all sub-tests, unless the change was caused by one of the
3802         sub-tests, in which case we are now in an intermediate state.
3803
3804         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3805         (WI.AuditNavigationSidebarPanel):
3806         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
3807         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3808         (WI.AuditNavigationSidebarPanel.prototype.hasCustomFilters): Added.
3809         (WI.AuditNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): Added.
3810         (WI.AuditNavigationSidebarPanel.prototype._addTest):
3811         (WI.AuditNavigationSidebarPanel.prototype._addResult):
3812         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
3813         (WI.AuditNavigationSidebarPanel.prototype._updateEditButtonNavigationItemState): Added.
3814         (WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged): Added.
3815         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
3816         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
3817         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
3818         (WI.AuditNavigationSidebarPanel.prototype._handleEditButtonNavigationItemClicked): Added.
3819         * UserInterface/Views/AuditNavigationSidebarPanel.css:
3820         (.sidebar > .panel.navigation.audit > .content):
3821         (.sidebar > .panel.navigation.audit > .content > .tree-outline): Added.
3822         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled):active): Added.
3823         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated): Added.
3824         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated:active): Added.
3825         (.sidebar > .panel.navigation.audit > .content .edit-audits.disabled): Added.
3826         (.finish-editing-audits-placeholder.message-text-view .navigation-item-help .navigation-bar): Added.
3827         Leverage custom filters to ensure that disabled audits arent shown when not editing and that
3828         result tree elements aren't shown while editing.
3829
3830         * UserInterface/Views/AuditTestGroupContentView.js:
3831         (WI.AuditTestGroupContentView.prototype.shown):
3832
3833         * UserInterface/Views/AuditTreeElement.js:
3834         (WI.AuditTreeElement.prototype.onattach):
3835         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Added.
3836         (WI.AuditTreeElement.prototype._updateTestGroupDisabled): Added.
3837         (WI.AuditTreeElement.prototype._handleTestDisabledChanged): Added.
3838         (WI.AuditTreeElement.prototype._handleManagerEditingChanged): Added.
3839         * UserInterface/Views/AuditTreeElement.css:
3840         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Added.
3841         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
3842         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:not(:hover)): Deleted.
3843         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
3844         Prevent selection and running when editing.
3845
3846         * UserInterface/Views/TreeOutline.css:
3847         (.tree-outline .children.expanded:not([hidden])): Added.
3848         (.tree-outline .children.expanded): Deleted.
3849
3850         * UserInterface/Base/ObjectStore.js:
3851         (WI.ObjectStore._open):
3852         Batch operations together to help avoid multiple simultaneous `indexedDB.open` calls. This
3853         should also help preserve the order of operations, as once the database is open, operations
3854         are executed in the order they were enqueued.
3855
3856         (WI.ObjectStore.prototype.async.addObject):
3857         Pass a unique `Symbol` to the `toJSON` call on the given object so that the object can save
3858         additional values that wouldn't normally be saved. This doesn't conflict with normal usage
3859         of `toJSON` (e.g. `JSON.stringify`) because that case also passes in a value:
3860          - `undefined`, if it was called directly on the object
3861          - the key for this object in the containing object
3862          - the index of this object in the containing array
3863         In any case, the value can never equal the unique `Symbol`, so it's guaranteed that the code
3864         will only run for `WI.ObjectStore` operations.
3865
3866         (WI.ObjectStore.prototype.async.clear): Added.
3867
3868         * Localizations/en.lproj/localizedStrings.js:
3869
3870 2019-01-09  Devin Rousso  <drousso@apple.com>
3871
3872         Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open
3873         https://bugs.webkit.org/show_bug.cgi?id=193284
3874
3875         Reviewed by Joseph Pecoraro.
3876
3877         If inspector^2 is closed, stringify all messages.
3878         If inspector^2 is open, log each message JSON object without modifying it.
3879
3880         * UserInterface/Protocol/LoggingProtocolTracer.js:
3881         (WI.LoggingProtocolTracer.prototype._processEntry):
3882
3883 2019-01-09  Nikita Vasilyev  <nvasilyev@apple.com>
3884
3885         Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
3886         https://bugs.webkit.org/show_bug.cgi?id=193218
3887         <rdar://problem/47098303>
3888
3889         Reviewed by Devin Rousso.
3890
3891         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3892         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3893         A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens.
3894
3895         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
3896         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
3897         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
3898
3899 2019-01-08  Nikita Vasilyev  <nvasilyev@apple.com>
3900
3901         Web Inspector: Styles: Undo reverts all changes at once
3902         https://bugs.we