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